Enum WorkerStatus
- All Implemented Interfaces:
Serializable, Comparable<WorkerStatus>, java.lang.constant.Constable
Describes the current status of a Worker.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionDeprecated.Deprecated.only used by single allocationThe Worker's heartbeat is late.The Worker's heartbeat has not been received for long enough that the Worker is considered to have been lost.The Worker has become claimed.The Worker has been instructed to shut down.Deprecated.only used by single allocationThe Worker has become claimed and the Agent has been instructed to start the Worker.The Worker is not claimed and has been instructed to stop. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns true, if the status indicates the Worker is currently available; otherwise, false.booleanReturns true, if the status indicates the Worker is currently healthy; otherwise, false.static WorkerStatusReturns the enum constant of this type with the specified name.static WorkerStatus[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
DOING_TASK
Deprecated.only used by single allocationThe Worker has been instructed to execute a task. -
SLEEPING
Deprecated.only used by single allocationThe Worker is claimed by one or more task groups but has been instructed to sleep as no tasks are READY for it. -
STOPPED
The Worker is not claimed and has been instructed to stop. -
STARTING
The Worker has become claimed and the Agent has been instructed to start the Worker. -
BATCH_ALLOCATION
Deprecated.the valueRUNNINGis now used instead.The Worker has become claimed for batch allocation. Its status is now monitored locally to the node. -
LATE
The Worker's heartbeat is late. -
LOST
The Worker's heartbeat has not been received for long enough that the Worker is considered to have been lost. -
RUNNING
The Worker has become claimed. Its status is now monitored locally to the node. -
SHUTDOWN
The Worker has been instructed to shut down.
-
-
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
-
isAvailable
public boolean isAvailable()Returns true, if the status indicates the Worker is currently available; otherwise, false.- Returns:
- true, if the status indicates the Worker is currently available; otherwise, false
-
isHealthy
public boolean isHealthy()Returns true, if the status indicates the Worker is currently healthy; otherwise, false.- Returns:
- true, if the status indicates the Worker is currently healthy; otherwise, false
-
RUNNINGis now used instead.