Enum Class RaftRole

java.lang.Object
java.lang.Enum<RaftRole>
org.opendaylight.raft.api.RaftRole
All Implemented Interfaces:
Serializable, Comparable<RaftRole>, Constable

@NonNullByDefault public enum RaftRole extends Enum<RaftRole>
The role a server is performing in terms of its contributing towards maintaining the RAFT journal. This is a finer-grained view on RAFT than what ServerRole provices. Note that the unusual naming here is intentional to differentiate the two.
  • Enum Constant Details

    • Candidate

      public static final RaftRole Candidate
      A candidate server.
    • Follower

      public static final RaftRole Follower
      A follower server.
    • Leader

      public static final RaftRole Leader
      A leader server.
    • IsolatedLeader

      public static final RaftRole IsolatedLeader
      A leader server which cannot communicate with its peers.
    • PreLeader

      public static final RaftRole PreLeader
      The winner of a RAFT election. It is acting as a Leader, but is not known to have a persisted its authority about its ownership of the term. This uncertainty is resolved once an entry for this term is applied to the log.
  • Method Details

    • values

      public static RaftRole[] 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 RaftRole 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
    • serverRole

      public ServerRole serverRole()
      Returns the corresponding ServerRole.
      Returns:
      the corresponding ServerRole