public static interface NameResolverProvider.NameResolverSpec
| Modifier and Type | Method and Description |
|---|---|
NameResolverProvider.NameResolverSpec |
bindAddressSupplier(Supplier<? extends SocketAddress> bindAddressSupplier)
Set a new local address supplier that supply the address to bind to.
|
NameResolverProvider |
build()
Build a new
NameResolverProvider. |
NameResolverProvider.NameResolverSpec |
cacheMaxTimeToLive(Duration cacheMaxTimeToLive)
Sets the max time to live of the cached DNS resource records (resolution: seconds).
|
NameResolverProvider.NameResolverSpec |
cacheMinTimeToLive(Duration cacheMinTimeToLive)
Sets the min time to live of the cached DNS resource records (resolution: seconds).
|
NameResolverProvider.NameResolverSpec |
cacheNegativeTimeToLive(Duration cacheNegativeTimeToLive)
Sets the time to live of the cache for the failed DNS queries (resolution: seconds).
|
NameResolverProvider.NameResolverSpec |
completeOncePreferredResolved(boolean enable)
If
true, the resolver notifies the returned Future as
soon as all queries for the preferred address type are complete. |
NameResolverProvider.NameResolverSpec |
datagramChannelStrategy(DnsNameResolverChannelStrategy datagramChannelStrategy)
Sets the strategy that is used to determine how a
DatagramChannel is used by the resolver for sending
queries over UDP protocol. |
NameResolverProvider.NameResolverSpec |
disableOptionalRecord(boolean disable)
Disables the automatic inclusion of an optional record that tries to hint the remote DNS server about
how much data the resolver can read per response.
|
NameResolverProvider.NameResolverSpec |
disableRecursionDesired(boolean disable)
Specifies whether this resolver has to send a DNS query with the recursion desired (RD) flag set.
|
NameResolverProvider.NameResolverSpec |
dnsAddressResolverGroupProvider(Function<DnsNameResolverBuilder,DnsAddressResolverGroup> dnsAddressResolverGroupProvider)
Sets the custom function to build the
DnsAddressResolverGroup given a DnsNameResolverBuilder. |
NameResolverProvider.NameResolverSpec |
hostsFileEntriesResolver(HostsFileEntriesResolver hostsFileEntriesResolver)
Specifies a custom
HostsFileEntriesResolver to be used for hosts file entries. |
NameResolverProvider.NameResolverSpec |
maxPayloadSize(int maxPayloadSize)
Sets the capacity of the datagram packet buffer (in bytes).
|
NameResolverProvider.NameResolverSpec |
maxQueriesPerResolve(int maxQueriesPerResolve)
Sets the maximum allowed number of DNS queries to send when resolving a host name.
|
NameResolverProvider.NameResolverSpec |
ndots(int ndots)
Sets the number of dots which must appear in a name before an initial absolute query is made.
|
NameResolverProvider.NameResolverSpec |
queryTimeout(Duration queryTimeout)
Sets the timeout of each DNS query performed by this resolver (resolution: milliseconds).
|
NameResolverProvider.NameResolverSpec |
resolveCache(DnsCache resolveCache)
Sets the resolve cache to use for DNS resolution.
|
NameResolverProvider.NameResolverSpec |
resolvedAddressTypes(ResolvedAddressTypes resolvedAddressTypes)
Sets the list of the protocol families of the address resolved.
|
NameResolverProvider.NameResolverSpec |
retryTcpOnTimeout(boolean enable)
Specifies whether this resolver will also fallback to TCP if a timeout is detected.
|
NameResolverProvider.NameResolverSpec |
roundRobinSelection(boolean enable)
Enables an
AddressResolverGroup of DnsNameResolvers that supports random selection
of destination addresses if multiple are provided by the nameserver. |
NameResolverProvider.NameResolverSpec |
runOn(EventLoopGroup eventLoopGroup)
Performs the communication with the DNS servers on the given
EventLoopGroup. |
NameResolverProvider.NameResolverSpec |
runOn(LoopResources loopResources)
Performs the communication with the DNS servers on a supplied
EventLoopGroup
from the LoopResources container. |
NameResolverProvider.NameResolverSpec |
runOn(LoopResources loopResources,
boolean preferNative)
Performs the communication with the DNS servers on a supplied
EventLoopGroup
from the LoopResources container. |
NameResolverProvider.NameResolverSpec |
searchDomains(List<String> searchDomains)
Sets the list of search domains of the resolver.
|
NameResolverProvider.NameResolverSpec |
trace(String category,
LogLevel level)
Sets a specific category and log level to be used by this resolver when generating a detailed trace
information in case of resolution failure.
|
NameResolverProvider.NameResolverSpec bindAddressSupplier(Supplier<? extends SocketAddress> bindAddressSupplier)
bindAddressSupplier - A supplier of local address to bind tothisNameResolverProvider build()
NameResolverProvider.NameResolverProviderNameResolverProvider.NameResolverSpec cacheMaxTimeToLive(Duration cacheMaxTimeToLive)
Build#DEFAULT_CACHE_MAX_TIME_TO_LIVE.cacheMaxTimeToLive - the maximum time to live (resolution: seconds)thisNameResolverProvider.NameResolverSpec cacheMinTimeToLive(Duration cacheMinTimeToLive)
Build#DEFAULT_CACHE_MIN_TIME_TO_LIVE.cacheMinTimeToLive - the minimum time to live (resolution: seconds)thisNameResolverProvider.NameResolverSpec cacheNegativeTimeToLive(Duration cacheNegativeTimeToLive)
Build#DEFAULT_CACHE_NEGATIVE_TIME_TO_LIVE.cacheNegativeTimeToLive - the time to live of the cache for the failed
DNS queries (resolution: seconds)thisNameResolverProvider.NameResolverSpec completeOncePreferredResolved(boolean enable)
true, the resolver notifies the returned Future as
soon as all queries for the preferred address type are complete.
If false, the resolver notifies the returned Future when
all possible address types are complete.
This configuration is applicable for SimpleNameResolver.resolveAll(String).
By default, this is enabled.enable - true to enable, false to disablethisNameResolverProvider.NameResolverSpec datagramChannelStrategy(DnsNameResolverChannelStrategy datagramChannelStrategy)
DatagramChannel is used by the resolver for sending
queries over UDP protocol.
Default to DnsNameResolverChannelStrategy.ChannelPerResolverdatagramChannelStrategy - the DnsNameResolverChannelStrategy to use when doing queries over UDP protocolthisNameResolverProvider.NameResolverSpec disableOptionalRecord(boolean disable)
disable - true if an optional record is not includedthisNameResolverProvider.NameResolverSpec disableRecursionDesired(boolean disable)
disable - true if RD flag is not setthisNameResolverProvider.NameResolverSpec dnsAddressResolverGroupProvider(Function<DnsNameResolverBuilder,DnsAddressResolverGroup> dnsAddressResolverGroupProvider)
DnsAddressResolverGroup given a DnsNameResolverBuilder.dnsAddressResolverGroupProvider - the DnsAddressResolverGroup provider functionthisNameResolverProvider.NameResolverSpec hostsFileEntriesResolver(HostsFileEntriesResolver hostsFileEntriesResolver)
HostsFileEntriesResolver to be used for hosts file entries.
Default to DefaultHostsFileEntriesResolver.hostsFileEntriesResolver - the HostsFileEntriesResolver to be used for hosts file entriesthisNameResolverProvider.NameResolverSpec maxPayloadSize(int maxPayloadSize)
Build#DEFAULT_MAX_PAYLOAD_SIZE.maxPayloadSize - the capacity of the datagram packet bufferthisIllegalArgumentException - if maxPayloadSize is not positiveNameResolverProvider.NameResolverSpec maxQueriesPerResolve(int maxQueriesPerResolve)
Build#DEFAULT_MAX_QUERIES_PER_RESOLVE.maxQueriesPerResolve - the max number of queriesthisIllegalArgumentException - if maxQueriesPerResolve is not positiveNameResolverProvider.NameResolverSpec ndots(int ndots)
Build#DEFAULT_NDOTS which determines the value from the OS on Unix
or uses the value 1.ndots - the ndots valuethisIllegalArgumentException - if ndots is less than -1NameResolverProvider.NameResolverSpec queryTimeout(Duration queryTimeout)
Build#DEFAULT_QUERY_TIMEOUT.queryTimeout - the query timeout (resolution: milliseconds)thisNameResolverProvider.NameResolverSpec resolveCache(DnsCache resolveCache)
resolveCache - the resolution DNS cachethisNameResolverProvider.NameResolverSpec resolvedAddressTypes(ResolvedAddressTypes resolvedAddressTypes)
resolvedAddressTypes - the address typesthisNameResolverProvider.NameResolverSpec retryTcpOnTimeout(boolean enable)
enable - if true this resolver will also fallback to TCP if a timeout is detected,
if false the resolver will only try to use TCP if the response is marked as truncated.thisNameResolverProvider.NameResolverSpec roundRobinSelection(boolean enable)
AddressResolverGroup of DnsNameResolvers that supports random selection
of destination addresses if multiple are provided by the nameserver.
See RoundRobinDnsAddressResolverGroup.
Default to DnsAddressResolverGroup.enable - true to enable, false to disablethisNameResolverProvider.NameResolverSpec runOn(EventLoopGroup eventLoopGroup)
EventLoopGroup.eventLoopGroup - the EventLoopGroupthisNameResolverProvider.NameResolverSpec runOn(LoopResources loopResources)
EventLoopGroup
from the LoopResources container.
Will prefer native (epoll/kqueue) implementation if available
unless the environment property reactor.netty.native is set to false.loopResources - the LoopResourcesthisNameResolverProvider.NameResolverSpec runOn(LoopResources loopResources, boolean preferNative)
EventLoopGroup
from the LoopResources container.loopResources - the LoopResourcespreferNative - should prefer running on epoll or kqueue instead of java NIOthisNameResolverProvider.NameResolverSpec searchDomains(List<String> searchDomains)
searchDomains - the search domainsthisNameResolverProvider.NameResolverSpec trace(String category, LogLevel level)
category - the logger categorylevel - the logger levelthis