Class Node

java.lang.Object
com.atlassian.jira.cluster.Node

@Immutable public class Node extends Object
Represents a node in the cluster
Since:
v6.1
  • Field Details

    • NOT_CLUSTERED

      public static Node NOT_CLUSTERED
      Special node that is used when JIRA is not configured for clustering.
  • Constructor Details

    • Node

      @Deprecated public Node(String nodeId, Node.NodeState state, Long timestamp, String ip, Long cacheListenerPort)
      Creates a representation of a node.
      Parameters:
      nodeId - the node's ID, which must be neither null nor blank
      state - the node's initial state, which must not be null
      cacheListenerPort - the port the node will listen for new changes
      Throws:
      IllegalArgumentException - if the nodeId or state is not allowed
    • Node

      public Node(String nodeId, Node.NodeState state, Long timestamp, String ip, Long cacheListenerPort, Long nodeBuildNumber, String nodeVersion)
      Creates a representation of a node.
      Parameters:
      nodeId - the node's ID, which must be neither null nor blank
      state - the node's initial state, which must not be null
      cacheListenerPort - the port the node will listen for new changes
      nodeBuildNumber - build number of the code the node is running
      Throws:
      IllegalArgumentException - if the nodeId or state is not allowed
    • Node

      public Node(String nodeId, Node.NodeState state)
      This constructor is used wherever the timestamp is not needed at all.
      Parameters:
      nodeId - the node's ID, which must be neither null nor blank
      state - the node's initial state, which must not be null
      Throws:
      IllegalArgumentException - if the nodeId or state is not allowed
  • Method Details

    • getState

      @Nonnull public Node.NodeState getState()
    • getNodeId

      @Nullable public String getNodeId()
    • getTimestamp

      public Long getTimestamp()
    • isClustered

      public boolean isClustered()
    • getIp

      public String getIp()
    • getCacheListenerPort

      public Long getCacheListenerPort()
    • getNodeBuildNumber

      public Long getNodeBuildNumber()
    • getNodeVersion

      public String getNodeVersion()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object