Record Class TaskStatus
java.lang.Object
java.lang.Record
org.j7m.middleware.workload.api.TaskStatus
- Record Components:
ref- task referencestate- task stateprogress- latest progresslease- current leaseresult- success resultfailure- failure descriptorcheckpoint- latest checkpointupdatedAt- status update timemetadata- safe status metadata
public record TaskStatus(TaskRef ref, TaskState state, TaskProgress progress, TaskLease lease, TaskResult result, TaskFailure failure, TaskCheckpoint checkpoint, Instant updatedAt, Map<String,String> metadata)
extends Record
Immutable scheduler task status snapshot.
-
Constructor Summary
ConstructorsConstructorDescriptionTaskStatus(TaskRef ref, TaskState state, TaskProgress progress, TaskLease lease, TaskResult result, TaskFailure failure, TaskCheckpoint checkpoint, Instant updatedAt, Map<String, String> metadata) Creates immutable status metadata. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecheckpointrecord component.Returns the current lease when the task is leased.final booleanIndicates whether some other object is "equal to" this one.Returns the failure descriptor when the task failed.failure()Returns the value of thefailurerecord component.final inthashCode()Returns a hash code value for this object.lease()Returns the value of theleaserecord component.metadata()Returns the value of themetadatarecord component.progress()Returns the value of theprogressrecord component.ref()Returns the value of therefrecord component.result()Returns the value of theresultrecord component.state()Returns the value of thestaterecord component.Returns the successful result when the task completed.final StringtoString()Returns a string representation of this record class.Returns the value of theupdatedAtrecord component.
-
Constructor Details
-
TaskStatus
public TaskStatus(TaskRef ref, TaskState state, TaskProgress progress, TaskLease lease, TaskResult result, TaskFailure failure, TaskCheckpoint checkpoint, Instant updatedAt, Map<String, String> metadata) Creates immutable status metadata.
-
-
Method Details
-
currentLease
-
successfulResult
Returns the successful result when the task completed.- Returns:
- optional result
-
failedResult
Returns the failure descriptor when the task failed.- Returns:
- optional failure
-
toString
-
hashCode
-
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). -
ref
-
state
-
progress
-
lease
-
result
-
failure
-
checkpoint
Returns the value of thecheckpointrecord component.- Returns:
- the value of the
checkpointrecord component
-
updatedAt
-
metadata
-