Interface DnsResolverConfig


public interface DnsResolverConfig
Configuration interface for DNS resolver settings.
  • Method Details

    • minTtl

      DnsResolverConfig minTtl(int minTtl)
      Sets the minimum TTL for DNS records. Defaults to 0.
      Parameters:
      minTtl - the minimum TTL value
      Returns:
      the DNS resolver configuration instance for chained calls
    • maxTtl

      DnsResolverConfig maxTtl(int maxTtl)
      Sets the maximum TTL for DNS records. Defaults to JDK level setting.
      Parameters:
      maxTtl - the maximum TTL value
      Returns:
      the DNS resolver configuration instance for chained calls
    • negativeTtl

      DnsResolverConfig negativeTtl(int negativeTtl)
      Sets the TTL for negative DNS responses. Defaults to JDK level setting.
      Parameters:
      negativeTtl - the negative TTL value
      Returns:
      the DNS resolver configuration instance for chained calls
    • queryTimeoutMillis

      DnsResolverConfig queryTimeoutMillis(long queryTimeoutMillis)
      Sets the query timeout in milliseconds. Defaults to the OS level setting.
      Parameters:
      queryTimeoutMillis - the timeout value in milliseconds
      Returns:
      the DNS resolver configuration instance for chained calls
    • tcpFallbackEnabled

      DnsResolverConfig tcpFallbackEnabled(boolean tcpFallbackEnabled)
      Enables or disables TCP fallback for DNS queries. Defaults to true.
      Parameters:
      tcpFallbackEnabled - true to enable TCP fallback, false to disable
      Returns:
      the DNS resolver configuration instance for chained calls
    • tcpFallbackOnTimeoutEnabled

      DnsResolverConfig tcpFallbackOnTimeoutEnabled(boolean tcpFallbackOnTimeoutEnabled)
      Enables or disables TCP fallback on timeout for DNS queries. Defaults to true.
      Parameters:
      tcpFallbackOnTimeoutEnabled - true to enable TCP fallback on timeout, false to disable
      Returns:
      the DNS resolver configuration instance for chained calls
    • ndots

      DnsResolverConfig ndots(int ndots)
      Sets the ndots value for DNS resolution. Set this to 1 to disable the use of DNS search domains. Defaults to the OS level configuration.
      Parameters:
      ndots - the ndots value
      Returns:
      the DNS resolver configuration instance for chained calls
    • searchDomains

      DnsResolverConfig searchDomains(Iterable<String> searchDomains)
      Sets the search domains for DNS resolution. Defaults to the OS level configuration.
      Parameters:
      searchDomains - collection of search domains
      Returns:
      the DNS resolver configuration instance for chained calls
    • localAddress

      DnsResolverConfig localAddress(InetSocketAddress localAddress)
      Sets the local bind address and port for DNS lookup client. By default any available port is used. This setting is mainly in cases where it's necessary to bind the DNS client to a specific address and optionally also the port.
      Parameters:
      localAddress - the socket address (address and port) to bind the DNS client to
      Returns:
      the DNS resolver configuration instance for chained calls
    • serverAddresses

      DnsResolverConfig serverAddresses(Iterable<InetSocketAddress> addresses)
      Sets the DNS server addresses to be used for DNS lookups. Defaults to the OS level configuration.
      Parameters:
      addresses - collection of DNS server socket addresses (address and port)
      Returns:
      the DNS resolver configuration instance for chained calls
    • traceEnabled

      DnsResolverConfig traceEnabled(boolean traceEnabled)
      Enable detailed trace information for resolution failure exception messages. Defaults to true.
      Parameters:
      traceEnabled - true to enable tracing, false to disable
      Returns:
      the DNS resolver configuration instance for chained calls