Package io.dingodb.common
Enum Class Common.RaftNodeState
- All Implemented Interfaces:
com.google.protobuf.Internal.EnumLite,com.google.protobuf.ProtocolMessageEnum,Serializable,Comparable<Common.RaftNodeState>,Constable
- Enclosing class:
- Common
public static enum Common.RaftNodeState
extends Enum<Common.RaftNodeState>
implements com.google.protobuf.ProtocolMessageEnum
RaftNodeStatus raft node's status equal to braft state in raft.hProtobuf enum
dingodb.pb.common.RaftNodeState-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionSTATE_CANDIDATE = 3;STATE_END = 9;STATE_ERROR = 5;STATE_FOLLOWER = 4;STATE_LEADER = 1;this is just a placeholderSTATE_SHUTDOWN = 8;STATE_SHUTTING = 7;STATE_TRANSFERRING = 2;STATE_UNINITIALIZED = 6; -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intSTATE_CANDIDATE = 3;static final intSTATE_END = 9;static final intSTATE_ERROR = 5;static final intSTATE_FOLLOWER = 4;static final intSTATE_LEADER = 1;static final intthis is just a placeholderstatic final intSTATE_SHUTDOWN = 8;static final intSTATE_SHUTTING = 7;static final intSTATE_TRANSFERRING = 2;static final intSTATE_UNINITIALIZED = 6; -
Method Summary
Modifier and TypeMethodDescriptionstatic Common.RaftNodeStateforNumber(int value) static final com.google.protobuf.Descriptors.EnumDescriptorfinal com.google.protobuf.Descriptors.EnumDescriptorfinal intfinal com.google.protobuf.Descriptors.EnumValueDescriptorstatic com.google.protobuf.Internal.EnumLiteMap<Common.RaftNodeState>static Common.RaftNodeStatevalueOf(int value) Deprecated.static Common.RaftNodeStatevalueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) Returns the enum constant of this class with the specified name.static Common.RaftNodeStateReturns the enum constant of this class with the specified name.static Common.RaftNodeState[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
STATE_NONE
this is just a placeholder
STATE_NONE = 0; -
STATE_LEADER
STATE_LEADER = 1; -
STATE_TRANSFERRING
STATE_TRANSFERRING = 2; -
STATE_CANDIDATE
STATE_CANDIDATE = 3; -
STATE_FOLLOWER
STATE_FOLLOWER = 4; -
STATE_ERROR
STATE_ERROR = 5; -
STATE_UNINITIALIZED
STATE_UNINITIALIZED = 6; -
STATE_SHUTTING
STATE_SHUTTING = 7; -
STATE_SHUTDOWN
STATE_SHUTDOWN = 8; -
STATE_END
STATE_END = 9; -
UNRECOGNIZED
-
-
Field Details
-
STATE_NONE_VALUE
public static final int STATE_NONE_VALUEthis is just a placeholder
STATE_NONE = 0;- See Also:
-
STATE_LEADER_VALUE
public static final int STATE_LEADER_VALUESTATE_LEADER = 1;- See Also:
-
STATE_TRANSFERRING_VALUE
public static final int STATE_TRANSFERRING_VALUESTATE_TRANSFERRING = 2;- See Also:
-
STATE_CANDIDATE_VALUE
public static final int STATE_CANDIDATE_VALUESTATE_CANDIDATE = 3;- See Also:
-
STATE_FOLLOWER_VALUE
public static final int STATE_FOLLOWER_VALUESTATE_FOLLOWER = 4;- See Also:
-
STATE_ERROR_VALUE
public static final int STATE_ERROR_VALUESTATE_ERROR = 5;- See Also:
-
STATE_UNINITIALIZED_VALUE
public static final int STATE_UNINITIALIZED_VALUESTATE_UNINITIALIZED = 6;- See Also:
-
STATE_SHUTTING_VALUE
public static final int STATE_SHUTTING_VALUESTATE_SHUTTING = 7;- See Also:
-
STATE_SHUTDOWN_VALUE
public static final int STATE_SHUTDOWN_VALUESTATE_SHUTDOWN = 8;- See Also:
-
STATE_END_VALUE
public static final int STATE_END_VALUESTATE_END = 9;- See Also:
-
-
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
-
getNumber
public final int getNumber()- Specified by:
getNumberin interfacecom.google.protobuf.Internal.EnumLite- Specified by:
getNumberin interfacecom.google.protobuf.ProtocolMessageEnum
-
valueOf
Deprecated.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:
value- 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
-
forNumber
- Parameters:
value- The numeric wire value of the corresponding enum entry.- Returns:
- The enum associated with the given numeric wire value.
-
internalGetValueMap
-
getValueDescriptor
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()- Specified by:
getValueDescriptorin interfacecom.google.protobuf.ProtocolMessageEnum
-
getDescriptorForType
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.ProtocolMessageEnum
-
getDescriptor
public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() -
valueOf
public static Common.RaftNodeState valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) 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:
desc- 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
-