Enum ServerState
- All Implemented Interfaces:
Serializable
,Comparable<ServerState>
Server State.
-
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 type with the specified name.static ServerState[]
values()
Returns an array containing the constants of this enum type, 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 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
-