|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.Dictionary | +--java.util.Hashtable | +--org.apache.turbine.util.SequencedHashtable | +--org.apache.turbine.util.BufferCache
A fixed length object cache implementing the LRU algorithm. Convenient for buffering recently used objects.
Inner classes inherited from class java.util.Map |
java.util.Map.Entry |
Constructor Summary | |
BufferCache()
Creates a new instance with default storage buffer pre-allocated. |
|
BufferCache(int maxSize)
Creates a new instance with the specified storage buffer pre-allocated. |
Method Summary | |
java.lang.Object |
get(java.lang.Object key)
Retrieves the value associated with the provided key, freshening the sequence of the key as well. |
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
Stores the provided key/value pair, freshening its list index if the specified key already exists. |
Methods inherited from class org.apache.turbine.util.SequencedHashtable |
clear, clone, freshenSequence, get, getValue, indexOf, iterator, lastIndexOf, putAll, remove, remove, sequence, values |
Methods inherited from class java.util.Hashtable |
contains, containsKey, containsValue, elements, entrySet, equals, hashCode, isEmpty, keys, keySet, rehash, size, toString |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public BufferCache()
public BufferCache(int maxSize)
maxSize
- The maximum size of the cache.Method Detail |
public java.lang.Object put(java.lang.Object key, java.lang.Object value)
put
in class SequencedHashtable
key
- The key to the provided value.value
- The value to store.null
if none.public java.lang.Object get(java.lang.Object key)
get
in class java.util.Hashtable
key
- The key whose value to retrieve.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |