public static enum RaftMember.Type extends Enum<RaftMember.Type>
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.
| Enum Constant and Description |
|---|
ACTIVE
Represents a full voting member of the Raft cluster which participates fully in leader election
and replication algorithms.
|
INACTIVE
Represents an inactive member.
|
PASSIVE
Represents a member which participates in asynchronous replication but does not vote in elections
or otherwise participate in the Raft consensus algorithm.
|
PROMOTABLE
Represents a non-voting member being caught up to the leader for promotion.
|
| Modifier and Type | Method and Description |
|---|---|
static RaftMember.Type |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static RaftMember.Type[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final RaftMember.Type INACTIVE
The INACTIVE member 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.
public static final RaftMember.Type PASSIVE
The PASSIVE member type is representative of a member that receives state changes from
follower nodes asynchronously. As state changes are committed via the ACTIVE Raft 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 to ACTIVE voting
members if necessary.
public static final RaftMember.Type PROMOTABLE
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.
public static final RaftMember.Type ACTIVE
The ACTIVE member 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.
public static RaftMember.Type[] values()
for (RaftMember.Type c : RaftMember.Type.values()) System.out.println(c);
public static RaftMember.Type 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 nullCopyright © 2013–2017. All rights reserved.