Class DnsClient

java.lang.Object
org.graylog2.lookup.adapters.dnslookup.DnsClient

public class DnsClient extends Object
  • Constructor Details

    • DnsClient

      public DnsClient(long queryTimeout)
      Creates a new DNS client with the given query timeout. The request timeout will be the query timeout plus the DEFAULT_REQUEST_TIMEOUT_INCREMENT.
      Parameters:
      queryTimeout - the query timeout
      See Also:
    • DnsClient

      public DnsClient(long queryTimeout, long requestTimeout)
      Creates a new DNS client with the given query and request timeout. The query timeout is the maximum time to wait for a DNS response from a DNS server. The request timeout is the maximum time to wait for the DNS request completion. The request timeout should always be higher than the query timeout. Background: The request timeout is used to avoid blocking a thread by waiting for the DNS resolve future to complete. This can happen when the DnsNameResolver is closed, and the event loop is shut down while a resolver request is still running.
      Parameters:
      queryTimeout - the query timeout
      requestTimeout - the request timeout
  • Method Details