public class NativeResolver extends AbstractHostNameRemapper implements AdvancedHostResolver
AdvancedHostResolver that provides native JVM lookup using InetAddress.
This implementation does not provide any cache manipulation. Attempting to manipulate the DNS cache will result in a DEBUG-level
log statement and will not raise an exception. The DnsJavaResolver provides support for cache
manipulation. If you absolutely need to manipulate the native JVM DNS cache, see
NativeCacheManipulatingResolver for details.| Constructor and Description |
|---|
NativeResolver() |
| Modifier and Type | Method and Description |
|---|---|
void |
clearDNSCache()
Clears both the positive (successful DNS lookups) and negative (failed DNS lookups) cache.
|
Collection<InetAddress> |
resolveRemapped(String remappedHost)
Resolves the specified remapped host.
|
void |
setNegativeDNSCacheTimeout(int timeout,
TimeUnit timeUnit)
Sets the negative (failed DNS lookup) timeout when making DNS lookups.
|
void |
setPositiveDNSCacheTimeout(int timeout,
TimeUnit timeUnit)
Sets the positive (successful DNS lookup) timeout when making DNS lookups.
|
applyRemapping, clearHostRemappings, getHostRemappings, getOriginalHostnames, remapHost, remapHosts, removeHostRemapping, resolveclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclearHostRemappings, getHostRemappings, getOriginalHostnames, remapHost, remapHosts, removeHostRemappingresolvepublic void clearDNSCache()
AdvancedHostResolverclearDNSCache in interface AdvancedHostResolverpublic void setPositiveDNSCacheTimeout(int timeout,
TimeUnit timeUnit)
AdvancedHostResolversetPositiveDNSCacheTimeout in interface AdvancedHostResolvertimeout - maximum lookup timetimeUnit - units of the timeout valuepublic void setNegativeDNSCacheTimeout(int timeout,
TimeUnit timeUnit)
AdvancedHostResolversetNegativeDNSCacheTimeout in interface AdvancedHostResolvertimeout - maximum lookup timetimeUnit - units of the timeout valuepublic Collection<InetAddress> resolveRemapped(String remappedHost)
AbstractHostNameRemapperHostResolver.resolve(String).resolveRemapped in class AbstractHostNameRemapperremappedHost - remapped hostname to resolveCopyright © 2015. All Rights Reserved.