public static enum ConsensusModule.State extends Enum<ConsensusModule.State>
ConsensusModule.
These will be reflected in the ConsensusModule.Context.moduleStateCounter() counter.| Enum Constant and Description |
|---|
ACTIVE
Active state with ingress and expired timers appended to the log.
|
CLOSED
Terminal state.
|
INIT
Starting up and recovering state.
|
QUITTING
Quitting the cluster and shutting down as soon as services ack without taking a snapshot.
|
SNAPSHOT
In the process of taking a snapshot.
|
SUSPENDED
Suspended processing of ingress and expired timers.
|
TERMINATING
In the process of terminating the node.
|
| Modifier and Type | Method and Description |
|---|---|
int |
code()
Code to be stored in an
AtomicCounter for the enum value. |
static ConsensusModule.State |
find(CountersReader counters,
int clusterId)
Get the current state of the
ConsensusModule. |
static ConsensusModule.State |
get(AtomicCounter counter)
Get the
ConsensusModule.State encoded in an AtomicCounter. |
static ConsensusModule.State |
get(long code)
Get the
ConsensusModule.State corresponding to a particular code. |
static ConsensusModule.State |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ConsensusModule.State[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ConsensusModule.State INIT
public static final ConsensusModule.State ACTIVE
public static final ConsensusModule.State SUSPENDED
public static final ConsensusModule.State SNAPSHOT
public static final ConsensusModule.State QUITTING
public static final ConsensusModule.State TERMINATING
public static final ConsensusModule.State CLOSED
public static ConsensusModule.State[] values()
for (ConsensusModule.State c : ConsensusModule.State.values()) System.out.println(c);
public static ConsensusModule.State valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic final int code()
AtomicCounter for the enum value.AtomicCounter for the enum value.public static ConsensusModule.State get(AtomicCounter counter)
ConsensusModule.State encoded in an AtomicCounter.counter - to get the current state for.ConsensusModule.ClusterException - if the counter is not one of the valid values.public static ConsensusModule.State get(long code)
ConsensusModule.State corresponding to a particular code.code - representing a ConsensusModule.State.ConsensusModule.State corresponding to the provided code.ClusterException - if the code does not correspond to a valid State.public static ConsensusModule.State find(CountersReader counters, int clusterId)
ConsensusModule.counters - to search within.clusterId - to which the allocated counter belongs.Copyright © 2014-2023 Real Logic Limited. All Rights Reserved.