Top Description Methods
io.netty.resolver.dns

public Interface DnsCnameCache

Known Direct Implementers
io.netty.resolver.dns.DefaultDnsCnameCache, io.netty.resolver.dns.NoopDnsCnameCache
Imports
io.netty.channel.EventLoop

A cache for CNAMEs.

Method Summary

Modifier and TypeMethod and Description
public void
cache(String
the hostname
hostname
,
String
the cname mapping.
cname
,
long
the TTL as returned by the DNS server
originalTtl
,
EventLoop
the EventLoop used to register the TTL timeout
loop
)

Caches a cname entry that should be used for the given hostname.

public void
clear()

Clears all cached nameservers.

public boolean

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
clear
(String hostname)

Clears the cached nameservers for the specified hostname.

public String

Returns:

the cached entries or an null if none.
get
(String
the hostname
hostname
)

Returns the cached cname for the given hostname.

Method Detail

cacheback to summary
public void cache(String hostname, String cname, long originalTtl, EventLoop loop)

Caches a cname entry that should be used for the given hostname.

Parameters
hostname:String

the hostname

cname:String

the cname mapping.

originalTtl:long

the TTL as returned by the DNS server

loop:EventLoop

the EventLoop used to register the TTL timeout

clearback to summary
public void clear()

Clears all cached nameservers.

See Also
clear(String)
clearback to summary
public boolean clear(String hostname)

Clears the cached nameservers for the specified hostname.

Returns:boolean

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

getback to summary
public String get(String hostname)

Returns the cached cname for the given hostname.

Parameters
hostname:String

the hostname

Returns:String

the cached entries or an null if none.