- java.lang.Object
-
- io.netty5.resolver.dns.NoopDnsCache
-
-
Field Summary
Fields Modifier and Type Field Description static NoopDnsCacheINSTANCE
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DnsCacheEntrycache(String hostname, DnsRecord[] additional, Throwable cause, EventLoop loop)Cache the resolution failure for a given hostname.DnsCacheEntrycache(String hostname, DnsRecord[] additional, InetAddress address, long originalTtl, EventLoop loop)Create a newDnsCacheEntryand cache a resolved address for a given hostname.voidclear()Clears all the resolved addresses cached by this resolver.booleanclear(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.StringtoString()
-
-
-
Field Detail
-
INSTANCE
public static final NoopDnsCache INSTANCE
-
-
Method Detail
-
clear
public void clear()
Description copied from interface:DnsCacheClears all the resolved addresses cached by this resolver.- Specified by:
clearin interfaceDnsCache- See Also:
DnsCache.clear(String)
-
clear
public boolean clear(String hostname)
Description copied from interface:DnsCacheClears the resolved addresses of the specified host name from the cache of this resolver.
-
get
public List<? extends DnsCacheEntry> get(String hostname, DnsRecord[] additionals)
Description copied from interface:DnsCacheReturn the cached entries for the given hostname.
-
cache
public DnsCacheEntry cache(String hostname, DnsRecord[] additional, InetAddress address, long originalTtl, EventLoop loop)
Description copied from interface:DnsCacheCreate a newDnsCacheEntryand cache a resolved address for a given hostname.- Specified by:
cachein interfaceDnsCache- Parameters:
hostname- the hostnameadditional- the additional recordsaddress- the resolved addressoriginalTtl- the TLL as returned by the DNS serverloop- theEventLoopused to register the TTL timeout- Returns:
- The
DnsCacheEntrycorresponding to this cache entry.
-
cache
public DnsCacheEntry cache(String hostname, DnsRecord[] additional, Throwable cause, EventLoop loop)
Description copied from interface:DnsCacheCache the resolution failure for a given hostname. Be aware this won't be called with timeout / cancel / transport exceptions.- Specified by:
cachein interfaceDnsCache- Parameters:
hostname- the hostnameadditional- the additional recordscause- the resolution failureloop- theEventLoopused to register the TTL timeout- Returns:
- The
DnsCacheEntrycorresponding to this cache entry, ornullif this cache doesn't support caching failed responses.
-
-