Top Description Methods
io.netty.resolver.dns

public Interface AuthoritativeDnsServerCache

Known Direct Implementers
io.netty.resolver.dns.AuthoritativeDnsServerCacheAdapter, io.netty.resolver.dns.DefaultAuthoritativeDnsServerCache, io.netty.resolver.dns.NoopAuthoritativeDnsServerCache, io.netty.resolver.dns.DnsResolveContext.RedirectAuthoritativeDnsServerCache
Imports
io.netty.channel.EventLoop, java.net.InetSocketAddress

Cache which stores the nameservers that should be used to resolve a specific hostname.

Method Summary

Modifier and TypeMethod and Description
public void
cache(String
the hostname
hostname
,
InetSocketAddress
the nameserver address (which may be unresolved).
address
,
long
the TTL as returned by the DNS server
originalTtl
,
EventLoop
the EventLoop used to register the TTL timeout
loop
)

Caches a nameserver that should be used to resolve 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 DnsServerAddressStream

Returns:

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

Returns the cached nameservers that should be used to resolve the given hostname.

Method Detail

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

Caches a nameserver that should be used to resolve the given hostname.

Parameters
hostname:String

the hostname

address:InetSocketAddress

the nameserver address (which may be unresolved).

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

Returns the cached nameservers that should be used to resolve the given hostname. The returned DnsServerAddressStream may contain unresolved InetSocketAddresses that will be resolved when needed while resolving other domain names.

Parameters
hostname:String

the hostname

Returns:DnsServerAddressStream

the cached entries or an null if none.