com.atlassian.jira.cluster
Class DefaultClusterManager
java.lang.Object
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultClusterManager
public DefaultClusterManager(ClusterServicesRegistry clusterServicesRegistry,
NodeStateManager nodeStateManager)
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-2013 Atlassian. All Rights Reserved.