Enum Class Role

java.lang.Object
java.lang.Enum<Role>
org.cojen.tupl.repl.Role
All Implemented Interfaces:
Serializable, Comparable<Role>, Constable

public enum Role extends Enum<Role>
Supported membership roles.
  • Enum Constant Details

    • NORMAL

      public static final Role NORMAL
      Normal members receive replicated data, they can proxy writes, they provide consensus, and they can become the leader.
    • STANDBY

      public static final Role STANDBY
      Standby members receive replicated data, they can proxy writes, and they provide consensus. They can only become an interim leader, to permit a normal member to catch up. An interim leader doesn't accept any new writes.
    • PROXY

      public static final Role PROXY
      Proxy members receive replicated data, and they can proxy writes. They don't provide consensus, and they cannot become the leader.
    • OBSERVER

      public static final Role OBSERVER
      Observers only receive replicated data. They don't proxy writes, they don't provide consensus, and they cannot become the leader.
    • RESTORING

      public static final Role RESTORING
      A restoring member is an observer which just joined the group and is receiving a snapshot. If the restore fails, the member is automatically removed from the group.
  • Method Details

    • values

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