public class DefaultClusterNodes extends Object implements ClusterNodes
| Constructor and Description |
|---|
DefaultClusterNodes(ClusterNodeProperties clusterNodeProperties,
OfBizClusterNodeStore ofBizClusterNodeStore,
BuildUtilsInfo buildUtilsInfo) |
| Modifier and Type | Method and Description |
|---|---|
Set<Node> |
all()
Returns all the known nodes in a JIRA cluster.
|
protected String |
buildHostname()
We are going to evaluate if the user set a hostname in the .properties file
if that is the case then we need to use that one all over the cluster
|
Node |
current()
Returns the current cluster node in JIRA.
|
protected Long |
getCacheListenerPort() |
String |
getHostname()
Returns the IP/hostname configured to be used for this JIRA Cluster.
|
void |
reset()
Resets the cached reference to the current cluster node.
|
protected boolean |
stateHasChanged(Node node)
We validate if the state of the node has changed.
|
public DefaultClusterNodes(ClusterNodeProperties clusterNodeProperties, OfBizClusterNodeStore ofBizClusterNodeStore, BuildUtilsInfo buildUtilsInfo)
public Node current()
ClusterNodescurrent in interface ClusterNodesNode.isClustered() to see if it's part of a
cluster.public void reset()
ClusterNodesreset in interface ClusterNodespublic Set<Node> all()
ClusterNodesall in interface ClusterNodesNodes in a cluster.protected boolean stateHasChanged(Node node)
1) if the node is in offline state in the db, and we are initializing it. 2) if the node has a different IP address. 3) if the port of multicasting has changed
node - the nodeprotected Long getCacheListenerPort()
protected String buildHostname()
public String getHostname()
ClusterNodesgetHostname in interface ClusterNodesNetworkUtils.getLocalHostName()Copyright © 2002-2017 Atlassian. All Rights Reserved.