public final class NoopAuthoritativeDnsServerCache extends java.lang.Object implements AuthoritativeDnsServerCache
AuthoritativeDnsServerCache that actually never caches anything.| 限定符和类型 | 字段和说明 |
|---|---|
static NoopAuthoritativeDnsServerCache |
INSTANCE |
| 限定符和类型 | 方法和说明 |
|---|---|
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.
|
public static final NoopAuthoritativeDnsServerCache INSTANCE
public DnsServerAddressStream get(java.lang.String hostname)
AuthoritativeDnsServerCacheDnsServerAddressStream may contain unresolved InetSocketAddresses that will be resolved
when needed while resolving other domain names.get 在接口中 AuthoritativeDnsServerCachehostname - the hostnamenull if none.public void cache(java.lang.String hostname,
java.net.InetSocketAddress address,
long originalTtl,
EventLoop loop)
AuthoritativeDnsServerCachecache 在接口中 AuthoritativeDnsServerCachehostname - the hostnameaddress - the nameserver address (which may be unresolved).originalTtl - the TTL as returned by the DNS serverloop - the EventLoop used to register the TTL timeoutpublic void clear()
AuthoritativeDnsServerCachepublic boolean clear(java.lang.String hostname)
AuthoritativeDnsServerCacheclear 在接口中 AuthoritativeDnsServerCachetrue if and only if there was an entry for the specified host name in the cache and
it has been removed by this method