com.atlassian.jira.cluster
Class DefaultClusterManager

java.lang.Object
  extended by com.atlassian.jira.cluster.DefaultClusterManager
All Implemented Interfaces:
ClusterManager

public class DefaultClusterManager
extends Object
implements ClusterManager

Manages the cluster - addition of nodes, removal, etc

Since:
v6.1

Field Summary
 
Fields inherited from interface com.atlassian.jira.cluster.ClusterManager
ALL_NODES, ANY_NODE
 
Constructor Summary
DefaultClusterManager(ClusterServicesRegistry clusterServicesRegistry, NodeStateManager nodeStateManager)
           
 
Method Summary
 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
 String getNodeId()
           
 boolean isActive()
           
 boolean isClustered()
          If there is a jira-ha.properties that appears to be valid
 void requestCurrentIndexFromNode(String node)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultClusterManager

public DefaultClusterManager(ClusterServicesRegistry clusterServicesRegistry,
                             NodeStateManager nodeStateManager)
Method Detail

getNodeId

@Nullable
public String getNodeId()
Specified by:
getNodeId in interface ClusterManager
Returns:
node id - null if the server is not in a cluster

isClustered

public boolean isClustered()
If there is a jira-ha.properties that appears to be valid

Specified by:
isClustered in interface ClusterManager
Returns:
true if clustered

isActive

public boolean isActive()
Specified by:
isActive in interface ClusterManager
Returns:
true if node is active. There is currently no way to set this - the first node that comes up in the cluster is active. If not clustered then return true.

checkIndex

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

Specified by:
checkIndex in interface ClusterManager

requestCurrentIndexFromNode

public void requestCurrentIndexFromNode(String node)
Specified by:
requestCurrentIndexFromNode in interface ClusterManager


Copyright © 2002-2014 Atlassian. All Rights Reserved.