Package org.cache2k.core
Class StandardCommonMetrics
- java.lang.Object
-
- org.cache2k.core.StandardCommonMetrics
-
- All Implemented Interfaces:
CommonMetrics,CommonMetrics.Updater
public class StandardCommonMetrics extends Object implements CommonMetrics.Updater
- Author:
- Jens Wilke
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.cache2k.core.api.CommonMetrics
CommonMetrics.BlackHole, CommonMetrics.Updater
-
-
Constructor Summary
Constructors Constructor Description StandardCommonMetrics()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexpiredKept()voidexplicitLoad(long millis)longgetExpiredKeptCount()Number of entries expired, but kept in the cache because of ongoing processing on the entry (pinned) or because keepData is enabled.longgetExplicitLoadCount()Entry was explicitly loaded, that is every load that is not read through or refresh.longgetGoneSpinCount()Entry was removed while waiting to get the mutation lock.longgetHeapHitButNoReadCount()Operation was accessing a heap entry and counted a hit if it is existing, but it should not be counted as read/get operation (e.g.longgetHeapHitCount()longgetLoadExceptionCount()Counter of exceptions thrown from the loader.longgetLoadTicks()Accumulated milliseconds spend in load operations.longgetPeekHitNotFreshCount()Peek, but entry available was not fresh (expired).longgetPeekMissCount()Incremented if data is requested from the cache but no entry is present (e.g.longgetPutHitCount()Counted for a put that updates an existing cache entry.longgetPutNewEntryCount()Counted for a put that triggers the insert of a new cache entry.longgetReadThroughCount()Entry was loaded, triggered by a get().longgetRefreshCount()Entry was loaded again, triggered by timerlonggetRefreshedHitCount()Entry on probation for refresh got hit.longgetRefreshRejectedCount()Refresh submit failed.longgetSuppressedExceptionCount()Counter of suppressed exceptions from the loaderlonggetTimerEventCount()Count of timer events delivered to this cache.voidgoneSpin()voidheapHit()voidheapHitButNoRead()booleanisDisabled()True if statistics are disabled.voidloadException()voidpeekHitNotFresh()voidpeekMiss()voidputHit()voidputNewEntry()voidreadThrough(long millis)voidrefresh(long millis)voidrefreshedHit()voidrefreshRejected()voidsuppressedException()voidtimerEvent()
-
-
-
Method Detail
-
putNewEntry
public void putNewEntry()
- Specified by:
putNewEntryin interfaceCommonMetrics.Updater
-
getPutNewEntryCount
public long getPutNewEntryCount()
Description copied from interface:CommonMetricsCounted for a put that triggers the insert of a new cache entry.- Specified by:
getPutNewEntryCountin interfaceCommonMetrics- See Also:
InternalCacheInfo.getPutCount()
-
putHit
public void putHit()
- Specified by:
putHitin interfaceCommonMetrics.Updater
-
getPutHitCount
public long getPutHitCount()
Description copied from interface:CommonMetricsCounted for a put that updates an existing cache entry.- Specified by:
getPutHitCountin interfaceCommonMetrics- See Also:
InternalCacheInfo.getPutCount()
-
heapHitButNoRead
public void heapHitButNoRead()
- Specified by:
heapHitButNoReadin interfaceCommonMetrics.Updater
-
getHeapHitButNoReadCount
public long getHeapHitButNoReadCount()
Description copied from interface:CommonMetricsOperation was accessing a heap entry and counted a hit if it is existing, but it should not be counted as read/get operation (e.g.contains). This is a correction counter applied to the get counter.- Specified by:
getHeapHitButNoReadCountin interfaceCommonMetrics
-
timerEvent
public void timerEvent()
- Specified by:
timerEventin interfaceCommonMetrics.Updater
-
getTimerEventCount
public long getTimerEventCount()
Description copied from interface:CommonMetricsCount of timer events delivered to this cache.- Specified by:
getTimerEventCountin interfaceCommonMetrics- See Also:
InternalCacheInfo.getTimerEventCount()
-
getLoadTicks
public long getLoadTicks()
Description copied from interface:CommonMetricsAccumulated milliseconds spend in load operations.- Specified by:
getLoadTicksin interfaceCommonMetrics- See Also:
InternalCacheInfo.getLoadMillis()
-
getRefreshCount
public long getRefreshCount()
Description copied from interface:CommonMetricsEntry was loaded again, triggered by timer- Specified by:
getRefreshCountin interfaceCommonMetrics- See Also:
InternalCacheInfo.getRefreshCount()
-
refresh
public void refresh(long millis)
- Specified by:
refreshin interfaceCommonMetrics.Updater
-
getReadThroughCount
public long getReadThroughCount()
Description copied from interface:CommonMetricsEntry was loaded, triggered by a get(). A read through event means also a get, load and miss event.- Specified by:
getReadThroughCountin interfaceCommonMetrics- See Also:
InternalCacheInfo.getLoadCount()
-
readThrough
public void readThrough(long millis)
- Specified by:
readThroughin interfaceCommonMetrics.Updater
-
getExplicitLoadCount
public long getExplicitLoadCount()
Description copied from interface:CommonMetricsEntry was explicitly loaded, that is every load that is not read through or refresh.- Specified by:
getExplicitLoadCountin interfaceCommonMetrics- See Also:
InternalCacheInfo.getExplicitLoadCount()
-
explicitLoad
public void explicitLoad(long millis)
- Specified by:
explicitLoadin interfaceCommonMetrics.Updater
-
getLoadExceptionCount
public long getLoadExceptionCount()
Description copied from interface:CommonMetricsCounter of exceptions thrown from the loader.- Specified by:
getLoadExceptionCountin interfaceCommonMetrics- See Also:
InternalCacheInfo.getLoadExceptionCount()
-
loadException
public void loadException()
- Specified by:
loadExceptionin interfaceCommonMetrics.Updater
-
getSuppressedExceptionCount
public long getSuppressedExceptionCount()
Description copied from interface:CommonMetricsCounter of suppressed exceptions from the loader- Specified by:
getSuppressedExceptionCountin interfaceCommonMetrics- See Also:
InternalCacheInfo.getSuppressedExceptionCount()
-
suppressedException
public void suppressedException()
- Specified by:
suppressedExceptionin interfaceCommonMetrics.Updater
-
getExpiredKeptCount
public long getExpiredKeptCount()
Description copied from interface:CommonMetricsNumber of entries expired, but kept in the cache because of ongoing processing on the entry (pinned) or because keepData is enabled.- Specified by:
getExpiredKeptCountin interfaceCommonMetrics- See Also:
InternalCacheInfo.getExpiredCount()
-
expiredKept
public void expiredKept()
- Specified by:
expiredKeptin interfaceCommonMetrics.Updater
-
getPeekMissCount
public long getPeekMissCount()
Description copied from interface:CommonMetricsIncremented if data is requested from the cache but no entry is present (e.g. via peek or get). If a load is started this is not incremented, since the actual miss is recorded via the load/readThrough counter.- Specified by:
getPeekMissCountin interfaceCommonMetrics
-
peekMiss
public void peekMiss()
- Specified by:
peekMissin interfaceCommonMetrics.Updater
-
getPeekHitNotFreshCount
public long getPeekHitNotFreshCount()
Description copied from interface:CommonMetricsPeek, but entry available was not fresh (expired). This is effectively a miss, but we count separately for debugging purposes. Always 0 if notCache2kBuilder.keepDataAfterExpired(boolean)- Specified by:
getPeekHitNotFreshCountin interfaceCommonMetrics
-
peekHitNotFresh
public void peekHitNotFresh()
- Specified by:
peekHitNotFreshin interfaceCommonMetrics.Updater
-
getRefreshedHitCount
public long getRefreshedHitCount()
Description copied from interface:CommonMetricsEntry on probation for refresh got hit.- Specified by:
getRefreshedHitCountin interfaceCommonMetrics- See Also:
InternalCacheInfo.getRefreshedHitCount()
-
refreshedHit
public void refreshedHit()
- Specified by:
refreshedHitin interfaceCommonMetrics.Updater
-
getRefreshRejectedCount
public long getRefreshRejectedCount()
Description copied from interface:CommonMetricsRefresh submit failed. Happens if the loader executor has not enough available resources and rejects the refresh task.- Specified by:
getRefreshRejectedCountin interfaceCommonMetrics
-
refreshRejected
public void refreshRejected()
- Specified by:
refreshRejectedin interfaceCommonMetrics.Updater
-
isDisabled
public boolean isDisabled()
Description copied from interface:CommonMetricsTrue if statistics are disabled.- Specified by:
isDisabledin interfaceCommonMetrics
-
getGoneSpinCount
public long getGoneSpinCount()
Description copied from interface:CommonMetricsEntry was removed while waiting to get the mutation lock.- Specified by:
getGoneSpinCountin interfaceCommonMetrics- See Also:
InternalCacheInfo.getGoneSpinCount()
-
goneSpin
public void goneSpin()
- Specified by:
goneSpinin interfaceCommonMetrics.Updater
-
getHeapHitCount
public long getHeapHitCount()
- Specified by:
getHeapHitCountin interfaceCommonMetrics
-
heapHit
public void heapHit()
- Specified by:
heapHitin interfaceCommonMetrics.Updater
-
-