Class NoopAuthoritativeDnsServerCache
java.lang.Object
io.netty.resolver.dns.NoopAuthoritativeDnsServerCache
- All Implemented Interfaces:
AuthoritativeDnsServerCache
public final class NoopAuthoritativeDnsServerCache
extends Object
implements AuthoritativeDnsServerCache
A noop
AuthoritativeDnsServerCache that actually never caches anything.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidcache(String hostname, InetSocketAddress address, long originalTtl, EventLoop loop) Caches a nameserver that should be used to resolve the given hostname.voidclear()Clears all cached nameservers.booleanClears the cached nameservers for the specified hostname.Returns the cached nameservers that should be used to resolve the given hostname.
-
Field Details
-
INSTANCE
-
-
Method Details
-
get
Description copied from interface:AuthoritativeDnsServerCacheReturns the cached nameservers that should be used to resolve the given hostname. The returnedDnsServerAddressStreammay contain unresolvedInetSocketAddresses that will be resolved when needed while resolving other domain names.- Specified by:
getin interfaceAuthoritativeDnsServerCache- Parameters:
hostname- the hostname- Returns:
- the cached entries or an
nullif none.
-
cache
Description copied from interface:AuthoritativeDnsServerCacheCaches a nameserver that should be used to resolve the given hostname.- Specified by:
cachein interfaceAuthoritativeDnsServerCache- Parameters:
hostname- the hostnameaddress- the nameserver address (which may be unresolved).originalTtl- the TTL as returned by the DNS serverloop- theEventLoopused to register the TTL timeout
-
clear
public void clear()Description copied from interface:AuthoritativeDnsServerCacheClears all cached nameservers.- Specified by:
clearin interfaceAuthoritativeDnsServerCache- See Also:
-
clear
Description copied from interface:AuthoritativeDnsServerCacheClears the cached nameservers for the specified hostname.- Specified by:
clearin interfaceAuthoritativeDnsServerCache- Returns:
trueif and only if there was an entry for the specified host name in the cache and it has been removed by this method
-