Enum Class ServerRole

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

public enum ServerRole extends Enum<ServerRole>
The role this server is playing in the RAFT protocol.
  • Enum Constant Details

    • CANDIDATE

      public static final ServerRole CANDIDATE
      A candidate server.
    • FOLLOWER

      public static final ServerRole FOLLOWER
      A follower server.
    • LEADER

      public static final ServerRole LEADER
      A leader server.
  • Method Details

    • values

      public static ServerRole[] 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 ServerRole 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