Enum Class RaftMember.Type
- All Implemented Interfaces:
Serializable,Comparable<RaftMember.Type>,Constable
- Enclosing interface:
RaftMember
The member type defines how a member interacts with the other members of the cluster and,
more importantly, how the cluster leader interacts with the member server. Members can be
promoted and demoted to alter member states. See the
specific member types for descriptions of their implications on the cluster.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionRepresents a full voting member of the Raft cluster which participates fully in leader election and replication algorithms.Represents an inactive member.Represents a member which participates in asynchronous replication but does not vote in elections or otherwise participate in the Raft consensus algorithm.Represents a non-voting member being caught up to the leader for promotion. -
Method Summary
Modifier and TypeMethodDescriptionstatic RaftMember.TypeReturns the enum constant of this class with the specified name.static RaftMember.Type[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INACTIVE
Represents an inactive member.The
INACTIVEmember type represents a member which does not participate in any communication and is not an active member of the cluster. This is typically the state of a member prior to joining or after leaving a cluster. -
PASSIVE
Represents a member which participates in asynchronous replication but does not vote in elections or otherwise participate in the Raft consensus algorithm.The
PASSIVEmember type is representative of a member that receives state changes from follower nodes asynchronously. As state changes are committed via theACTIVERaft nodes, committed state changes are asynchronously replicated by followers to passive members. This allows passive members to maintain nearly up-to-date state with minimal impact on the performance of the Raft algorithm itself, and allows passive members to be quickly promoted toACTIVEvoting members if necessary. -
PROMOTABLE
Represents a non-voting member being caught up to the leader for promotion.This state is used to replicate committed and uncommitted entries to a node in the process of being promoted to
ACTIVE. It allows a node to be caught up to the leader prior to becoming a voting member to avoid blocking the cluster. -
ACTIVE
Represents a full voting member of the Raft cluster which participates fully in leader election and replication algorithms.The
ACTIVEmember type represents a full voting member of the Raft cluster. Active members participate in the Raft leader election and replication algorithms and can themselves be elected leaders.
-
-
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
-