|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.jcs.auxiliary.disk.AbstractDiskCache
org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCache
Disk cache that uses a RandomAccessFile with keys stored in memory. The maximum number of keys stored in memory is configurable. The disk cache tries to recycle spots on disk to limit file expansion.
| Nested Class Summary | |
class |
IndexedDiskCache.LRUMap
class for recylcing and lru |
| Field Summary | |
protected EDU.oswego.cs.dl.util.concurrent.WriterPreferenceReadWriteLock |
storageLock
use this lock to synchronize reads and writes to the underlying storage mechansism. |
| Fields inherited from class org.apache.jcs.auxiliary.disk.AbstractDiskCache |
alive, cacheEventQueue, cacheName, purgatory, purgHits |
| Fields inherited from interface org.apache.jcs.engine.behavior.ICacheType |
CACHE_HUB, DISK_CACHE, LATERAL_CACHE, REMOTE_CACHE |
| Constructor Summary | |
IndexedDiskCache(IndexedDiskCacheAttributes cattr)
Constructor for the DiskCache object |
|
| Method Summary | |
void |
doDispose()
Dispose of the disk cache in a background thread. |
protected ICacheElement |
doGet(java.io.Serializable key)
Get a value from the persistent store. |
void |
doOptimizeRealTime()
Dispose of the disk cache in a background thread. |
boolean |
doRemove(java.io.Serializable key)
Returns true if the removal was succesful; or false if there is nothing to remove. |
void |
doRemoveAll()
Remove all the items fromt he disk cache by reseting everything. |
void |
doUpdate(ICacheElement ce)
Update the disk cache. |
void |
dump()
For debugging. |
java.util.Set |
getGroupKeys(java.lang.String groupName)
Gets the set of keys of objects currently in the group |
int |
getSize()
Returns the current cache size. |
IStats |
getStatistics()
Returns the historical and statistical data for a region's auxiliary cache. |
java.lang.String |
getStats()
Gets basic stats for the disk cache. |
| Methods inherited from class org.apache.jcs.auxiliary.disk.AbstractDiskCache |
dispose, get, getCacheName, getCacheType, getStatus, remove, removeAll, update |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected EDU.oswego.cs.dl.util.concurrent.WriterPreferenceReadWriteLock storageLock
| Constructor Detail |
public IndexedDiskCache(IndexedDiskCacheAttributes cattr)
cattr - | Method Detail |
public void doUpdate(ICacheElement ce)
doUpdate in class AbstractDiskCachece - protected ICacheElement doGet(java.io.Serializable key)
AbstractDiskCache
doGet in class AbstractDiskCachekey -
AbstractDiskCache.doGet(java.io.Serializable)public java.util.Set getGroupKeys(java.lang.String groupName)
AuxiliaryCache
getGroupKeys in interface AuxiliaryCachegetGroupKeys in class AbstractDiskCachepublic boolean doRemove(java.io.Serializable key)
doRemove in class AbstractDiskCachekey -
public void doRemoveAll()
doRemoveAll in class AbstractDiskCachepublic void doDispose()
doDispose in class AbstractDiskCachepublic void doOptimizeRealTime()
public int getSize()
getSize in interface AuxiliaryCachegetSize in class AbstractDiskCacheICache.getSize()public void dump()
public java.lang.String getStats()
getStats in interface ICachegetStats in class AbstractDiskCachepublic IStats getStatistics()
AuxiliaryCache
getStatistics in interface AuxiliaryCachegetStatistics in class AbstractDiskCache
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||