Interface NetAddressResolverConfiguration

All Known Subinterfaces:
BootNetAddressResolverConfiguration

public interface NetAddressResolverConfiguration

Net address resolver configuration.

Since:
1.12
Author:
Jeremy Kuhn
  • Method Summary

    Modifier and Type
    Method
    Description
    default int
    The maximum TTL of the cached DNS resource records (in seconds).
    int
    The minimum TTL of the cached DNS resource records (in seconds).
    int
    The TTL of the cache for the failed DNS queries (in seconds).
    int
    The maximum size of the cache that is used to consolidate lookups for different hostnames when in-flight.
    default boolean
    Indicates whether domain or host names should be decoded to unicode when received as defined by RFC 3492.
    default boolean
    Enables/Disables DNS name resolution.
    boolean
    Enables/Disables the automatic inclusion of an optional records that tries to give the remote DNS server a hint about how much data the resolver can read per response.
    default int
    The capacity of the datagram packet buffer (in bytes).
    default int
    The maximum allowed number of DNS queries to send when resolving an address.
    The DNS servers to use when resolving an address.
    default int
    The number of dots which must appear in a name before an initial absolute query is made.
    default long
    The timeout of each DNS query performed by this resolver (in milliseconds).
    default boolean
    Indicates whether DNS queries must be sent with the RD (recursion desired) flag set.
    boolean
    Enables/Disables rotational sequential ordering of DNS servers.
    boolean
    Enables/Disables round-robin on resolved addresses when multiple ones are returned.
    The search domains to consider when resolving an address.
  • Method Details

    • dns_enabled

      default boolean dns_enabled()

      Enables/Disables DNS name resolution.

      When set to false, the default address resolver is used.

      Defaults to true.

      Returns:
      true to enable DNS resolution, false otherwise
    • name_servers

      Set<InetSocketAddress> name_servers()

      The DNS servers to use when resolving an address.

      Returns:
      the set of DNS servers
    • rotate_servers

      boolean rotate_servers()

      Enables/Disables rotational sequential ordering of DNS servers.

      Defaults to false.

      Returns:
      true to activate rotational sequential ordering, false otherwise
    • cache_min_ttl

      int cache_min_ttl()

      The minimum TTL of the cached DNS resource records (in seconds).

      Defaults to 0

      Returns:
      the minimum TTL of the cached DNS resource records
    • cache_max_ttl

      default int cache_max_ttl()

      The maximum TTL of the cached DNS resource records (in seconds).

      Defaults to 63072000 (2 years).

      Returns:
      the maximum TTL of the cached DNS resource records
    • cache_negative_ttl

      int cache_negative_ttl()

      The TTL of the cache for the failed DNS queries (in seconds).

      When set to 0, the cache for negative results is disabled.

      Defaults to 0.

      Returns:
      the TTL of the cache for the failed DNS queries
    • max_payload_size

      default int max_payload_size()

      The capacity of the datagram packet buffer (in bytes).

      Defaults to 4096.

      Returns:
      the capacity of the datagram packet buffer
    • include_optional_records

      boolean include_optional_records()

      Enables/Disables the automatic inclusion of an optional records that tries to give the remote DNS server a hint about how much data the resolver can read per response.

      Some DNSServer may not support this and so fail to answer queries in which case this must be disabled.

      Defaults to false.

      Returns:
      true to enable the automatic inclusion of an optional records, false otherwise
    • query_timeout

      default long query_timeout()

      The timeout of each DNS query performed by this resolver (in milliseconds).

      When set to 0, query timeout is disabled.

      Defaults to 5000.

      Returns:
      the timeout of each DNS query
    • max_queries_per_resolve

      default int max_queries_per_resolve()

      The maximum allowed number of DNS queries to send when resolving an address.

      Defaults to 16.

      Returns:
      the maximum allowed number of DNS queries to send
    • recursion_desired

      default boolean recursion_desired()

      Indicates whether DNS queries must be sent with the RD (recursion desired) flag set.

      Defaults to true.

      Returns:
      true to send the RD (recursion desired) flag, false otherwise
    • search_domains

      Set<String> search_domains()

      The search domains to consider when resolving an address.

      Returns:
      the set of search domains
    • ndots

      default int ndots()

      The number of dots which must appear in a name before an initial absolute query is made.

      Defaults to 1.

      Returns:
      the number of dots
    • decode_idn

      default boolean decode_idn()

      Indicates whether domain or host names should be decoded to unicode when received as defined by RFC 3492.

      Defaults to true.

      Returns:
      true to decode domain or host names to unicode, false otherwise
    • consolidate_cache_size

      int consolidate_cache_size()

      The maximum size of the cache that is used to consolidate lookups for different hostnames when in-flight.

      If multiple lookups are done for the same hostname and still in-flight only one actual query will be made and the result will be cascaded to the others.

      When set to 0, no consolidation is performed.

      Defaults to 0.

      Returns:
      the maximum lookups to consolidate different hostnames
    • round_robin_addresses

      boolean round_robin_addresses()

      Enables/Disables round-robin on resolved addresses when multiple ones are returned.

      When set to true, the resolver returns a random address from the list of resolved addresses.

      Returns:
      true to enable round-robin on resolved addresses, false otherwise