Class NativeResolver

    • Constructor Detail

      • NativeResolver

        public NativeResolver()
    • Method Detail

      • setPositiveDNSCacheTimeout

        public void setPositiveDNSCacheTimeout​(int timeout,
                                               java.util.concurrent.TimeUnit timeUnit)
        Description copied from interface: AdvancedHostResolver
        Sets the positive (successful DNS lookup) timeout when making DNS lookups. Note: The timeUnit parameter does not guarantee the specified precision; implementations may need to reduce precision, depending on the underlying DNS implementation. For example, the Oracle JVM's DNS cache only supports timeouts in whole seconds, so specifying a timeout of 1200ms will result in a timeout of 1 second.
        Specified by:
        setPositiveDNSCacheTimeout in interface AdvancedHostResolver
        Parameters:
        timeout - maximum lookup time
        timeUnit - units of the timeout value
      • setNegativeDNSCacheTimeout

        public void setNegativeDNSCacheTimeout​(int timeout,
                                               java.util.concurrent.TimeUnit timeUnit)
        Description copied from interface: AdvancedHostResolver
        Sets the negative (failed DNS lookup) timeout when making DNS lookups. Note: The timeUnit parameter does not guarantee the specified precision; implementations may need to reduce precision, depending on the underlying DNS implementation. For example, the Oracle JVM's DNS cache only supports timeouts in whole seconds, so specifying a timeout of 1200ms will result in a timeout of 1 second.
        Specified by:
        setNegativeDNSCacheTimeout in interface AdvancedHostResolver
        Parameters:
        timeout - maximum lookup time
        timeUnit - units of the timeout value
      • resolveRemapped

        public java.util.Collection<java.net.InetAddress> resolveRemapped​(java.lang.String remappedHost)
        Description copied from class: AbstractHostNameRemapper
        Resolves the specified remapped host. Subclasses should provide resolution by implementing this method, rather than overriding HostResolver.resolve(String).
        Specified by:
        resolveRemapped in class AbstractHostNameRemapper
        Parameters:
        remappedHost - remapped hostname to resolve
        Returns:
        resolved InetAddresses, or an empty list if no addresses were found