com.atlassian.jira.cluster
Class Node

java.lang.Object
  extended by com.atlassian.jira.cluster.Node

@Immutable
public class Node
extends Object

Represents a node in the cluster

Since:
v6.1

Nested Class Summary
static class Node.NodeState
           
 
Field Summary
static Node NOT_CLUSTERED
          Special node that is used when JIRA is not configured for clustering.
 
Constructor Summary
Node(String nodeId, Node.NodeState state)
          This constructor is used wherever the timestamp is not needed at all.
Node(String nodeId, Node.NodeState state, Long timestamp, String ip, Long cacheListenerPort)
          Creates a representation of a node.
 
Method Summary
 boolean equals(Object o)
           
 Long getCacheListenerPort()
           
 String getIp()
           
 String getNodeId()
           
 Node.NodeState getState()
           
 Long getTimestamp()
           
 int hashCode()
           
 boolean isClustered()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NOT_CLUSTERED

public static Node NOT_CLUSTERED
Special node that is used when JIRA is not configured for clustering.

Constructor Detail

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 blank
state - 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 blank
state - the node's initial state, which must not be null
Throws:
IllegalArgumentException - if the nodeId or state is not allowed
Method Detail

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.