Enum Class ServerState
- All Implemented Interfaces:
Serializable
,Comparable<ServerState>
,Constable
Server State.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionIndicate that the server has crashed, i.e., we have already scheduled a SCP for it.WAL splitting done.Initial state.Server expired/crashed.Only server which carries meta can have this state.Indicate that the meta splitting is done. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ServerState
Returns the enum constant of this class with the specified name.static ServerState[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ONLINE
Initial state. Available. -
CRASHED
Indicate that the server has crashed, i.e., we have already scheduled a SCP for it. -
SPLITTING_META
Only server which carries meta can have this state. We will split wal for meta and then assign meta first before splitting other wals. -
SPLITTING_META_DONE
Indicate that the meta splitting is done. We need this state so that the UnassignProcedure for meta can safely quit. See the comments in UnassignProcedure.remoteCallFailed for more details. -
SPLITTING
Server expired/crashed. Currently undergoing WAL splitting. -
OFFLINE
WAL splitting done. This state will be used to tell the UnassignProcedure that it can safely quit. See the comments in UnassignProcedure.remoteCallFailed for more details.
-
-
Constructor Details
-
ServerState
private ServerState()
-
-
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
-