public final class NoopDnsCnameCache extends Object implements DnsCnameCache
Modifier and Type | Field and Description |
---|---|
static NoopDnsCnameCache |
INSTANCE |
Modifier and Type | Method and Description |
---|---|
void |
cache(String hostname,
String cname,
long originalTtl,
EventLoop loop)
Caches a cname entry that should be used for the given hostname.
|
void |
clear()
Clears all cached nameservers.
|
boolean |
clear(String hostname)
Clears the cached nameservers for the specified hostname.
|
String |
get(String hostname)
Returns the cached cname for the given hostname.
|
public static final NoopDnsCnameCache INSTANCE
public String get(String hostname)
DnsCnameCache
get
in interface DnsCnameCache
hostname
- the hostnamenull
if none.public void cache(String hostname, String cname, long originalTtl, EventLoop loop)
DnsCnameCache
cache
in interface DnsCnameCache
hostname
- the hostnamecname
- the cname mapping.originalTtl
- the TTL as returned by the DNS serverloop
- the EventLoop
used to register the TTL timeoutpublic void clear()
DnsCnameCache
clear
in interface DnsCnameCache
DnsCnameCache.clear(String)
public boolean clear(String hostname)
DnsCnameCache
clear
in interface DnsCnameCache
true
if and only if there was an entry for the specified host name in the cache and
it has been removed by this methodCopyright © 2008–2024 The Netty Project. All rights reserved.