Package com.iizix.geo
Class HostNameRegionLocation
java.lang.Object
com.iizix.geo.HostNameRegionLocation
A host name and/or IP address (IPv4 or IPv6) that has region location information. The region location information is retrieved from one of the configured service providers for this purpose in the server.
- Author:
- Christopher Mindus
- Method SummaryModifier and TypeMethodDescription- booleanChecks if two region location information object are equal.Gets the InetAddress.- getHost()Gets the host name or IPv4/IPv6 address.Gets the original host name or IPv4/IPv6 address.- getInfo- (long timeout, IRegionLocationReply callback) Requests the region location information.- int- hashCode()Returns the hashCode.- toString()Creates a string representation of the instance.
- Method Details- getInfopublic RegionLocation getInfo- (long timeout, IRegionLocationReply callback) throws InterruptedException, TimeoutException Requests the region location information.- If the request already has been requested and it has a reply, with or without error, the callback - replywill not be invoked.- Parameters:
- timeout- The timeout: zero for service provider default, negative value for indefinite waiting, otherwise a timeout in milliseconds.
- callback- The callback for asynchronous requests.
- Returns:
- The RegionInfo instance or if the request already has been retrieved, or nullif request is done asynchronously and request has not yet been retrieved. The return value can be{@link RegionInfo#ERROR}if the request failed. If so, check the error with the
- Throws:
- InterruptedException- If the thread was interrupted because the service provider was disposed or somebody else interrupted the thread, only if- callbackparameter is- null.
- TimeoutException- If a timeout occurred during synchronous wait, only if- callbackparameter is- null.
 
- getHostGets the host name or IPv4/IPv6 address.- Returns:
- The host.
 
- getHostNameOrAddressGets the original host name or IPv4/IPv6 address.- Returns:
- The host name or address.
 
- getAddressGets the InetAddress.- Returns:
- The InetAddress as IPv4 or IPv6 instance.
 
- toStringCreates a string representation of the instance.
- hashCodepublic int hashCode()Returns the hashCode.
- equalsChecks if two region location information object are equal.