Top Description Fields Constructors Methods
io.netty5.resolver.dns

pack-priv final Class AuthoritativeDnsServerCacheAdapter

extends Object
implements AuthoritativeDnsServerCache
Class Inheritance
All Implemented Interfaces
io.netty5.resolver.dns.AuthoritativeDnsServerCache
Imports
io.netty5.channel.EventLoop, io.netty5.handler.codec.dns.DnsRecord, java.net.InetAddress, .InetSocketAddress, java.util.ArrayList, .List

AuthoritativeDnsServerCache implementation which delegates all operations to a wrapped DnsCache. This implementation is only present to preserve a upgrade story.

Field Summary

Modifier and TypeField and Description
private final DnsCache
private static final DnsRecord[]

Constructor Summary

AccessConstructor and Description
pack-priv

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
)

Implements io.netty5.resolver.dns.AuthoritativeDnsServerCache.cache.

Caches a nameserver that should be used to resolve the given hostname.
public void
clear()

Implements io.netty5.resolver.dns.AuthoritativeDnsServerCache.clear.

Clears all cached nameservers.
public boolean
clear(String hostname)

Implements io.netty5.resolver.dns.AuthoritativeDnsServerCache.clear.

Clears the cached nameservers for the specified hostname.
public DnsServerAddressStream
get(String
the hostname
hostname
)

Implements io.netty5.resolver.dns.AuthoritativeDnsServerCache.get.

Returns the cached nameservers that should be used to resolve the given hostname.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

cacheback to summary
private final DnsCache cache
EMPTYback to summary
private static final DnsRecord[] EMPTY

Constructor Detail

AuthoritativeDnsServerCacheAdapterback to summary
pack-priv AuthoritativeDnsServerCacheAdapter(DnsCache cache)

Method Detail

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

Implements io.netty5.resolver.dns.AuthoritativeDnsServerCache.cache.

Doc from io.netty5.resolver.dns.AuthoritativeDnsServerCache.cache.

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

Annotations
@Override
clearback to summary
public void clear()

Implements io.netty5.resolver.dns.AuthoritativeDnsServerCache.clear.

Doc from io.netty5.resolver.dns.AuthoritativeDnsServerCache.clear.

Clears all cached nameservers.

Annotations
@Override
clearback to summary
public boolean clear(String hostname)

Implements io.netty5.resolver.dns.AuthoritativeDnsServerCache.clear.

Doc from io.netty5.resolver.dns.AuthoritativeDnsServerCache.clear.

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

Annotations
@Override
getback to summary
public DnsServerAddressStream get(String hostname)

Implements io.netty5.resolver.dns.AuthoritativeDnsServerCache.get.

Doc from io.netty5.resolver.dns.AuthoritativeDnsServerCache.get.

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.

Annotations
@Override