Package io.netty.resolver.dns
Interface DnsCnameCache
- All Known Implementing Classes:
DefaultDnsCnameCache
,NoopDnsCnameCache
public interface DnsCnameCache
A cache for
CNAME
s.-
Method Summary
Modifier and TypeMethodDescriptionvoid
Caches a cname entry that should be used for the given hostname.void
clear()
Clears all cached nameservers.boolean
Clears the cached nameservers for the specified hostname.Returns the cached cname for the given hostname.
-
Method Details
-
get
Returns the cached cname for the given hostname.- Parameters:
hostname
- the hostname- Returns:
- the cached entries or an
null
if none.
-
cache
Caches a cname entry that should be used for the given hostname.- Parameters:
hostname
- the hostnamecname
- the cname mapping.originalTtl
- the TTL as returned by the DNS serverloop
- theEventLoop
used to register the TTL timeout
-
clear
void clear()Clears all cached nameservers.- See Also:
-
clear
Clears the cached nameservers for the specified hostname.- Returns:
true
if and only if there was an entry for the specified host name in the cache and it has been removed by this method
-