Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
get "networkaddress.cache.ttl" and "networkaddress.cache.negative.ttl" for your environment. see java.net.InetAddress javadoc.
import sun.net.InetAddressCachePolicy;
// see: https://docs.oracle.com/javase/jp/8/api/java/net/InetAddress.html
// see: https://github.com/openjdk-mirror/jdk7u-jdk/blob/master/src/share/classes/sun/net/InetAddressCachePolicy.java
// for (Open/Oralce) JRE 7-8
// "networkaddress.cache.ttl"
println InetAddressCachePolicy.cachePolicy
// "networkaddress.cache.negative.ttl"
println InetAddressCachePolicy.negativeCachePolicy
println InetAddressCachePolicy.propertySet
println InetAddressCachePolicy.propertyNegativeSet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment