Enum Class TaskStatus
- All Implemented Interfaces:
Serializable, Comparable<TaskStatus>, Constable
Lifecycle states for a distributed task submitted to a
DistributedExecutorService.
State transitions:
PENDING -> RUNNING -> COMPLETED PENDING -> RUNNING -> FAILED PENDING -> CANCELLED RUNNING -> CANCELLED RUNNING -> TIMED_OUT SCHEDULED -> PENDING -> RUNNING -> COMPLETED -> SCHEDULED (recurring) SCHEDULED -> CANCELLED
- Since:
- 2.0
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionTask was cancelled before completion.Task completed successfully; result is available.Task threw an exception during execution.Task has been submitted but not yet started execution.Task is currently executing on a virtual thread.Task is scheduled and waiting for its next execution window.Task exceeded its configured timeout. -
Method Summary
Modifier and TypeMethodDescriptionstatic TaskStatusReturns the enum constant of this class with the specified name.static TaskStatus[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SCHEDULED
Task is scheduled and waiting for its next execution window. -
PENDING
Task has been submitted but not yet started execution. -
RUNNING
Task is currently executing on a virtual thread. -
COMPLETED
Task completed successfully; result is available. -
FAILED
Task threw an exception during execution. -
CANCELLED
Task was cancelled before completion. -
TIMED_OUT
Task exceeded its configured timeout.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-