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
Modifier and TypeFieldDescriptionprotected long
The curent size (in bytes) of the cache.protected long
The sucessfull retrieval data count.protected long
The maximum size (in bytes) of the cache, -1 if unlimited.protected long
The number retrieval attemps. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract void
export
(KAbstractDataCache cache) abstract long
getCount()
abstract long
long
Returns the current size of the cache.abstract long
getCurrentSize
(String partialKey) long
getHits()
Returns the sucessfull retrieval data count.long
Returns the maximum size of the cache.long
Returns 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 void
abstract void
removeMatching
(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
-