Package io.netty.resolver.dns
Interface DnsCnameCache
-
- All Known Implementing Classes:
DefaultDnsCnameCache,NoopDnsCnameCache
public interface DnsCnameCacheA cache forCNAMEs.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcache(java.lang.String hostname, java.lang.String cname, long originalTtl, EventLoop loop)Caches a cname entry that should be used for the given hostname.voidclear()Clears all cached nameservers.booleanclear(java.lang.String hostname)Clears the cached nameservers for the specified hostname.java.lang.Stringget(java.lang.String hostname)Returns the cached cname for the given hostname.
-
-
-
Method Detail
-
get
java.lang.String get(java.lang.String hostname)
Returns the cached cname for the given hostname.- Parameters:
hostname- the hostname- Returns:
- the cached entries or an
nullif none.
-
cache
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.- Parameters:
hostname- the hostnamecname- the cname mapping.originalTtl- the TTL as returned by the DNS serverloop- theEventLoopused to register the TTL timeout
-
clear
void clear()
Clears all cached nameservers.- See Also:
clear(String)
-
clear
boolean clear(java.lang.String hostname)
Clears the cached nameservers for the specified hostname.- Returns:
trueif and only if there was an entry for the specified host name in the cache and it has been removed by this method
-
-