All Examples This Package
Class examples.security.rdbmsrealm.LRUTable
java.lang.Object
|
+----examples.security.rdbmsrealm.LRUTable
- public class LRUTable
- extends Object
Class LRUTable stores values by key much like Hashtable. However,
only a configurable number of most recently used entries is
retained. Also, it is possible to store a null value and to
distinguish a cached null value from an absent entry.
- Author:
- Copyright (c) 1997-1999 by BEA Systems. All Rights Reserved.
-
LRUTable(int)
-
-
get(Object)
-
Returns a CacheResult if cached, null if absent.
-
put(Object, Object)
-
Adds a value.
-
remove(Object)
- Removes any value for that key and returns the former CacheResult
for that key.
LRUTable
public LRUTable(int max)
get
public CacheResult get(Object key)
- Returns a CacheResult if cached, null if absent. The cached
value may be null.
put
public CacheResult put(Object key,
Object value)
- Adds a value. It is considered most recently used. Returns any
CacheResult that used to be stored for the same key. If this
addition would have caused the table size to exceed its maximum,
the least recently use entry is removed.
remove
public CacheResult remove(Object key)
- Removes any value for that key and returns the former CacheResult
for that key.
All Examples This Package