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()
ReplicationNode
getSocketAddress
in interface ReplicationNode
public boolean isQuorumAck()
public boolean isRemoved()
public void setChangeVersion(int changeVersion)
public int getChangeVersion()
public NameIdPair getNameIdPair()
public java.lang.String getName()
ReplicationNode
getName
in interface ReplicationNode
public int getNodeId()
public NodeType getType()
ReplicationNode
getType
in interface ReplicationNode
ELECTABLE
or MONITOR
public java.lang.String getHostName()
ReplicationNode
getHostName
in interface ReplicationNode
public void setHostName(java.lang.String hostName)
public int getPort()
ReplicationNode
getPort
in interface ReplicationNode
public 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.Object
public boolean equivalent(RepNodeImpl mi)
mi
- the other object in the comparisonpublic int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright (c) 2004-2012 Oracle. All rights reserved.