|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.jcs.engine.memory.AbstractMemoryCache
Some common code for the LRU and MRU caches.
| Field Summary | |
IElementAttributes |
attr
Region Elemental Attributes, used as a default. |
protected CompositeCache |
cache
The cache region this store is associated with |
protected java.lang.String |
cacheName
|
ICompositeCacheAttributes |
cattr
Cache Attributes |
protected int |
chunkSize
|
private static org.apache.commons.logging.Log |
log
|
protected java.util.Map |
map
Map where items are stored by key |
private ShrinkerThread |
shrinker
The background memory shrinker |
protected int |
status
|
| Constructor Summary | |
AbstractMemoryCache()
Constructor for the LRUMemoryCache object |
|
| Method Summary | |
void |
dispose()
Prepares for shutdown. |
abstract ICacheElement |
get(java.io.Serializable key)
Get an item from the cache |
ICompositeCacheAttributes |
getCacheAttributes()
Returns the CacheAttributes. |
java.lang.String |
getCacheName()
Returns the cache name. |
CompositeCache |
getCompositeCache()
Gets the cache hub / region taht the MemoryCache is used by |
java.util.Set |
getGroupKeys(java.lang.String groupName)
Gets the set of keys of objects currently in the group |
java.util.Iterator |
getIterator()
Gets the iterator attribute of the LRUMemoryCache object |
abstract java.lang.Object[] |
getKeyArray()
Get an Array of the keys for all elements in the memory cache |
abstract ICacheElement |
getQuiet(java.io.Serializable key)
Get an item from the cache without effecting its order or last access time |
int |
getSize()
Returns the current cache size. |
java.lang.String |
getStats()
Returns the cache statistics. |
int |
getStatus()
Returns the cache status. |
void |
initialize(CompositeCache hub)
For post reflection creation initialization |
abstract boolean |
remove(java.io.Serializable key)
Removes an item from the cache |
void |
removeAll()
Removes all cached items from the cache. |
void |
setCacheAttributes(ICompositeCacheAttributes cattr)
Sets the CacheAttributes. |
abstract void |
update(ICacheElement ce)
Puts an item to the cache. |
void |
waterfal(ICacheElement ce)
Puts an item to the cache. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static final org.apache.commons.logging.Log log
protected java.lang.String cacheName
protected java.util.Map map
public IElementAttributes attr
public ICompositeCacheAttributes cattr
protected CompositeCache cache
protected int status
protected int chunkSize
private ShrinkerThread shrinker
| Constructor Detail |
public AbstractMemoryCache()
| Method Detail |
public void initialize(CompositeCache hub)
initialize in interface MemoryCachehub -
public abstract boolean remove(java.io.Serializable key)
throws java.io.IOException
remove in interface MemoryCachekey - Identifies item to be removed
java.io.IOException - Description of the Exception
public abstract ICacheElement get(java.io.Serializable key)
throws java.io.IOException
get in interface MemoryCachekey - Description of the Parameter
java.io.IOException - Description of the Exception
public abstract ICacheElement getQuiet(java.io.Serializable key)
throws java.io.IOException
getQuiet in interface MemoryCachekey - Description of the Parameter
java.io.IOException - Description of the Exception
public abstract void update(ICacheElement ce)
throws java.io.IOException
update in interface MemoryCachece - Description of the Parameter
java.io.IOException - Description of the Exceptionpublic abstract java.lang.Object[] getKeyArray()
getKeyArray in interface MemoryCache
public void removeAll()
throws java.io.IOException
removeAll in interface MemoryCachejava.io.IOException
public void dispose()
throws java.io.IOException
java.io.IOExceptionpublic java.lang.String getStats()
public int getSize()
getSize in interface MemoryCachepublic int getStatus()
public java.lang.String getCacheName()
public void waterfal(ICacheElement ce)
throws java.io.IOException
waterfal in interface MemoryCachece - Description of the Parameter
java.io.IOExceptionpublic java.util.Iterator getIterator()
getIterator in interface MemoryCachepublic ICompositeCacheAttributes getCacheAttributes()
getCacheAttributes in interface MemoryCachepublic void setCacheAttributes(ICompositeCacheAttributes cattr)
setCacheAttributes in interface MemoryCachecattr - The new CacheAttributes valuepublic CompositeCache getCompositeCache()
getCompositeCache in interface MemoryCachepublic java.util.Set getGroupKeys(java.lang.String groupName)
MemoryCache
getGroupKeys in interface MemoryCache
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||