Enum TaskStatus
- All Implemented Interfaces:
Serializable
,Comparable<TaskStatus>
,java.lang.constant.Constable
Describes the status of task.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe task has been aborted whilst in progress.The task has been allocated to a worker to be executed.The task has been cancelled by the user.The task has been completed.The task will not be allocated as its task group has finished.The task inputs are being downloaded by its allocated worker.The task is being executed by its allocated worker.The task has failed.The task is waiting for resources to be verified.The task is ready to be allocated and executed.The task outputs are being uploaded by its allocated worker. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns true, if the task status indicates that the task is finished; otherwise, false.boolean
Returns true, if the task status indicates that it is currently in progress; otherwise, false.boolean
Returns true, if the task status indicates that it is waiting either for resources, or to be allocated; otherwise, false.static TaskStatus
Returns the enum constant of this type with the specified name.static TaskStatus[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
PENDING
The task is waiting for resources to be verified. -
READY
The task is ready to be allocated and executed. -
ALLOCATED
The task has been allocated to a worker to be executed. -
DOWNLOADING
The task inputs are being downloaded by its allocated worker. -
EXECUTING
The task is being executed by its allocated worker. -
UPLOADING
The task outputs are being uploaded by its allocated worker. -
COMPLETED
The task has been completed. -
FAILED
The task has failed. -
ABORTED
The task has been aborted whilst in progress. -
CANCELLED
The task has been cancelled by the user. -
DISCARDED
The task will not be allocated as its task group has finished.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- if the argument is null
-
isWaiting
public boolean isWaiting()Returns true, if the task status indicates that it is waiting either for resources, or to be allocated; otherwise, false.- Returns:
- true, if the task status indicates that it is waiting either for resources, or to be allocated; otherwise, false
-
isInProgress
public boolean isInProgress()Returns true, if the task status indicates that it is currently in progress; otherwise, false.- Returns:
- true, if the task status indicates that it is currently in progress; otherwise, false
-
isFinished
public boolean isFinished()Returns true, if the task status indicates that the task is finished; otherwise, false.- Returns:
- true, if the task status indicates that the task is finished; otherwise, false
-