|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jcs.engine.memory.AbstractMemoryCache
public abstract class 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 that 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 affecting 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 |
| Methods inherited from interface org.apache.jcs.engine.memory.behavior.IMemoryCache |
|---|
freeElements |
| 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 IMemoryCachehub -
public abstract boolean remove(java.io.Serializable key)
throws java.io.IOException
remove in interface IMemoryCachekey - 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 IMemoryCachekey - 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 IMemoryCachekey - Description of the Parameter
java.io.IOException - Description of the Exception
public abstract void update(ICacheElement ce)
throws java.io.IOException
update in interface IMemoryCachece - Description of the Parameter
java.io.IOException - Description of the Exceptionpublic abstract java.lang.Object[] getKeyArray()
getKeyArray in interface IMemoryCache
public void removeAll()
throws java.io.IOException
removeAll in interface IMemoryCachejava.io.IOException
public void dispose()
throws java.io.IOException
dispose in interface IMemoryCachejava.io.IOExceptionpublic IStats getStatistics()
IMemoryCache
getStatistics in interface IMemoryCachepublic int getSize()
getSize in interface IMemoryCachepublic int getStatus()
public java.lang.String getCacheName()
public void waterfal(ICacheElement ce)
throws java.io.IOException
waterfal in interface IMemoryCachece -
java.io.IOExceptionpublic java.util.Iterator getIterator()
getIterator in interface IMemoryCachepublic ICompositeCacheAttributes getCacheAttributes()
getCacheAttributes in interface IMemoryCachepublic void setCacheAttributes(ICompositeCacheAttributes cattr)
setCacheAttributes in interface IMemoryCachecattr - The new CacheAttributes valuepublic CompositeCache getCompositeCache()
getCompositeCache in interface IMemoryCachepublic java.util.Set getGroupKeys(java.lang.String groupName)
IMemoryCache
getGroupKeys in interface IMemoryCache
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||