Package org.cache2k.core.api
Interface InternalCacheInfo
-
public interface InternalCacheInfoCollection of all metrics of a cache. The data can be retrieved viaInternalCache.getInfo()orInternalCache.getConsistentInfo().The interface is not exposed via the exposed API since it may change between versions. Exposed metrics are defined in
CacheStatisticswhich can be retrieved viaCacheControl.sampleStatistics()- Author:
- Jens Wilke
- See Also:
EvictionMetrics,CommonMetrics
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description longgetClearCount()Number of calls toclearthis cache has received.longgetClearedEntriesCount()Number of entries removed from the cache by theclearoperation.InstantgetClearedTime()Time of last clear operation.longgetEvictedCount()Entry was evicted.longgetEvictedWeight()intgetEvictionRunningCount()Number of entries currently being evicted.longgetExpiredCount()Counts entries that expired.longgetExplicitLoadCount()StringgetFailedIntegrityChecks()longgetGetCount()Number of cache operations, only accesslonggetGoneSpinCount()Entry was removed while waiting to get the mutation lock.longgetHeapCapacity()Configured limit of the total cache entry capacity or -1 if weigher is used.longgetHeapHitCount()Total counted hits on the heap cache data.doublegetHitRate()Hit rate of the cacheStringgetHitRateString()Hit rate of the cache in string representationStringgetImplementation()InstantgetInfoCreatedTime()Time when the info object was created.longgetInternalExceptionCount()The cache produced an exception by itself that should have been prevented.longgetKeyMutationCount()After inserting into the cache the key object changed its hash code.longgetLoadCount()Successful loads including reloads and refresh.longgetLoadExceptionCount()Counter of exceptions thrown from the loader.longgetLoadMillis()Accumulated loader execution time.longgetMaximumWeight()Configured maximum weight or -1 if entry capacity is used.doublegetMillisPerLoad()Average duration in milliseconds for each load operation.longgetMissCount()A value was requested, either the entry is not present or the data was expired.StringgetName()Configured name of the cache or null if anonymous.longgetNewEntryCount()Number of created cache entries.longgetPutCount()Entry was inserted in the cache via put or another operation not including a load.longgetRefreshCount()Entry was loaded again, triggered by timer.longgetRefreshedHitCount()A previously refreshed entry was accessed.longgetRefreshRejectedCount()Entry was supposed to be refreshed, but there was no thread available for executing it.longgetRemoveCount()Removed entries, because of programmatic removal.longgetScanCount()longgetSize()Current number of entries in the cache.InstantgetStartedTime()Time when the cache started the operation.longgetSuppressedExceptionCount()Loader exception occurred, but the resilience policy decided to suppress the exception and continue to use the available value.longgetTimerEventCount()Count of timer events delivered to this cache.longgetTotalWeight()Current sum of entry weights as returned by theWeigherbooleanisIntegrityFailure()
-
-
-
Method Detail
-
getName
String getName()
Configured name of the cache or null if anonymous.
-
getImplementation
String getImplementation()
-
getSize
long getSize()
Current number of entries in the cache. This may include entries with expired values.
-
getHeapCapacity
long getHeapCapacity()
Configured limit of the total cache entry capacity or -1 if weigher is used.
-
getMaximumWeight
long getMaximumWeight()
Configured maximum weight or -1 if entry capacity is used.
-
getTotalWeight
long getTotalWeight()
Current sum of entry weights as returned by theWeigher
-
getHeapHitCount
long getHeapHitCount()
Total counted hits on the heap cache data. The counter is increased when an entry is present in the cache, regardless whether the value is valid or not.
-
getGetCount
long getGetCount()
Number of cache operations, only access
-
getMissCount
long getMissCount()
A value was requested, either the entry is not present or the data was expired.
-
getNewEntryCount
long getNewEntryCount()
Number of created cache entries. Counter is increased for a load operation, put, etc. when the entry is not yet in the cache. A load operation always creates a new cache entry, even if the the expiry is immediately to block multiple loads. This counter is provided by the eviction implementation.- See Also:
EvictionMetrics.getNewEntryCount()
-
getLoadCount
long getLoadCount()
Successful loads including reloads and refresh.
-
getExplicitLoadCount
long getExplicitLoadCount()
- See Also:
CommonMetrics.getExplicitLoadCount()
-
getRefreshCount
long getRefreshCount()
Entry was loaded again, triggered by timer. The count includes all triggered and tried refresh actions, including those that produced and exception as result. A refresh is also counted as load ingetLoadCount()- See Also:
CommonMetrics.getRefreshCount()
-
getInternalExceptionCount
long getInternalExceptionCount()
The cache produced an exception by itself that should have been prevented.
-
getRefreshRejectedCount
long getRefreshRejectedCount()
Entry was supposed to be refreshed, but there was no thread available for executing it.- See Also:
CommonMetrics.getRefreshRejectedCount()
-
getSuppressedExceptionCount
long getSuppressedExceptionCount()
Loader exception occurred, but the resilience policy decided to suppress the exception and continue to use the available value.
-
getLoadExceptionCount
long getLoadExceptionCount()
Counter of exceptions thrown from the loader.- See Also:
CommonMetrics.getLoadExceptionCount()
-
getRefreshedHitCount
long getRefreshedHitCount()
A previously refreshed entry was accessed. The access is only counted once after a refresh operation, so the ration of refresh and refreshed hit is the efficiency of the refresh operation.- See Also:
CommonMetrics.getRefreshedHitCount()
-
getExpiredCount
long getExpiredCount()
Counts entries that expired. This counter includes removed entries from the cache and entries that are kept in the cache but expired.
-
getEvictedCount
long getEvictedCount()
Entry was evicted.- See Also:
EvictionMetrics.getEvictedCount()
-
getEvictionRunningCount
int getEvictionRunningCount()
Number of entries currently being evicted.
-
getRemoveCount
long getRemoveCount()
Removed entries, because of programmatic removal. Removal of entries by clear is counted separately. Provided by the eviction implementation.
-
getPutCount
long getPutCount()
Entry was inserted in the cache via put or another operation not including a load.
-
getClearedEntriesCount
long getClearedEntriesCount()
Number of entries removed from the cache by theclearoperation.- See Also:
Cache.clear()
-
getClearCount
long getClearCount()
Number of calls toclearthis cache has received.- See Also:
Cache.clear()
-
getKeyMutationCount
long getKeyMutationCount()
After inserting into the cache the key object changed its hash code.
-
getTimerEventCount
long getTimerEventCount()
Count of timer events delivered to this cache.- See Also:
CommonMetrics.getTimerEventCount()
-
getHitRate
double getHitRate()
Hit rate of the cache
-
getHitRateString
String getHitRateString()
Hit rate of the cache in string representation
-
getMillisPerLoad
double getMillisPerLoad()
Average duration in milliseconds for each load operation.
-
getLoadMillis
long getLoadMillis()
Accumulated loader execution time.- See Also:
CommonMetrics.getLoadTicks()
-
isIntegrityFailure
boolean isIntegrityFailure()
-
getFailedIntegrityChecks
String getFailedIntegrityChecks()
-
getGoneSpinCount
long getGoneSpinCount()
Entry was removed while waiting to get the mutation lock.- See Also:
CommonMetrics.getGoneSpinCount()
-
getStartedTime
Instant getStartedTime()
Time when the cache started the operation.
-
getClearedTime
Instant getClearedTime()
Time of last clear operation.
-
getInfoCreatedTime
Instant getInfoCreatedTime()
Time when the info object was created. The information needs time to collect. Whenever statistics are requested, a new values may be collected or old values are used. The recency of the information can be determined by this value.
-
getEvictedWeight
long getEvictedWeight()
-
getScanCount
long getScanCount()
-
-