public class RepNodeImpl extends java.lang.Object implements ReplicationNode
| Modifier and Type | Field and Description |
|---|---|
(package private) static int |
NULL_CHANGE |
| Constructor and Description |
|---|
RepNodeImpl(NameIdPair nameIdPair,
NodeType type,
boolean quorumAck,
boolean isRemoved,
java.lang.String hostName,
int port,
int changeVersion) |
RepNodeImpl(NameIdPair nameIdPair,
NodeType type,
boolean quorumAck,
boolean isRemoved,
java.lang.String hostName,
int port,
RepGroupImpl.BarrierState barrierState,
int changeVersion) |
RepNodeImpl(NameIdPair nameIdPair,
NodeType type,
java.lang.String hostName,
int port) |
RepNodeImpl(Protocol.NodeGroupInfo mi) |
RepNodeImpl(ReplicationConfig repConfig) |
RepNodeImpl(java.lang.String nodeName,
java.lang.String hostName,
int port) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
boolean |
equivalent(RepNodeImpl mi)
Like the equals method.
|
RepGroupImpl.BarrierState |
getBarrierState() |
int |
getChangeVersion() |
java.lang.String |
getHostName()
Returns the host name associated with the node.
|
java.lang.String |
getHostPortPair() |
java.lang.String |
getName()
Returns the unique name associated with the node.
|
NameIdPair |
getNameIdPair() |
int |
getNodeId() |
int |
getPort()
Returns the port number associated with the node.
|
java.net.InetSocketAddress |
getSocketAddress()
The socket address used by other nodes in the replication group to
communicate with this node.
|
NodeType |
getType()
Returns the type associated with the node.
|
int |
hashCode() |
boolean |
isQuorumAck() |
boolean |
isRemoved() |
RepGroupImpl.BarrierState |
setBarrierState(RepGroupImpl.BarrierState barrierState) |
void |
setChangeVersion(int changeVersion) |
void |
setHostName(java.lang.String hostName) |
void |
setPort(int port) |
void |
setQuorumAck(boolean quorumAck) |
void |
setRemoved(boolean isRemoved) |
java.lang.String |
toString() |
static final int NULL_CHANGE
public RepNodeImpl(NameIdPair nameIdPair, NodeType type, boolean quorumAck, boolean isRemoved, java.lang.String hostName, int port, RepGroupImpl.BarrierState barrierState, int changeVersion)
public RepNodeImpl(NameIdPair nameIdPair, NodeType type, boolean quorumAck, boolean isRemoved, java.lang.String hostName, int port, int changeVersion)
public RepNodeImpl(NameIdPair nameIdPair, NodeType type, java.lang.String hostName, int port)
public RepNodeImpl(ReplicationConfig repConfig)
public RepNodeImpl(java.lang.String nodeName,
java.lang.String hostName,
int port)
public RepNodeImpl(Protocol.NodeGroupInfo mi)
public java.net.InetSocketAddress getSocketAddress()
ReplicationNodegetSocketAddress in interface ReplicationNodepublic boolean isQuorumAck()
public boolean isRemoved()
public void setChangeVersion(int changeVersion)
public int getChangeVersion()
public NameIdPair getNameIdPair()
public java.lang.String getName()
ReplicationNodegetName in interface ReplicationNodepublic int getNodeId()
public NodeType getType()
ReplicationNodegetType in interface ReplicationNodeELECTABLE or MONITORpublic java.lang.String getHostName()
ReplicationNodegetHostName in interface ReplicationNodepublic void setHostName(java.lang.String hostName)
public int getPort()
ReplicationNodegetPort in interface ReplicationNodepublic void setPort(int port)
public java.lang.String getHostPortPair()
public RepGroupImpl.BarrierState getBarrierState()
public RepGroupImpl.BarrierState setBarrierState(RepGroupImpl.BarrierState barrierState)
public void setQuorumAck(boolean quorumAck)
public void setRemoved(boolean isRemoved)
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equivalent(RepNodeImpl mi)
mi - the other object in the comparisonpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.ObjectCopyright (c) 2004-2012 Oracle. All rights reserved.