public final class NoopDnsCnameCache extends java.lang.Object implements DnsCnameCache
| 限定符和类型 | 字段和说明 |
|---|---|
static NoopDnsCnameCache |
INSTANCE |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
cache(java.lang.String hostname,
java.lang.String cname,
long originalTtl,
EventLoop loop)
Caches a cname entry that should be used for the given hostname.
|
void |
clear()
Clears all cached nameservers.
|
boolean |
clear(java.lang.String hostname)
Clears the cached nameservers for the specified hostname.
|
java.lang.String |
get(java.lang.String hostname)
Returns the cached cname for the given hostname.
|
public static final NoopDnsCnameCache INSTANCE
public java.lang.String get(java.lang.String hostname)
DnsCnameCacheget 在接口中 DnsCnameCachehostname - the hostnamenull if none.public void cache(java.lang.String hostname,
java.lang.String cname,
long originalTtl,
EventLoop loop)
DnsCnameCachecache 在接口中 DnsCnameCachehostname - the hostnamecname - the cname mapping.originalTtl - the TTL as returned by the DNS serverloop - the EventLoop used to register the TTL timeoutpublic void clear()
DnsCnameCacheclear 在接口中 DnsCnameCacheDnsCnameCache.clear(String)public boolean clear(java.lang.String hostname)
DnsCnameCacheclear 在接口中 DnsCnameCachetrue if and only if there was an entry for the specified host name in the cache and
it has been removed by this method