|
||||||||||
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.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 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 | |
---|---|
void |
doDispose()
Dispose of the disk cache in a background thread. |
protected ICacheElement |
doGet(java.io.Serializable key)
Gets the ICacheElement for the key if it is in the cache. |
protected boolean |
doRemove(java.io.Serializable key)
Returns true if the removal was succesful; or false if there is nothing to remove. |
protected void |
doRemoveAll()
Resets the keyfile, the disk file, and the memory key map. |
protected void |
doUpdate(ICacheElement element)
Writes an element to disk. |
protected void |
freeBlocks(int[] blocksToFree)
Add these blocks to the emptyBlock list. |
AuxiliaryCacheAttributes |
getAuxiliaryCacheAttributes()
Returns the attributes. |
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. |
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, 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 |
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 AuxiliaryCache
getGroupKeys
in class AbstractDiskCache
AbstractDiskCache.getGroupKeys(java.lang.String)
public int getSize()
(non-Javadoc)
getSize
in interface AuxiliaryCache
getSize
in interface ICache
getSize
in class AbstractDiskCache
AbstractDiskCache.getSize()
protected ICacheElement doGet(java.io.Serializable key)
doGet
in class AbstractDiskCache
key
- Key to locate value for.
AbstractDiskCache.doGet(java.io.Serializable)
protected void doUpdate(ICacheElement element)
doUpdate
in class AbstractDiskCache
AbstractDiskCache.doUpdate(org.apache.jcs.engine.behavior.ICacheElement)
protected boolean doRemove(java.io.Serializable key)
(non-Javadoc)
doRemove
in class AbstractDiskCache
key
- Key of object to remove.
AbstractDiskCache.doRemove(java.io.Serializable)
protected void doRemoveAll()
(non-Javadoc)
doRemoveAll
in class AbstractDiskCache
AbstractDiskCache.doRemoveAll()
public void doDispose()
doDispose
in class AbstractDiskCache
public AuxiliaryCacheAttributes getAuxiliaryCacheAttributes()
(non-Javadoc)
AuxiliaryCache.getAuxiliaryCacheAttributes()
protected void freeBlocks(int[] blocksToFree)
blocksToFree
- public java.lang.String getStats()
getStats
in interface ICache
getStats
in class AbstractDiskCache
public IStats getStatistics()
(non-Javadoc)
getStatistics
in interface AuxiliaryCache
getStatistics
in class AbstractDiskCache
AuxiliaryCache.getStatistics()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |