public class

DefaultClusterManager

extends Object
implements ClusterManager Startable
java.lang.Object
   ↳ com.atlassian.jira.cluster.DefaultClusterManager

Class Overview

Manages the cluster - addition of nodes, removal, etc

Summary

[Expand]
Inherited Constants
From interface com.atlassian.jira.cluster.ClusterManager
Public Constructors
DefaultClusterManager(ClusterServicesRegistry clusterServicesRegistry, NodeStateManager nodeStateManager, EventPublisher eventPublisher)
Public Methods
void checkIndex()
Forces an index check to see if it is current (or can be rebuilt from current) - if the index is too out of date request an index replica, only do this on passive nodes for now
Set<Node> getAllNodes()
Returns all the nodes in the cluster.
@Nullable String getNodeId()
boolean isActive()
Returns true if this node is active.
boolean isClusterLicensed()
Returns whether or not JIRA is licensed for clustered configurations.
boolean isClustered()
If there is a cluster.properties that appears to be valid
@EventListener void releaseNodeReindexService(IndexesRestoredEvent ev)
void requestCurrentIndexFromNode(String node)
void start()
This method wil be called after the plugin system is fully initialised and all components added to the dependency injection framework.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.cluster.ClusterManager
From interface com.atlassian.jira.extension.Startable

Public Constructors

public DefaultClusterManager (ClusterServicesRegistry clusterServicesRegistry, NodeStateManager nodeStateManager, EventPublisher eventPublisher)

Public Methods

public void checkIndex ()

Forces an index check to see if it is current (or can be rebuilt from current) - if the index is too out of date request an index replica, only do this on passive nodes for now

public 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

@Nullable public String getNodeId ()

Returns
  • node id - null if the server is not in a cluster

public boolean isActive ()

Returns true if this node is active.

Returns
  • true if this node is active.

public boolean isClusterLicensed ()

Returns whether or not JIRA is licensed for clustered configurations.

Returns
  • whether or not JIRA is licensed for clustered configurations.

public boolean isClustered ()

If there is a cluster.properties that appears to be valid

Returns
  • true if clustered

@EventListener public void releaseNodeReindexService (IndexesRestoredEvent ev)

public void requestCurrentIndexFromNode (String node)

public void start ()

This method wil be called after the plugin system is fully initialised and all components added to the dependency injection framework.