Spring Boot for VMware GemFire
Class CloudCacheService.Locator
java.lang.Object
org.springframework.geode.core.env.support.CloudCacheService.Locator
- All Implemented Interfaces:
Comparable<CloudCacheService.Locator>
- Enclosing class:
- CloudCacheService
public static class CloudCacheService.Locator
extends Object
implements Comparable<CloudCacheService.Locator>
-
Method Summary
Modifier and TypeMethodDescriptionintbooleangetHost()Return thenameof the host on which thisCloudCacheService.Locatoris running.intgetPort()Returns theporton which thisCloudCacheService.Locatoris listening.inthashCode()static CloudCacheService.Locatorstatic CloudCacheService.LocatornewLocator(int port) Factory method used to construct a newCloudCacheService.Locatorrunning on the defaulthostand configured to listen on the givenport.static CloudCacheService.LocatornewLocator(String host) Factory method used to construct a newCloudCacheService.Locatorconfigured to run on the givenhostand listening on the defaultport.static CloudCacheService.LocatornewLocator(String host, int port) Factory method used to construct a newCloudCacheService.Locatorrunning on the configuredhostand listening on the configuredport.static CloudCacheService.LocatorFactory method used to parse an individualhost[port]network endpoint for a Locator.static List<CloudCacheService.Locator>parseLocators(String locators) Factory method used to parse acomma-delimited list of Locator network endpointsinto aListofCloudCacheService.Locatorobjects.toString()
-
Method Details
-
newLocator
- Returns:
- a new, default
CloudCacheService.Locator. - See Also:
-
newLocator
Factory method used to construct a newCloudCacheService.Locatorrunning on the defaulthostand configured to listen on the givenport.- Parameters:
port-Integercontaining the port number on which theCloudCacheService.Locatoris listening.- Returns:
- a new
CloudCacheService.Locatorrunning on the defaulthost, listening on the givenport. - Throws:
IllegalArgumentException- if theportis less than 0.- See Also:
-
newLocator
Factory method used to construct a newCloudCacheService.Locatorconfigured to run on the givenhostand listening on the defaultport.- Parameters:
host-Stringcontaining the name of the host on which theCloudCacheService.Locatoris running.- Returns:
- a new
CloudCacheService.Locatorrunning on the configuredhost, listening on the defaultport. - Throws:
IllegalArgumentException- ifhostis null or empty.- See Also:
-
newLocator
Factory method used to construct a newCloudCacheService.Locatorrunning on the configuredhostand listening on the configuredport.- Parameters:
host-Stringcontaining the name of the host on which theCloudCacheService.Locatoris running.port-Integercontaining the port number on which theCloudCacheService.Locatoris listening.- Returns:
- a new
CloudCacheService.Locatoron the configuredhostandport. - Throws:
IllegalArgumentException- ifhostis null or empty, or theportis less than 0.
-
parseLocators
Factory method used to parse acomma-delimited list of Locator network endpointsinto aListofCloudCacheService.Locatorobjects. Thecomma-delimited list of Locatorsmust be formatted as host1[port1],host2[port2], ...,hostN[portN].- Parameters:
locators-Stringcontaining a comma-delimited list of Locator network endpoints.- Returns:
- a new
ListofCloudCacheService.Locatorobjects or an emptyListif no Locators were specified. - Throws:
IllegalArgumentException- if an individual Locatorhost[port]is not valid.- See Also:
-
parse
Factory method used to parse an individualhost[port]network endpoint for a Locator.- Parameters:
hostPort-Stringcontaining the Locator host and port to parse.- Returns:
- a new
CloudCacheService.Locatorconfigured from the givenString. - Throws:
IllegalArgumentException- if thehostPortare not valid.- See Also:
-
parseHost(String)parsePort(String)newLocator(String, int)
-
getHost
Return thenameof the host on which thisCloudCacheService.Locatoris running. Defaults to localhost.- Returns:
- the
nameof the host on which thisCloudCacheService.Locatoris running.
-
getPort
public int getPort()Returns theporton which thisCloudCacheService.Locatoris listening. Defaults to 10334.- Returns:
- the
porton which thisCloudCacheService.Locatoris listening.
-
compareTo
- Specified by:
compareToin interfaceComparable<CloudCacheService.Locator>
-
equals
-
hashCode
public int hashCode() -
toString
-