Enum NodeStatus
- All Implemented Interfaces:
Serializable
,Comparable<NodeStatus>
,java.lang.constant.Constable
Indicates the status of a node.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe node has been deregistered from the worker pool.The node's heartbeat is late.The node's heartbeat has not been received for long enough that it is considered lost.The node is running and its heartbeat is being received.The node has been terminated. -
Method Summary
Modifier and TypeMethodDescriptionboolean
isActive()
Returns true, if the status indicates the node is active; otherwise, false.boolean
isGone()
Returns true, if the status indicates the node has gone; otherwise, false.static NodeStatus
Returns the enum constant of this type with the specified name.static NodeStatus[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
RUNNING
The node is running and its heartbeat is being received. -
LATE
The node's heartbeat is late. -
LOST
The node's heartbeat has not been received for long enough that it is considered lost. -
DEREGISTERED
The node has been deregistered from the worker pool. -
TERMINATED
The node has been terminated.
-
-
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
-
isActive
public boolean isActive()Returns true, if the status indicates the node is active; otherwise, false.- Returns:
- true, if the status indicates the node is active; otherwise, false.
-
isGone
public boolean isGone()Returns true, if the status indicates the node has gone; otherwise, false.- Returns:
- true, if the status indicates the node has gone; otherwise, false.
-