java.net
Class InetAddress.Cache
java.lang.Object
java.net.InetAddress.Cache
- Enclosing class:
- InetAddress
- static final class InetAddress.Cache
- extends Object
A cache that manages entries based on a policy specified
at creation time.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
policy
private int policy
cache
private LinkedHashMap cache
InetAddress.Cache
public InetAddress.Cache(int policy)
- Create cache with specific policy
put
public InetAddress.Cache put(String host,
Object address)
- Add an entry to the cache. If there's already an
entry then for this host then the entry will be
replaced.
get
public InetAddress.CacheEntry get(String host)
- Query the cache for the specific host. If found then
return its CacheEntry, or null if not found.