public class DefaultClusterNodes extends Object implements ClusterNodes
Constructor and Description |
---|
DefaultClusterNodes(ClusterNodeProperties clusterNodeProperties,
OfBizClusterNodeStore ofBizClusterNodeStore) |
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)
public Node current()
ClusterNodes
current
in interface ClusterNodes
Node.isClustered()
to see if it's part of a
cluster.public void reset()
ClusterNodes
reset
in interface ClusterNodes
public Set<Node> all()
ClusterNodes
all
in interface ClusterNodes
Node
s 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()
ClusterNodes
getHostname
in interface ClusterNodes
NetworkUtils.getLocalHostName()
Copyright © 2002-2016 Atlassian. All Rights Reserved.