Package io.microraft

Enum MembershipChangeMode

java.lang.Object
java.lang.Enum<MembershipChangeMode>
io.microraft.MembershipChangeMode
All Implemented Interfaces:
Serializable, Comparable<MembershipChangeMode>, java.lang.constant.Constable

public enum MembershipChangeMode extends Enum<MembershipChangeMode>
Types of membership changes that occur on Raft groups.
  • Enum Constant Details

    • ADD_LEARNER

      public static final MembershipChangeMode ADD_LEARNER
      Denotes that a new Raft endpoint will be added to the Raft group as a RaftRole.LEARNER. The quorum size of the Raft group will not change after the new Raft endpoint is added, since the number of voting members stays the same. Once the new Raft endpoint catches up with the leader, it can be promoted to the voting member role via ADD_OR_PROMOTE_TO_FOLLOWER.
    • ADD_OR_PROMOTE_TO_FOLLOWER

      public static final MembershipChangeMode ADD_OR_PROMOTE_TO_FOLLOWER
      Denotes that either a new Raft endpoint will be added to the Raft group as a RaftRole.FOLLOWER, or an existing (i.e., RaftRole.LEARNER Raft endpoint in the Raft group will be promoted to the RaftRole.FOLLOWER role. The quorum size of the Raft group is re-calculated based on the new number of voting members.
    • REMOVE_MEMBER

      public static final MembershipChangeMode REMOVE_MEMBER
      Denotes that a Raft endpoint will be removed from the Raft group.
  • Method Details

    • values

      public static MembershipChangeMode[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static MembershipChangeMode valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
      NullPointerException - if the argument is null