Package io.netty.resolver.dns
Class DnsResolveContext.RedirectAuthoritativeDnsServerCache
java.lang.Object
io.netty.resolver.dns.DnsResolveContext.RedirectAuthoritativeDnsServerCache
- All Implemented Interfaces:
AuthoritativeDnsServerCache
- Enclosing class:
DnsResolveContext<T>
private static final class DnsResolveContext.RedirectAuthoritativeDnsServerCache
extends Object
implements AuthoritativeDnsServerCache
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRedirectAuthoritativeDnsServerCache
(AuthoritativeDnsServerCache authoritativeDnsServerCache) -
Method Summary
Modifier and TypeMethodDescriptionvoid
cache
(String hostname, InetSocketAddress address, long originalTtl, EventLoop loop) Caches a nameserver that should be used to resolve the given hostname.void
clear()
Clears all cached nameservers.boolean
Clears the cached nameservers for the specified hostname.Returns the cached nameservers that should be used to resolve the given hostname.
-
Field Details
-
wrapped
-
-
Constructor Details
-
RedirectAuthoritativeDnsServerCache
RedirectAuthoritativeDnsServerCache(AuthoritativeDnsServerCache authoritativeDnsServerCache)
-
-
Method Details
-
get
Description copied from interface:AuthoritativeDnsServerCache
Returns the cached nameservers that should be used to resolve the given hostname. The returnedDnsServerAddressStream
may contain unresolvedInetSocketAddress
es that will be resolved when needed while resolving other domain names.- Specified by:
get
in interfaceAuthoritativeDnsServerCache
- Parameters:
hostname
- the hostname- Returns:
- the cached entries or an
null
if none.
-
cache
Description copied from interface:AuthoritativeDnsServerCache
Caches a nameserver that should be used to resolve the given hostname.- Specified by:
cache
in interfaceAuthoritativeDnsServerCache
- Parameters:
hostname
- the hostnameaddress
- the nameserver address (which may be unresolved).originalTtl
- the TTL as returned by the DNS serverloop
- theEventLoop
used to register the TTL timeout
-
clear
public void clear()Description copied from interface:AuthoritativeDnsServerCache
Clears all cached nameservers.- Specified by:
clear
in interfaceAuthoritativeDnsServerCache
- See Also:
-
clear
Description copied from interface:AuthoritativeDnsServerCache
Clears the cached nameservers for the specified hostname.- Specified by:
clear
in interfaceAuthoritativeDnsServerCache
- Returns:
true
if and only if there was an entry for the specified host name in the cache and it has been removed by this method
-