Modifier and Type | Field and Description |
---|---|
static NoopDnsCache |
INSTANCE |
Modifier and Type | Method and Description |
---|---|
DnsCacheEntry |
cache(String hostname,
DnsRecord[] additional,
InetAddress address,
long originalTtl,
EventLoop loop)
Create a new
DnsCacheEntry and cache a resolved address for a given hostname. |
DnsCacheEntry |
cache(String hostname,
DnsRecord[] additional,
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(String hostname)
Clears the resolved addresses of the specified host name from the cache of this resolver.
|
List<? extends DnsCacheEntry> |
get(String hostname,
DnsRecord[] additionals)
Return the cached entries for the given hostname.
|
String |
toString() |
public static final NoopDnsCache INSTANCE
public void clear()
DnsCache
clear
in interface DnsCache
DnsCache.clear(String)
public boolean clear(String hostname)
DnsCache
public List<? extends DnsCacheEntry> get(String hostname, DnsRecord[] additionals)
DnsCache
public DnsCacheEntry cache(String hostname, DnsRecord[] additional, InetAddress address, long originalTtl, EventLoop loop)
DnsCache
DnsCacheEntry
and cache a resolved address for a given hostname.cache
in interface 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(String hostname, DnsRecord[] additional, Throwable cause, EventLoop loop)
DnsCache
cache
in interface 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.Copyright © 2008–2024 The Netty Project. All rights reserved.