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 java.lang.Object implements AuthoritativeDnsServerCache
-
-
Field Summary
Fields Modifier and Type Field Description private AuthoritativeDnsServerCache
wrapped
-
Constructor Summary
Constructors Constructor Description RedirectAuthoritativeDnsServerCache(AuthoritativeDnsServerCache authoritativeDnsServerCache)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cache(java.lang.String hostname, java.net.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
clear(java.lang.String hostname)
Clears the cached nameservers for the specified hostname.DnsServerAddressStream
get(java.lang.String hostname)
Returns the cached nameservers that should be used to resolve the given hostname.
-
-
-
Field Detail
-
wrapped
private final AuthoritativeDnsServerCache wrapped
-
-
Constructor Detail
-
RedirectAuthoritativeDnsServerCache
RedirectAuthoritativeDnsServerCache(AuthoritativeDnsServerCache authoritativeDnsServerCache)
-
-
Method Detail
-
get
public DnsServerAddressStream get(java.lang.String hostname)
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
public void cache(java.lang.String hostname, java.net.InetSocketAddress address, long originalTtl, EventLoop loop)
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:
AuthoritativeDnsServerCache.clear(String)
-
clear
public boolean clear(java.lang.String hostname)
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
-
-