de.neteye.actioncache
Class AbstractCache
java.lang.Object
|
+--de.neteye.actioncache.AbstractCache
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- ActionCache
- public abstract class AbstractCache
- extends java.lang.Object
- implements java.io.Serializable
Abstract in-memory LRU cache. Lookups are performed using a HashMap.
The items are double linked to determine their order. Whenever an item
is accessed it is unlinked and re-inserted at the top of the list.
- Version:
- $Revision: 1.3 $
- Author:
- Felix Gnass
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractCache
public AbstractCache(int capacity)
createCacheItem
protected abstract CacheItem createCacheItem(java.lang.Object key)
throws java.lang.Exception
java.lang.Exception
getItem
public CacheItem getItem(java.lang.Object key)
setCapacity
public void setCapacity(int capacity)