Interface ClusterManager

All Superinterfaces:
ClusterInfo
All Known Implementing Classes:
DefaultClusterManager

public interface ClusterManager extends ClusterInfo
Manages the cluster - addition of nodes, removal, etc
Since:
v6.1
  • Field Details

  • Method Details

    • checkIndexOnStart

      void checkIndexOnStart()
      Ensures that any local Jira indexes are ready for the start of Jira (for example, issue and shared entity indexes).
    • isActive

      boolean isActive()
    • getAllNodes

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

      Set<NodeStatus> getAllNodeStatuses()
    • isClusterLicensed

      @Deprecated boolean isClusterLicensed()
      Deprecated.
      since 9.14 would always return true.
      Returns whether or not JIRA is licensed for clustered configurations.
      Returns:
      whether or not JIRA is licensed for clustered configurations.
      Since:
      6.3
    • requestCurrentIndexFromNode

      @Internal void requestCurrentIndexFromNode(String node)
      Platform-specific method intended for the Lucene search platform only. We send a message to the node we wish a copy from. Jira Search exposes a common API backed by multiple search engines. This method bypasses that abstraction and couples callers to Lucene internals. Using this method when the runtime search platform is not Lucene (e.g. OpenSearch) may produce incorrect results or failures. Internal use only.
      Parameters:
      node - Node to send the message to get an Index Copy from.
    • findLiveNodes

      Collection<Node> findLiveNodes()
      Returns a snapshot of the live nodes. This collection is refreshed in every heartbeat of the server. Or you can force it calling refreshLiveNodes()
      Returns:
      the list of nodes that are alive.
    • refreshLiveNodes

      void refreshLiveNodes()
      Merges the information from the heartbeat table and the clusternode table to give accurate information of which nodes are alive.
      Since:
      6.3.4
    • removeIfOffline

      void removeIfOffline(@NotNull @NotNull String nodeId) throws ClusterStateException
      Remove node from cluster if node is Node.NodeState.OFFLINE
      Throws:
      ClusterStateException - if node is not offline
      Since:
      v8.1
    • removeOfflineNodesIfOlderThan

      List<String> removeOfflineNodesIfOlderThan(@NotNull @NotNull Duration retentionPeriod)
      Remove node from cluster if node is in Node.NodeState.OFFLINE state for specified retention period
      Since:
      v8.10
    • moveToOffline

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

      List<String> moveNodesToOfflineIfOlderThan(@NotNull @NotNull Duration retentionPeriod)
      Update nodes's state to Node.NodeState.OFFLINE if current node's state is Node.NodeState.ACTIVE and Not Alive for specified retention period
      Returns:
      List of nodes that was moved to Node.NodeState.OFFLINE state
      Since:
      v8.10
    • isNodeAlive

      boolean isNodeAlive(@NotNull @NotNull String nodeId)
      Returns:
      true if node is alive otherwise return false
      Since:
      v8.1
    • isNodePresent

      boolean isNodePresent(@NotNull @NotNull String id)
      Returns:
      true if node is present in cluster otherwise return false
      Since:
      v8.1
    • isNodeOffline

      boolean isNodeOffline(@NotNull @NotNull String nodeId)
      Returns:
      true if node is Node.NodeState.OFFLINE otherwise return false
      Since:
      v8.1
    • isNodeActive

      boolean isNodeActive(@NotNull @NotNull String nodeId)
      Returns:
      true if node is Node.NodeState.ACTIVE otherwise return false
      Since:
      v8.10
    • findActiveAndNotAliveNodes

      List<Node> findActiveAndNotAliveNodes()
      Returns:
      list of nodes that are Node.NodeState.ACTIVE and not alive isNodeAlive(java.lang.String)
      Since:
      v8.10
    • findOfflineNodes

      List<Node> findOfflineNodes()
      Returns:
      list of nodes that are Node.NodeState.OFFLINE
      Since:
      v8.10