Enum Class MeshNode.State

java.lang.Object
java.lang.Enum<MeshNode.State>
com.atlassian.bitbucket.mesh.MeshNode.State
All Implemented Interfaces:
Serializable, Comparable<MeshNode.State>, Constable
Enclosing interface:
MeshNode

public static enum MeshNode.State extends Enum<MeshNode.State>
Enumerates the possible states for a given Mesh node.
Since:
8.4
  • Enum Constant Details

    • AVAILABLE

      public static final MeshNode.State AVAILABLE
      Indicates that the node is available and that requests can be routed to it.
    • DELETING

      public static final MeshNode.State DELETING
      Indicates that the node is being removed from the cluster. All repository replicas located on the node are being migrated to other remaining nodes if there are sufficient remaining Mesh nodes.
    • DISABLED

      public static final MeshNode.State DISABLED
      Indicates that the node is disabled. All RPC requests have drained and no new requests are routed to the node. The node can be safely taken down for maintenance when it's in this state.
    • DRAINING

      public static final MeshNode.State DRAINING
      Indicates that the node is currently draining its RPC requests. This is an intermediate state between AVAILABLE and DISABLED when (temporarily) disabling a node for maintenance.
    • OFFLINE

      public static final MeshNode.State OFFLINE
      Indicates that the node is currently offline.
  • Method Details

    • values

      public static MeshNode.State[] 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 MeshNode.State 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
    • getId

      public int getId()
      Retrieves a unique identifier for this state. Unlike the enum's ordinal or name, this value will never change for a given entry.
      Returns:
      the state's unique identifier
    • getStatusMessage

      @Nonnull public String getStatusMessage()
      Retrieves the status message describing this state.
      Returns:
      the state's status message
    • fromId

      public static MeshNode.State fromId(int id)
      Retrieves the state associated with the specified ID.
      Parameters:
      id - the ID to retrieve a State for
      Returns:
      the state with the specified ID
      Throws:
      IllegalArgumentException - if no state exists with the specified ID