Interface ClusterNodes

All Known Implementing Classes:
DefaultClusterNodes

public interface ClusterNodes
Provides access to cluster nodes.
Since:
v7.1.0
  • Method Summary

    Modifier and Type
    Method
    Description
    all()
    Returns all the known nodes in a JIRA cluster.
    Returns the current cluster node in JIRA.
    Returns the IP/hostname configured to be used for this JIRA Cluster.
    void
    moveToOffline(@NotNull String nodeId)
    Update nodes's state to OFFLINE if current state is ACTIVE and nonalive
    node(String nodeId)
     
    void
    removeIfOffline(@NotNull String nodeId)
    Remove node from cluster if node is OFFLINE
    void
    Resets the cached reference to the current cluster node.
  • Method Details

    • current

      Node current()
      Returns the current cluster node in JIRA.
      Returns:
      a non-null instance; call Node.isClustered() to see if it's part of a cluster.
    • reset

      void reset()
      Resets the cached reference to the current cluster node.
    • all

      Set<Node> all()
      Returns all the known nodes in a JIRA cluster. If not clustered this will return an empty set.
      Returns:
      a collection of Nodes in a cluster.
    • node

      @Nullable Node node(String nodeId)
      Returns:
      Node with given nodeID; note that this method may be eventually consistent
    • getHostname

      String getHostname()
      Returns the IP/hostname configured to be used for this JIRA Cluster. If none is configured, localhost is returned.
      Returns:
      The IP/hostname configured to be used for this JIRA Cluster.
      See Also:
      • NetworkUtils.getLocalHostName()
    • removeIfOffline

      void removeIfOffline(@NotNull @NotNull String nodeId) throws ClusterStateException
      Remove node from cluster if node is OFFLINE
      Throws:
      ClusterStateException - if node is not offline or we are not able to remove node
      Since:
      v8.1
    • moveToOffline

      void moveToOffline(@NotNull @NotNull String nodeId) throws ClusterStateException
      Update nodes's state to OFFLINE if current state is ACTIVE and nonalive
      Throws:
      ClusterStateException - if node is alive
      Since:
      v8.1