|
|||||||||||
| 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.
This keeps a static reference to a memory shrinker clock daemon. If this region is configured to use the shrinker, the clock daemon will be setup to run the shrinker on this region.
| 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
The region name. |
ICompositeCacheAttributes |
cattr
Cache Attributes |
protected int |
chunkSize
How many to spool at a time. |
protected java.util.Map |
map
Map where items are stored by key |
protected int |
status
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. |
IStats |
getStatistics()
Returns the historical and statistical data for a region's memory cache. |
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 |
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
| 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
dispose in interface MemoryCachejava.io.IOExceptionpublic IStats getStatistics()
MemoryCache
getStatistics in interface MemoryCachepublic 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 -
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 MemoryCachegroupName -
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||