public interface AdvancedHostResolver extends HostResolver
HostResolver. AdvancedHostResolvers should apply any remappings before attempting
to resolve the hostname in the HostResolver.resolve(String) method.| Modifier and Type | Method and Description |
|---|---|
void |
clearDNSCache()
Clears both the positive (successful DNS lookups) and negative (failed DNS lookups) cache.
|
void |
clearHostRemappings()
Removes all hostname remappings.
|
java.util.Map<java.lang.String,java.lang.String> |
getHostRemappings()
Returns all host remappings in effect.
|
java.util.Collection<java.lang.String> |
getOriginalHostnames(java.lang.String remappedHost)
Returns the original address or addresses that are remapped to the specified remappedHost.
|
void |
remapHost(java.lang.String originalHost,
java.lang.String remappedHost)
Remaps an individual host.
|
void |
remapHosts(java.util.Map<java.lang.String,java.lang.String> hostRemappings)
Replaces the host remappings in the existing list of remappings (if any) with the specified remappings.
|
void |
removeHostRemapping(java.lang.String originalHost)
Removes the specified host remapping.
|
void |
setNegativeDNSCacheTimeout(int timeout,
java.util.concurrent.TimeUnit timeUnit)
Sets the negative (failed DNS lookup) timeout when making DNS lookups.
|
void |
setPositiveDNSCacheTimeout(int timeout,
java.util.concurrent.TimeUnit timeUnit)
Sets the positive (successful DNS lookup) timeout when making DNS lookups.
|
resolvevoid remapHosts(java.util.Map<java.lang.String,java.lang.String> hostRemappings)
hostRemappings - Map of <original hostname, remapped hostname>void remapHost(java.lang.String originalHost,
java.lang.String remappedHost)
originalHost - Original host to remap. Must exactly match the requested hostname (not a domain or regular expression match).remappedHost - hostname that will replace originalHostvoid removeHostRemapping(java.lang.String originalHost)
originalHost - currently-remapped hostnamevoid clearHostRemappings()
java.util.Map<java.lang.String,java.lang.String> getHostRemappings()
<original hostname, remapped hostname>java.util.Collection<java.lang.String> getOriginalHostnames(java.lang.String remappedHost)
remappedHost - remapped hostnamevoid clearDNSCache()
void setPositiveDNSCacheTimeout(int timeout,
java.util.concurrent.TimeUnit timeUnit)
timeout - maximum lookup timetimeUnit - units of the timeout valuevoid setNegativeDNSCacheTimeout(int timeout,
java.util.concurrent.TimeUnit timeUnit)
timeout - maximum lookup timetimeUnit - units of the timeout value