Enum Class RaftMember.Type

java.lang.Object
java.lang.Enum<RaftMember.Type>
io.atomix.raft.cluster.RaftMember.Type
All Implemented Interfaces:
Serializable, Comparable<RaftMember.Type>, Constable
Enclosing interface:
RaftMember

public static enum RaftMember.Type extends Enum<RaftMember.Type>
Indicates how the member participates in voting and replication.

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 Details

    • INACTIVE

      public static final RaftMember.Type INACTIVE
      Represents an inactive member.

      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.

    • PASSIVE

      public static final RaftMember.Type PASSIVE
      Represents a member which participates in asynchronous replication but does not vote in elections or otherwise participate in the Raft consensus algorithm.

      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.

    • PROMOTABLE

      public static final RaftMember.Type 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

      public static final RaftMember.Type ACTIVE
      Represents a full voting member of the Raft cluster which participates fully in leader election and replication algorithms.

      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.

  • Method Details

    • values

      public static RaftMember.Type[] 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

      public static RaftMember.Type valueOf(String name)
      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 name
      NullPointerException - if the argument is null