Class AddressUtil

  • public class AddressUtil
    extends Object
    • Constructor Detail

      • AddressUtil

        public AddressUtil()
    • Method Detail

      • parseAddress

        public static HostAndPort parseAddress​(String address,
                                               int defaultPort)
      • getAddressCacheNegativeTtl

        public static int getAddressCacheNegativeTtl​(UnknownHostException originalException)
        Fetch the security value that determines how long DNS failures are cached. Looks up the security property 'networkaddress.cache.negative.ttl'. Should that fail returns the default value used in the Oracle JVM 1.4+, which is 10 seconds.
        originalException - the host lookup that is the source of needing this lookup. maybe be null.
        positive integer number of seconds
        IllegalArgumentException - if dns failures are cached forever
        See Also: