public static class CloudCacheService.Locator extends java.lang.Object implements java.lang.Comparable<CloudCacheService.Locator>
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(CloudCacheService.Locator other) |
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getHost()
Return the
name of the host on which this CloudCacheService.Locator is running. |
int |
getPort()
Returns the
port on which this CloudCacheService.Locator is listening. |
int |
hashCode() |
static CloudCacheService.Locator |
newLocator()
|
static CloudCacheService.Locator |
newLocator(int port)
Factory method used to construct a new
CloudCacheService.Locator running on the default host
and configured to listen on the given port. |
static CloudCacheService.Locator |
newLocator(java.lang.String host)
Factory method used to construct a new
CloudCacheService.Locator configured to run on the given host
and listening on the default port. |
static CloudCacheService.Locator |
newLocator(java.lang.String host,
int port)
Factory method used to construct a new
CloudCacheService.Locator running on the configured host
and listening on the configured port. |
static CloudCacheService.Locator |
parse(java.lang.String hostPort)
Factory method used to parse an individual
host[port] network endpoint for a Locator. |
static java.util.List<CloudCacheService.Locator> |
parseLocators(java.lang.String locators)
Factory method used to parse a
comma-delimited list of Locator network endpoints
into a List of CloudCacheService.Locator objects. |
java.lang.String |
toString() |
public static CloudCacheService.Locator newLocator()
CloudCacheService.Locator.newLocator(String, int)public static CloudCacheService.Locator newLocator(int port)
CloudCacheService.Locator running on the default host
and configured to listen on the given port.port - Integer containing the port number on which the CloudCacheService.Locator is listening.CloudCacheService.Locator running on the default host,
listening on the given port.java.lang.IllegalArgumentException - if the port is less than 0.newLocator(String, int)public static CloudCacheService.Locator newLocator(java.lang.String host)
CloudCacheService.Locator configured to run on the given host
and listening on the default port.host - String containing the name of the host on which the CloudCacheService.Locator is running.CloudCacheService.Locator running on the configured host,
listening on the default port.java.lang.IllegalArgumentException - if host is null or empty.newLocator(String, int)public static CloudCacheService.Locator newLocator(java.lang.String host, int port)
CloudCacheService.Locator running on the configured host
and listening on the configured port.host - String containing the name of the host on which the CloudCacheService.Locator is running.port - Integer containing the port number on which the CloudCacheService.Locator is listening.CloudCacheService.Locator on the configured host and port.java.lang.IllegalArgumentException - if host is null or empty,
or the port is less than 0.public static java.util.List<CloudCacheService.Locator> parseLocators(java.lang.String locators)
comma-delimited list of Locator network endpoints
into a List of CloudCacheService.Locator objects.
The comma-delimited list of Locators must be formatted as
host1[port1],host2[port2], ...,hostN[portN].locators - String containing a comma-delimited list of Locator network endpoints.List of CloudCacheService.Locator objects or an empty List
if no Locators were specified.java.lang.IllegalArgumentException - if an individual Locator host[port] is not valid.parse(String)public static CloudCacheService.Locator parse(java.lang.String hostPort)
host[port] network endpoint for a Locator.hostPort - String containing the Locator host and port to parse.CloudCacheService.Locator configured from the given String.java.lang.IllegalArgumentException - if the hostPort are not valid.parseHost(String),
parsePort(String),
newLocator(String, int)public java.lang.String getHost()
name of the host on which this CloudCacheService.Locator is running.
Defaults to localhost.name of the host on which this CloudCacheService.Locator is running.public int getPort()
port on which this CloudCacheService.Locator is listening.
Defaults to 10334.port on which this CloudCacheService.Locator is listening.public int compareTo(CloudCacheService.Locator other)
compareTo in interface java.lang.Comparable<CloudCacheService.Locator>public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object