Enum Class Decision.Action
- All Implemented Interfaces:
Serializable, Comparable<Decision.Action>, Constable
- Enclosing class:
Decision
The step that one member takes about a role.
Example
if (decision.action() == Decision.Action.CHALLENGE) {
transport.acquireEpoch(role);
}
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThis member callsInitProducerIdnow.This member holds the role and its lease is live.This member is not in the roster of the role, so it has no rank.This member waits, and then it evaluates the role state again. -
Method Summary
Modifier and TypeMethodDescriptionstatic Decision.ActionReturns the enum constant of this class with the specified name.static Decision.Action[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NOT_REGISTERED
This member is not in the roster of the role, so it has no rank. It registers first, reads the partition again, and evaluates again. -
HOLD
This member holds the role and its lease is live. It renews the lease, and it callsInitProducerIdfor nothing. -
CHALLENGE
This member callsInitProducerIdnow. -
WAIT
This member waits, and then it evaluates the role state again.Decision.waitUntilMillis()carries the instant.
-
-
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
-