com.atlassian.jira.cluster
Class Node
java.lang.Object
com.atlassian.jira.cluster.Node
@Immutable
public class Node
- extends Object
Represents a node in the cluster
- Since:
- v6.1
Field Summary |
static Node |
NOT_CLUSTERED
Special node that is used when JIRA is not configured for clustering. |
NOT_CLUSTERED
public static Node NOT_CLUSTERED
- Special node that is used when JIRA is not configured for clustering.
Node
public Node(String nodeId,
Node.NodeState state,
Long timestamp,
String ip,
Long cacheListenerPort)
- Creates a representation of a node.
- Parameters:
nodeId
- the node's ID, which must be neither null
nor blankstate
- the node's initial state, which must not be null
cacheListenerPort
- the port the node will listen for new changes
- Throws:
IllegalArgumentException
- if the nodeId
or state
is not allowed
Node
public Node(String nodeId,
Node.NodeState state)
- This constructor is used wherever the timestamp is not needed at all.
- Parameters:
nodeId
- the node's ID, which must be neither null
nor blankstate
- the node's initial state, which must not be null
- Throws:
IllegalArgumentException
- if the nodeId
or state
is not allowed
getState
@Nonnull
public Node.NodeState getState()
getNodeId
@Nullable
public String getNodeId()
getTimestamp
public Long getTimestamp()
isClustered
public boolean isClustered()
getIp
public String getIp()
getCacheListenerPort
public Long getCacheListenerPort()
equals
public boolean equals(Object o)
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
Copyright © 2002-2014 Atlassian. All Rights Reserved.