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 Summary
FieldsModifier 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 Summary
Constructors -
Method Summary
Modifier 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
-
currentSize
protected long currentSizeThe curent size (in bytes) of the cache. -
maximumSize
protected long maximumSizeThe maximum size (in bytes) of the cache, -1 if unlimited. -
hits
protected long hitsThe sucessfull retrieval data count. -
misses
protected long missesThe number retrieval attemps.
-
-
Constructor Details
-
KAbstractDataCache
protected KAbstractDataCache(long maximumSize)
-
-
Method Details
-
getCurrentSize
public long getCurrentSize()Returns the current size of the cache.- Returns:
- the current size of the cache.
-
getMaximumSize
public long getMaximumSize()Returns the maximum size of the cache.- Returns:
- the maximum size of the cache.
-
getHits
public long getHits()Returns the sucessfull retrieval data count.- Returns:
- the sucessfull retrieval data count.
-
getMisses
public long getMisses()Returns the number retrieval attemps.- Returns:
- the number retrieval attemps.
-
getMonitoringInfo
Returns a KDataCacheMonitoringInfo object that defines monitoring information about this data cache.- Returns:
- a KDataCacheMonitoringInfo object.
-
getMonitoringInfo
Returns a KDataCacheMonitoringInfo object that defines monitoring information about this data cache.- Returns:
- a KDataCacheMonitoringInfo object.
-
getCount
public abstract long getCount() -
getCount
-
getCurrentSize
-
store
- Throws:
IOException
-
export
- Throws:
IOException
-
removeAll
public abstract void removeAll() -
removeMatching
-