Package net.spy.memcached.config
Class NodeEndPoint
java.lang.Object
net.spy.memcached.config.NodeEndPoint
NodeEndPoint captures the information needed to connect to a cache node.
Both hostName and ipAddress to capture the latest information instead of relying entirely on the DNS servers.
-
Constructor Summary
ConstructorsConstructorDescriptionNodeEndPoint(String hostName, int port) Immutable instance, without an IP address.NodeEndPoint(String hostName, String ipAddress, int port) Immutable instance with a hostname, ip address, and port. -
Method Summary
Modifier and TypeMethodDescriptionstatic NodeEndPointcopy(NodeEndPoint other) copy one object to another.getInetSocketAddress(boolean reresolve) intgetPort()toString()
-
Constructor Details
-
NodeEndPoint
Immutable instance with a hostname, ip address, and port.- Parameters:
hostName- hostname (ex. foo.bar.com)ipAddress- string form of IP address (ex. 10.10.1.1). It is expected that this IP address is valid.port- port (ex. 11211)
-
NodeEndPoint
Immutable instance, without an IP address.- Parameters:
hostName- hostname (ex. foo.bar.com).port- port (ex. 11211)
-
-
Method Details