public static enum Member.Type extends Enum<Member.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.
|
RESERVE
Represents a member which does not participate in replication.
|
| Modifier and Type | Method and Description |
|---|---|
static Member.Type |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Member.Type[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Member.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 Member.Type RESERVE
The RESERVE member type is representative of a member that does not participate in any
replication of state but only maintains contact with the cluster leader and is an active member
of the Cluster. Typically, reserve members act as standby nodes which can be
promoted to a PASSIVE or ACTIVE role when needed.
public static final Member.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 Member.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 Member.Type[] values()
for (Member.Type c : Member.Type.values()) System.out.println(c);
public static Member.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–2016. All rights reserved.