public class DefaultControllerNode extends java.lang.Object implements ControllerNode
ControllerNode.State| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_PORT |
| Constructor and Description |
|---|
DefaultControllerNode(NodeId id,
IpAddress ip)
Creates a new instance with the specified id and IP address.
|
DefaultControllerNode(NodeId id,
IpAddress ip,
int tcpPort)
Creates a new instance with the specified id and IP address and TCP port.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
NodeId |
id()
Returns the instance identifier.
|
IpAddress |
ip()
Returns the IP address of the controller instance.
|
int |
tcpPort()
Returns the TCP port on which the node listens for connections.
|
java.lang.String |
toString() |
public static final int DEFAULT_PORT
public DefaultControllerNode(NodeId id, IpAddress ip)
id - instance identifierip - instance IP addresspublic NodeId id()
ControllerNodeid in interface ControllerNodepublic IpAddress ip()
ControllerNodeip in interface ControllerNodepublic int tcpPort()
ControllerNodetcpPort in interface ControllerNodepublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object