Class NameResolverProvider

java.lang.Object
reactor.netty.transport.NameResolverProvider

public final class NameResolverProvider extends Object
Since:
1.0.0
Author:
Violeta Georgieva
  • Method Details

    • builder

      public static NameResolverProvider.NameResolverSpec builder()
      Creates a builder for NameResolverProvider.
      Returns:
      a new NameResolverProvider.NameResolverSpec
    • bindAddressSupplier

      public @Nullable Supplier<? extends @Nullable SocketAddress> bindAddressSupplier()
      Returns the configured supplier of local address to bind to or null.
      Returns:
      the configured supplier of local address to bind to or null
      Since:
      1.0.14
    • cacheMaxTimeToLive

      public Duration cacheMaxTimeToLive()
      Returns the configured max time to live of the cached DNS resource records.
      Returns:
      the configured max time to live of the cached DNS resource records
    • cacheMinTimeToLive

      public Duration cacheMinTimeToLive()
      Returns the configured min time to live of the cached DNS resource records.
      Returns:
      the configured min time to live of the cached DNS resource records
    • cacheNegativeTimeToLive

      public Duration cacheNegativeTimeToLive()
      Returns the configured time to live of the cache for the failed DNS queries.
      Returns:
      the configured time to live of the cache for the failed DNS queries
    • datagramChannelStrategy

      public DnsNameResolverChannelStrategy datagramChannelStrategy()
      Returns the configured custom DnsNameResolverChannelStrategy.
      Returns:
      the configured custom DnsNameResolverChannelStrategy
      Since:
      1.2.3
    • dnsAddressResolverGroupProvider

      public @Nullable Function<DnsNameResolverBuilder,DnsAddressResolverGroup> dnsAddressResolverGroupProvider()
      Returns the configured custom provider of DnsAddressResolverGroup or null.
      Returns:
      the configured custom provider of DnsAddressResolverGroup or null
      Since:
      1.1.6
    • hostsFileEntriesResolver

      public @Nullable HostsFileEntriesResolver hostsFileEntriesResolver()
      Returns the configured custom HostsFileEntriesResolver to be used for hosts file entries or null.
      Returns:
      the configured custom HostsFileEntriesResolver to be used for hosts file entries or null
      Since:
      1.0.12
    • isCompleteOncePreferredResolved

      public boolean isCompleteOncePreferredResolved()
      Returns true if the resolver notifies the returned Future as soon as all queries for the preferred address type are complete.
      Returns:
      true if the resolver notifies the returned Future as soon as all queries for the preferred address type are complete
    • isDisableOptionalRecord

      public boolean isDisableOptionalRecord()
      Returns true if an optional record inclusion is disabled.
      Returns:
      true if an optional record inclusion is disabled
    • isDisableRecursionDesired

      public boolean isDisableRecursionDesired()
      Returns true if recursion desired is disabled.
      Returns:
      true if recursion desired is disabled
    • isPreferNative

      public boolean isPreferNative()
      Returns true if prefer native event loop and channel factory (e.g. epoll, io_uring or kqueue).
      Returns:
      true if prefer native event loop and channel factory (e.g. epoll, io_uring or kqueue)
    • isRetryTcpOnTimeout

      public boolean isRetryTcpOnTimeout()
      Returns true if the resolver will also fallback to TCP if a timeout is detected.
      Returns:
      true if the resolver will also fallback to TCP if a timeout is detected
      Since:
      1.1.17
    • isRoundRobinSelection

      public boolean isRoundRobinSelection()
      Returns true if RoundRobinDnsAddressResolverGroup is in use.
      Returns:
      true if RoundRobinDnsAddressResolverGroup is in use
    • loopResources

      public @Nullable LoopResources loopResources()
      Returns the configured LoopResources or null.
      Returns:
      the configured LoopResources or null
    • maxPayloadSize

      public int maxPayloadSize()
      Returns the configured capacity of the datagram packet buffer.
      Returns:
      the configured capacity of the datagram packet buffer.
    • maxQueriesPerResolve

      public int maxQueriesPerResolve()
      Returns the configured maximum allowed number of DNS queries to send when resolving a host name.
      Returns:
      the configured maximum allowed number of DNS queries to send when resolving a host name
    • ndots

      public int ndots()
      Returns the number of dots which must appear in a name before an initial absolute query is made.
      Returns:
      the number of dots which must appear in a name before an initial absolute query is made
    • queryTimeout

      public Duration queryTimeout()
      Returns the configured timeout of each DNS query performed by this resolver.
      Returns:
      the configured timeout of each DNS query performed by this resolver
    • resolveCache

      public @Nullable DnsCache resolveCache()
      Returns the configured DNS resolver cache or null.
      Returns:
      the configured DNS resolver cache or null
      Since:
      1.0.27
    • resolvedAddressTypes

      public @Nullable ResolvedAddressTypes resolvedAddressTypes()
      Returns the configured list of the protocol families of the address resolved or null.
      Returns:
      the configured list of the protocol families of the address resolved or null
    • searchDomains

      public @Nullable Iterable<String> searchDomains()
      Returns the configured list of search domains of the resolver or null.
      Returns:
      the configured list of search domains of the resolver or null
    • equals

      public boolean equals(@Nullable Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • newNameResolverGroup

      public DnsAddressResolverGroup newNameResolverGroup(LoopResources defaultLoopResources, boolean defaultPreferNative)
      Provides a new DnsAddressResolverGroup.
      Parameters:
      defaultLoopResources - the default LoopResources when LoopResources is not specified
      Returns:
      a new DnsAddressResolverGroup