public class DnsJavaResolver extends AbstractHostNameRemapper implements AdvancedHostResolver
AdvancedHostResolver that uses dnsjava to perform DNS lookups. This implementation provides full
cache manipulation capabilities.| Constructor and Description |
|---|
DnsJavaResolver() |
| Modifier and Type | Method and Description |
|---|---|
void |
clearDNSCache()
Clears both the positive (successful DNS lookups) and negative (failed DNS lookups) cache.
|
protected Collection<InetAddress> |
resolveHostByType(String host,
int type)
Resolves the specified host using dnsjava, retrieving addresses of the specified type.
|
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 resolveprotected Collection<InetAddress> resolveHostByType(String host, int type)
host - hostname to resolvetype - one of Type, typically Type.A (IPv4) or Type.AAAA (IPv6).Copyright © 2015. All Rights Reserved.