|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jcs.auxiliary.AbstractAuxiliaryCache
org.apache.jcs.auxiliary.AbstractAuxiliaryCacheEventLogging
org.apache.jcs.auxiliary.disk.AbstractDiskCache
org.apache.jcs.auxiliary.disk.block.BlockDiskCache
public class BlockDiskCache
There is one BlockDiskCache per region. It manages the key and data store.
| Field Summary |
|---|
| Fields inherited from class org.apache.jcs.auxiliary.disk.AbstractDiskCache |
|---|
alive, cacheEventQueue, cacheName, purgatory, purgHits |
| Fields inherited from class org.apache.jcs.auxiliary.AbstractAuxiliaryCache |
|---|
cacheEventLogger, elementSerializer, keyMatcher |
| Fields inherited from interface org.apache.jcs.engine.behavior.ICacheType |
|---|
CACHE_HUB, DISK_CACHE, LATERAL_CACHE, REMOTE_CACHE |
| Constructor Summary | |
|---|---|
BlockDiskCache(BlockDiskCacheAttributes cacheAttributes)
Constructs the BlockDisk after setting up the root directory. |
|
| Method Summary | |
|---|---|
protected void |
freeBlocks(int[] blocksToFree)
Add these blocks to the emptyBlock list. |
AuxiliaryCacheAttributes |
getAuxiliaryCacheAttributes()
Returns the attributes. |
protected java.lang.String |
getDiskLocation()
This is used by the event logging. |
java.util.Set |
getGroupKeys(java.lang.String groupName)
This requires a full iteration through the keys. |
int |
getSize()
Returns the number of keys. |
IStats |
getStatistics()
Returns info about the disk cache. |
java.lang.String |
getStats()
Gets basic stats for the disk cache. |
void |
processDispose()
Dispose of the disk cache in a background thread. |
protected ICacheElement |
processGet(java.io.Serializable key)
Gets the ICacheElement for the key if it is in the cache. |
java.util.Map |
processGetMatching(java.lang.String pattern)
Gets matching items from the cache. |
protected boolean |
processRemove(java.io.Serializable key)
Returns true if the removal was succesful; or false if there is nothing to remove. |
protected void |
processRemoveAll()
Resets the keyfile, the disk file, and the memory key map. |
protected void |
processUpdate(ICacheElement element)
Writes an element to disk. |
protected boolean |
verifyDisk()
We need to verify that the file on disk uses the same block size and that the file is the proper size. |
| Methods inherited from class org.apache.jcs.auxiliary.disk.AbstractDiskCache |
|---|
dispose, doDispose, doGet, doGetMatching, doRemove, doRemoveAll, doUpdate, get, getCacheName, getCacheType, getEventLoggingExtraInfo, getMatching, getStatus, processGetMultiple, remove, removeAll, update |
| Methods inherited from class org.apache.jcs.auxiliary.AbstractAuxiliaryCacheEventLogging |
|---|
disposeWithEventLogging, getMatchingWithEventLogging, getMultiple, getMultipleWithEventLogging, getWithEventLogging, removeAllWithEventLogging, removeWithEventLogging, updateWithEventLogging |
| Methods inherited from class org.apache.jcs.auxiliary.AbstractAuxiliaryCache |
|---|
createICacheEvent, createICacheEvent, getCacheEventLogger, getElementSerializer, getKeyMatcher, logApplicationEvent, logError, logICacheEvent, setCacheEventLogger, setElementSerializer, setKeyMatcher |
| 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.auxiliary.AuxiliaryCache |
|---|
setCacheEventLogger, setElementSerializer |
| Methods inherited from interface org.apache.jcs.engine.behavior.ICache |
|---|
getMultiple, setKeyMatcher |
| Constructor Detail |
|---|
public BlockDiskCache(BlockDiskCacheAttributes cacheAttributes)
cacheAttributes - | Method Detail |
|---|
protected boolean verifyDisk()
public java.util.Set getGroupKeys(java.lang.String groupName)
(non-Javadoc)
getGroupKeys in interface AuxiliaryCachegetGroupKeys in class AbstractDiskCacheAbstractDiskCache.getGroupKeys(java.lang.String)public java.util.Map processGetMatching(java.lang.String pattern)
processGetMatching in class AbstractAuxiliaryCacheEventLoggingpattern -
public int getSize()
(non-Javadoc)
getSize in interface ICachegetSize in class AbstractDiskCacheAbstractDiskCache.getSize()protected ICacheElement processGet(java.io.Serializable key)
processGet in class AbstractAuxiliaryCacheEventLoggingkey -
AbstractDiskCache.doGet(java.io.Serializable)protected void processUpdate(ICacheElement element)
processUpdate in class AbstractAuxiliaryCacheEventLoggingelement - AbstractDiskCache.doUpdate(org.apache.jcs.engine.behavior.ICacheElement)protected boolean processRemove(java.io.Serializable key)
(non-Javadoc)
processRemove in class AbstractAuxiliaryCacheEventLoggingkey -
AbstractDiskCache.doRemove(java.io.Serializable)protected void processRemoveAll()
(non-Javadoc)
processRemoveAll in class AbstractAuxiliaryCacheEventLoggingAbstractDiskCache.doRemoveAll()public void processDispose()
TODO make dispose window configurable.
processDispose in class AbstractAuxiliaryCacheEventLoggingpublic AuxiliaryCacheAttributes getAuxiliaryCacheAttributes()
(non-Javadoc)
AuxiliaryCache.getAuxiliaryCacheAttributes()protected void freeBlocks(int[] blocksToFree)
blocksToFree - public java.lang.String getStats()
getStats in interface ICachegetStats in class AbstractDiskCachepublic IStats getStatistics()
(non-Javadoc)
getStatistics in interface AuxiliaryCachegetStatistics in class AbstractDiskCacheAuxiliaryCache.getStatistics()protected java.lang.String getDiskLocation()
getDiskLocation in class AbstractDiskCache
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||