Package org.apache.maven.buildcache
Class HostnameResolver
java.lang.Object
org.apache.maven.buildcache.HostnameResolver
Resolves and caches the canonical host name of the local machine.
The lookup is performed asynchronously in a separate thread because
InetAddress.getLocalHost().getCanonicalHostName() may block for a
considerable amount of time in environments with slow or misconfigured name
resolution (for example DNS or mDNS timeouts).
To avoid delaying application processing, the caller waits only up to 1000L ms for the result. If the lookup does not complete in time or fails, the fallback value "unknown" is used instead.
The resolved value is cached after the first call to
resolve().
-
Field Summary
Fields -
Method Summary
-
Field Details
-
TIMEOUT_MS
protected static final long TIMEOUT_MS- See Also:
-
-
Method Details
-
resolve
-