public final class

InetAddressCachePolicy

extends Object
java.lang.Object
   ↳ sun.net.InetAddressCachePolicy

Summary

Constants
int DEFAULT_POSITIVE
int FOREVER
int NEVER
Public Constructors
InetAddressCachePolicy()
Public Methods
synchronized static int get()
synchronized static int getNegative()
synchronized static 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.
synchronized 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.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int DEFAULT_POSITIVE

Constant Value: 30 (0x0000001e)

public static final int FOREVER

Constant Value: -1 (0xffffffff)

public static final int NEVER

Constant Value: 0 (0x00000000)

Public Constructors

public InetAddressCachePolicy ()

Public Methods

public static synchronized int get ()

public static synchronized int getNegative ()

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 the value in seconds for how long the lookup should be cached

public static synchronized 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 the value in seconds for how long the lookup should be cached