Package com.kheops.util
Class KAbstractDataCache
java.lang.Object
com.kheops.util.KAbstractDataCache
- Direct Known Subclasses:
- KMemoryDataCache
An abstract class that defines member variables used to monitor
 a cache.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected longThe curent size (in bytes) of the cache.protected longThe sucessfull retrieval data count.protected longThe maximum size (in bytes) of the cache, -1 if unlimited.protected longThe number retrieval attemps.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionabstract voidexport(KAbstractDataCache cache) abstract longgetCount()abstract longlongReturns the current size of the cache.abstract longgetCurrentSize(String partialKey) longgetHits()Returns the sucessfull retrieval data count.longReturns the maximum size of the cache.longReturns the number retrieval attemps.Returns a KDataCacheMonitoringInfo object that defines monitoring information about this data cache.getMonitoringInfo(String partialKey) Returns a KDataCacheMonitoringInfo object that defines monitoring information about this data cache.abstract voidabstract voidremoveMatching(String partialKey) abstract void
- 
Field Details- 
currentSizeprotected long currentSizeThe curent size (in bytes) of the cache.
- 
maximumSizeprotected long maximumSizeThe maximum size (in bytes) of the cache, -1 if unlimited.
- 
hitsprotected long hitsThe sucessfull retrieval data count.
- 
missesprotected long missesThe number retrieval attemps.
 
- 
- 
Constructor Details- 
KAbstractDataCacheprotected KAbstractDataCache(long maximumSize) 
 
- 
- 
Method Details- 
getCurrentSizepublic long getCurrentSize()Returns the current size of the cache.- Returns:
- the current size of the cache.
 
- 
getMaximumSizepublic long getMaximumSize()Returns the maximum size of the cache.- Returns:
- the maximum size of the cache.
 
- 
getHitspublic long getHits()Returns the sucessfull retrieval data count.- Returns:
- the sucessfull retrieval data count.
 
- 
getMissespublic long getMisses()Returns the number retrieval attemps.- Returns:
- the number retrieval attemps.
 
- 
getMonitoringInfoReturns a KDataCacheMonitoringInfo object that defines monitoring information about this data cache.- Returns:
- a KDataCacheMonitoringInfo object.
 
- 
getMonitoringInfoReturns a KDataCacheMonitoringInfo object that defines monitoring information about this data cache.- Returns:
- a KDataCacheMonitoringInfo object.
 
- 
getCountpublic abstract long getCount()
- 
getCount
- 
getCurrentSize
- 
store- Throws:
- IOException
 
- 
export- Throws:
- IOException
 
- 
removeAllpublic abstract void removeAll()
- 
removeMatching
 
-