限定符和类型 | 字段和说明 |
---|---|
static NoopDnsCache |
INSTANCE |
限定符和类型 | 方法和说明 |
---|---|
DnsCacheEntry |
cache(java.lang.String hostname,
DnsRecord[] additional,
java.net.InetAddress address,
long originalTtl,
EventLoop loop)
Create a new
DnsCacheEntry and cache a resolved address for a given hostname. |
DnsCacheEntry |
cache(java.lang.String hostname,
DnsRecord[] additional,
java.lang.Throwable cause,
EventLoop loop)
Cache the resolution failure for a given hostname.
|
void |
clear()
Clears all the resolved addresses cached by this resolver.
|
boolean |
clear(java.lang.String hostname)
Clears the resolved addresses of the specified host name from the cache of this resolver.
|
java.util.List<? extends DnsCacheEntry> |
get(java.lang.String hostname,
DnsRecord[] additionals)
Return the cached entries for the given hostname.
|
java.lang.String |
toString() |
public static final NoopDnsCache INSTANCE
public void clear()
DnsCache
clear
在接口中 DnsCache
DnsCache.clear(String)
public boolean clear(java.lang.String hostname)
DnsCache
public java.util.List<? extends DnsCacheEntry> get(java.lang.String hostname, DnsRecord[] additionals)
DnsCache
public DnsCacheEntry cache(java.lang.String hostname, DnsRecord[] additional, java.net.InetAddress address, long originalTtl, EventLoop loop)
DnsCache
DnsCacheEntry
and cache a resolved address for a given hostname.cache
在接口中 DnsCache
hostname
- the hostnameadditional
- the additional recordsaddress
- the resolved addressoriginalTtl
- the TTL as returned by the DNS serverloop
- the EventLoop
used to register the TTL timeoutDnsCacheEntry
corresponding to this cache entry.public DnsCacheEntry cache(java.lang.String hostname, DnsRecord[] additional, java.lang.Throwable cause, EventLoop loop)
DnsCache
cache
在接口中 DnsCache
hostname
- the hostnameadditional
- the additional recordscause
- the resolution failureloop
- the EventLoop
used to register the TTL timeoutDnsCacheEntry
corresponding to this cache entry, or null
if this cache doesn't
support caching failed responses.public java.lang.String toString()
toString
在类中 java.lang.Object