Top Fields Constructors Methods
sun.net

public final Class InetAddressCachePolicy

extends Object
Class Inheritance
Annotations
@SuppressWarnings:removal
Imports
java.security.PrivilegedAction, .Security, java.util.concurrent.TimeUnit

Field Summary

Modifier and TypeField and Description
private static volatile int
private static final String
private static final String
private static final String
private static final String
public static final int
public static final int
private static volatile int
private static final String
private static final String
public static final int
private static boolean
private static boolean
private static volatile int

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static void
checkValue(int newPolicy, int oldPolicy)

public static int
get()

public static int
private static Integer
getProperty(String cachePolicyProp, String cachePolicyPropFallback)

public static int
public static synchronized void
setIfNotSet(int
the value in seconds for how long the lookup should be cached
newPolicy
)

Sets the cache policy for successful lookups if the user has not already specified a cache policy for it using a command-property.

public static void
setNegativeIfNotSet(int
the value in seconds for how long the lookup should be cached
newPolicy
)

Sets the cache policy for negative lookups if the user has not already specified a cache policy for it using a command-property.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

cachePolicyback to summary
private static volatile int cachePolicy
cachePolicyPropback to summary
private static final String cachePolicyProp
cachePolicyPropFallbackback to summary
private static final String cachePolicyPropFallback
cacheStalePolicyPropback to summary
private static final String cacheStalePolicyProp
cacheStalePolicyPropFallbackback to summary
private static final String cacheStalePolicyPropFallback
DEFAULT_POSITIVEback to summary
public static final int DEFAULT_POSITIVE
FOREVERback to summary
public static final int FOREVER
negativeCachePolicyback to summary
private static volatile int negativeCachePolicy
negativeCachePolicyPropback to summary
private static final String negativeCachePolicyProp
negativeCachePolicyPropFallbackback to summary
private static final String negativeCachePolicyPropFallback
NEVERback to summary
public static final int NEVER
propertyNegativeSetback to summary
private static boolean propertyNegativeSet
propertySetback to summary
private static boolean propertySet
staleCachePolicyback to summary
private static volatile int staleCachePolicy

Constructor Detail

InetAddressCachePolicyback to summary
public InetAddressCachePolicy()

Method Detail

checkValueback to summary
private static void checkValue(int newPolicy, int oldPolicy)
getback to summary
public static int get()
getNegativeback to summary
public static int getNegative()
getPropertyback to summary
private static Integer getProperty(String cachePolicyProp, String cachePolicyPropFallback)
getStaleback to summary
public static int getStale()
setIfNotSetback to summary
public static synchronized void setIfNotSet(int newPolicy)

Sets the cache policy for successful lookups if the user has not already specified a cache policy for it using a command-property.

Parameters
newPolicy:int

the value in seconds for how long the lookup should be cached

setNegativeIfNotSetback to summary
public static void setNegativeIfNotSet(int newPolicy)

Sets the cache policy for negative lookups if the user has not already specified a cache policy for it using a command-property.

Parameters
newPolicy:int

the value in seconds for how long the lookup should be cached