Enum ClusterRole

  • All Implemented Interfaces:
    Serializable, Comparable<ClusterRole>

    public enum ClusterRole
    extends Enum<ClusterRole>
    Defines the role of a server node. A coordinator role defines the node that initializes the cluster and passes on the configuration to the other nodes. A node with a member role defines a normal working node that receives the configuration from a coordinator.
    • Enum Constant Detail

      • COORDINATOR

        public static final ClusterRole COORDINATOR
    • Method Detail

      • values

        public static ClusterRole[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (ClusterRole c : ClusterRole.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static ClusterRole 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
      • getValue

        public String getValue()
      • toUrlQueryString

        public String toUrlQueryString​(String prefix)
        Convert the instance into URL query string.
        Parameters:
        prefix - prefix of the query string
        Returns:
        URL query string