Enum Class HubDefinitionFile.Policy

java.lang.Object
java.lang.Enum<HubDefinitionFile.Policy>
com.iizix.server.hub.HubDefinitionFile.Policy
All Implemented Interfaces:
Serializable, Comparable<HubDefinitionFile.Policy>, Constable
Enclosing class:
HubDefinitionFile

public static enum HubDefinitionFile.Policy extends Enum<HubDefinitionFile.Policy>
The election policy of section 4.4 (ruling H-2).
Author:
Christopher Mindus
  • Enum Constant Details

    • STICKY

      public static final HubDefinitionFile.Policy STICKY
      The principal keeps the role until it goes away. The default.
    • PRIORITY

      public static final HubDefinitionFile.Policy PRIORITY
      A principal hands over to an eligible member earlier in [members] when it starts.
  • Method Details

    • values

      public static HubDefinitionFile.Policy[] 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 HubDefinitionFile.Policy 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
    • parse

      public static HubDefinitionFile.Policy parse(String name)
      Parses a policy name, case-insensitively.
      Parameters:
      name - The name, e.g. sticky.
      Returns:
      The policy, or null when the name is neither.