Record Class TaskExecutionOutcome
java.lang.Object
java.lang.Record
org.springframework.scheduling.config.TaskExecutionOutcome
- Record Components:
executionTime
- the instant when the task execution started,null
if the task has not started.status
- theTaskExecutionOutcome.Status
of the execution outcome.throwable
- the exception thrown from the task execution, if any.
public record TaskExecutionOutcome(Instant executionTime, TaskExecutionOutcome.Status status, Throwable throwable)
extends Record
Outcome of a
Task
execution.- Since:
- 6.2
- Author:
- Brian Clozel
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Status of the task execution outcome. -
Constructor Summary
ConstructorDescriptionTaskExecutionOutcome
(Instant executionTime, TaskExecutionOutcome.Status status, Throwable throwable) Creates an instance of aTaskExecutionOutcome
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.Returns the value of theexecutionTime
record component.final int
hashCode()
Returns a hash code value for this object.status()
Returns the value of thestatus
record component.Returns the value of thethrowable
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
TaskExecutionOutcome
public TaskExecutionOutcome(@Nullable Instant executionTime, TaskExecutionOutcome.Status status, @Nullable Throwable throwable) Creates an instance of aTaskExecutionOutcome
record class.- Parameters:
executionTime
- the value for theexecutionTime
record componentstatus
- the value for thestatus
record componentthrowable
- the value for thethrowable
record component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
executionTime
Returns the value of theexecutionTime
record component.- Returns:
- the value of the
executionTime
record component
-
status
Returns the value of thestatus
record component.- Returns:
- the value of the
status
record component
-
throwable
Returns the value of thethrowable
record component.- Returns:
- the value of the
throwable
record component
-