|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--org.enhydra.jdbc.util.LRUCache
Simple implementation of a cache, using Least Recently Used algorithm for discarding members when the cache fills up
| Constructor Summary | |
LRUCache(int maxSize)
Constructor |
|
| Method Summary | |
protected void |
cleanupObject(java.lang.Object o)
Override this method to do special cleanup on an object, such as closing a statement or a connection |
java.lang.Object |
get(java.lang.Object key)
Gets an object from the cache. |
void |
put(java.lang.Object key,
java.lang.Object value)
Puts a new object in the cache. |
java.lang.Object |
remove(java.lang.Object key)
Removes the object from the cache and the lru list |
void |
resize(int newSize)
Resize the cache |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public LRUCache(int maxSize)
| Method Detail |
public void put(java.lang.Object key,
java.lang.Object value)
public java.lang.Object get(java.lang.Object key)
public java.lang.Object remove(java.lang.Object key)
public void resize(int newSize)
protected void cleanupObject(java.lang.Object o)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||