Package org.infinispan.interceptors.impl
Class CacheMgmtInterceptor
- java.lang.Object
-
- org.infinispan.interceptors.BaseAsyncInterceptor
-
- org.infinispan.interceptors.DDAsyncInterceptor
-
- org.infinispan.interceptors.impl.JmxStatsCommandInterceptor
-
- org.infinispan.interceptors.impl.CacheMgmtInterceptor
-
- All Implemented Interfaces:
Visitor,AsyncInterceptor,JmxStatisticsExposer
@MBean(objectName="Statistics", description="General statistics such as timings, hit/miss ratio, etc.") public final class CacheMgmtInterceptor extends JmxStatsCommandInterceptorCaptures cache management statistics.- Since:
- 9.0
- Author:
- Jerry Gauthier
-
-
Field Summary
-
Fields inherited from class org.infinispan.interceptors.BaseAsyncInterceptor
cacheConfiguration
-
-
Constructor Summary
Constructors Constructor Description CacheMgmtInterceptor()
-
Method Summary
-
Methods inherited from class org.infinispan.interceptors.impl.JmxStatsCommandInterceptor
getStatisticsEnabled, onStart, setStatisticsEnabled
-
Methods inherited from class org.infinispan.interceptors.DDAsyncInterceptor
handleDefault, visitClearCommand, visitCommand, visitCommitCommand, visitEntrySetCommand, visitGetKeysInGroupCommand, visitInvalidateCommand, visitInvalidateL1Command, visitKeySetCommand, visitLockControlCommand, visitPrepareCommand, visitRollbackCommand, visitSizeCommand, visitUnknownCommand, visitWriteOnlyManyCommand, visitWriteOnlyManyEntriesCommand
-
Methods inherited from class org.infinispan.interceptors.BaseAsyncInterceptor
asyncInvokeNext, asyncInvokeNext, asyncInvokeNext, asyncValue, delayedNull, delayedValue, delayedValue, invokeNext, invokeNextAndExceptionally, invokeNextAndFinally, invokeNextAndHandle, invokeNextThenAccept, invokeNextThenApply, isSuccessfullyDone, makeStage, setNextInterceptor, valueOrException
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.infinispan.commands.Visitor
visitRemoveExpiredCommand
-
-
-
-
Method Detail
-
start
public void start()
-
setHitTimes
@ManagedAttribute(description="Hit Times", displayName="Hit Times", dataType=TIMER, units=NANOSECONDS) public void setHitTimes(org.eclipse.microprofile.metrics.Timer hitTimes)
-
setMissTimes
@ManagedAttribute(description="Miss times", displayName="Miss times", dataType=TIMER, units=NANOSECONDS) public void setMissTimes(org.eclipse.microprofile.metrics.Timer missTimes)
-
setStoreTimes
@ManagedAttribute(description="Store Times", displayName="Store Times", dataType=TIMER, units=NANOSECONDS) public void setStoreTimes(org.eclipse.microprofile.metrics.Timer storeTimes)
-
setRemoveTimes
@ManagedAttribute(description="Remove Times", displayName="Remove Times", dataType=TIMER, units=NANOSECONDS) public void setRemoveTimes(org.eclipse.microprofile.metrics.Timer removeTimes)
-
visitEvictCommand
public Object visitEvictCommand(InvocationContext ctx, EvictCommand command) throws Throwable
- Specified by:
visitEvictCommandin interfaceVisitor- Overrides:
visitEvictCommandin classDDAsyncInterceptor- Throws:
Throwable
-
visitGetKeyValueCommand
public final Object visitGetKeyValueCommand(InvocationContext ctx, GetKeyValueCommand command)
- Specified by:
visitGetKeyValueCommandin interfaceVisitor- Overrides:
visitGetKeyValueCommandin classDDAsyncInterceptor
-
visitGetCacheEntryCommand
public final Object visitGetCacheEntryCommand(InvocationContext ctx, GetCacheEntryCommand command)
- Specified by:
visitGetCacheEntryCommandin interfaceVisitor- Overrides:
visitGetCacheEntryCommandin classDDAsyncInterceptor
-
addDataRead
public void addDataRead(boolean foundValue, long timeNanoSeconds)
-
visitGetAllCommand
public Object visitGetAllCommand(InvocationContext ctx, GetAllCommand command)
- Specified by:
visitGetAllCommandin interfaceVisitor- Overrides:
visitGetAllCommandin classDDAsyncInterceptor
-
visitPutMapCommand
public Object visitPutMapCommand(InvocationContext ctx, PutMapCommand command)
- Specified by:
visitPutMapCommandin interfaceVisitor- Overrides:
visitPutMapCommandin classDDAsyncInterceptor
-
visitPutKeyValueCommand
public Object visitPutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command)
- Specified by:
visitPutKeyValueCommandin interfaceVisitor- Overrides:
visitPutKeyValueCommandin classDDAsyncInterceptor
-
visitReplaceCommand
public Object visitReplaceCommand(InvocationContext ctx, ReplaceCommand command)
- Specified by:
visitReplaceCommandin interfaceVisitor- Overrides:
visitReplaceCommandin classDDAsyncInterceptor
-
visitComputeCommand
public Object visitComputeCommand(InvocationContext ctx, ComputeCommand command)
- Specified by:
visitComputeCommandin interfaceVisitor- Overrides:
visitComputeCommandin classDDAsyncInterceptor
-
visitComputeIfAbsentCommand
public Object visitComputeIfAbsentCommand(InvocationContext ctx, ComputeIfAbsentCommand command)
- Specified by:
visitComputeIfAbsentCommandin interfaceVisitor- Overrides:
visitComputeIfAbsentCommandin classDDAsyncInterceptor
-
visitReadOnlyKeyCommand
public Object visitReadOnlyKeyCommand(InvocationContext ctx, ReadOnlyKeyCommand command)
- Specified by:
visitReadOnlyKeyCommandin interfaceVisitor- Overrides:
visitReadOnlyKeyCommandin classDDAsyncInterceptor
-
visitReadOnlyManyCommand
public Object visitReadOnlyManyCommand(InvocationContext ctx, ReadOnlyManyCommand command)
- Specified by:
visitReadOnlyManyCommandin interfaceVisitor- Overrides:
visitReadOnlyManyCommandin classDDAsyncInterceptor
-
visitWriteOnlyKeyCommand
public Object visitWriteOnlyKeyCommand(InvocationContext ctx, WriteOnlyKeyCommand command)
- Specified by:
visitWriteOnlyKeyCommandin interfaceVisitor- Overrides:
visitWriteOnlyKeyCommandin classDDAsyncInterceptor
-
visitReadWriteKeyValueCommand
public Object visitReadWriteKeyValueCommand(InvocationContext ctx, ReadWriteKeyValueCommand command)
- Specified by:
visitReadWriteKeyValueCommandin interfaceVisitor- Overrides:
visitReadWriteKeyValueCommandin classDDAsyncInterceptor
-
visitReadWriteKeyCommand
public Object visitReadWriteKeyCommand(InvocationContext ctx, ReadWriteKeyCommand command)
- Specified by:
visitReadWriteKeyCommandin interfaceVisitor- Overrides:
visitReadWriteKeyCommandin classDDAsyncInterceptor
-
visitWriteOnlyKeyValueCommand
public Object visitWriteOnlyKeyValueCommand(InvocationContext ctx, WriteOnlyKeyValueCommand command)
- Specified by:
visitWriteOnlyKeyValueCommandin interfaceVisitor- Overrides:
visitWriteOnlyKeyValueCommandin classDDAsyncInterceptor
-
visitReadWriteManyCommand
public Object visitReadWriteManyCommand(InvocationContext ctx, ReadWriteManyCommand command)
- Specified by:
visitReadWriteManyCommandin interfaceVisitor- Overrides:
visitReadWriteManyCommandin classDDAsyncInterceptor
-
visitReadWriteManyEntriesCommand
public Object visitReadWriteManyEntriesCommand(InvocationContext ctx, ReadWriteManyEntriesCommand command)
- Specified by:
visitReadWriteManyEntriesCommandin interfaceVisitor- Overrides:
visitReadWriteManyEntriesCommandin classDDAsyncInterceptor
-
visitRemoveCommand
public Object visitRemoveCommand(InvocationContext ctx, RemoveCommand command)
- Specified by:
visitRemoveCommandin interfaceVisitor- Overrides:
visitRemoveCommandin classDDAsyncInterceptor
-
getHits
@ManagedAttribute(description="Number of cache attribute hits", displayName="Number of cache hits", measurementType=TRENDSUP) public long getHits()
-
getMisses
@ManagedAttribute(description="Number of cache attribute misses", displayName="Number of cache misses", measurementType=TRENDSUP) public long getMisses()
-
getRemoveHits
@ManagedAttribute(description="Number of cache removal hits", displayName="Number of cache removal hits", measurementType=TRENDSUP) public long getRemoveHits()
-
getRemoveMisses
@ManagedAttribute(description="Number of cache removals where keys were not found", displayName="Number of cache removal misses", measurementType=TRENDSUP) public long getRemoveMisses()
-
getStores
@ManagedAttribute(description="Number of cache attribute put operations", displayName="Number of cache puts", measurementType=TRENDSUP) public long getStores()
-
getEvictions
@ManagedAttribute(description="Number of cache eviction operations", displayName="Number of cache evictions", measurementType=TRENDSUP) public long getEvictions()
-
getHitRatio
@ManagedAttribute(description="Percentage hit/(hit+miss) ratio for the cache", displayName="Hit ratio", units=PERCENTAGE) public double getHitRatio()
-
getReadWriteRatio
@ManagedAttribute(description="Read/writes ratio for the cache", displayName="Read/write ratio", units=PERCENTAGE) public double getReadWriteRatio()
-
getAverageReadTime
@ManagedAttribute(description="Average number of milliseconds for a read operation on the cache", displayName="Average read time", units=MILLISECONDS) public long getAverageReadTime()
-
getAverageReadTimeNanos
@ManagedAttribute(description="Average number of nanoseconds for a read operation on the cache", displayName="Average read time", units=NANOSECONDS) public long getAverageReadTimeNanos()
-
getAverageWriteTime
@ManagedAttribute(description="Average number of milliseconds for a write operation in the cache", displayName="Average write time", units=MILLISECONDS) public long getAverageWriteTime()
-
getAverageWriteTimeNanos
@ManagedAttribute(description="Average number of nanoseconds for a write operation in the cache", displayName="Average write time", units=NANOSECONDS) public long getAverageWriteTimeNanos()
-
getAverageRemoveTime
@ManagedAttribute(description="Average number of milliseconds for a remove operation in the cache", displayName="Average remove time", units=MILLISECONDS) public long getAverageRemoveTime()
-
getAverageRemoveTimeNanos
@ManagedAttribute(description="Average number of nanoseconds for a remove operation in the cache", displayName="Average remove time", units=NANOSECONDS) public long getAverageRemoveTimeNanos()
-
getNumberOfEntries
@ManagedAttribute(description="Number of entries in the cache including passivated entries", displayName="Number of current cache entries") public int getNumberOfEntries()
-
getNumberOfEntriesInMemory
@ManagedAttribute(description="Number of entries currently in-memory excluding expired entries", displayName="Number of in-memory cache entries") public int getNumberOfEntriesInMemory()
-
getDataMemoryUsed
@ManagedAttribute(description="Amount of memory in bytes allocated for use in eviction for data in the cache", displayName="Memory used by data in the cache") public long getDataMemoryUsed()
-
getOffHeapMemoryUsed
@ManagedAttribute(description="Amount off-heap memory used by this cache (bytes)", displayName="Off-Heap memory used") public long getOffHeapMemoryUsed()
-
getRequiredMinimumNumberOfNodes
@ManagedAttribute(description="Amount of nodes required to guarantee data consistency", displayName="Required Minimum Nodes") public int getRequiredMinimumNumberOfNodes()
-
calculateRequiredMinimumNumberOfNodes
public static int calculateRequiredMinimumNumberOfNodes(AdvancedCache<?,?> cache, ComponentRegistry componentRegistry)
-
getTimeSinceStart
@ManagedAttribute(description="Number of seconds since cache started", displayName="Seconds since cache started", units=SECONDS, measurementType=TRENDSUP) public long getTimeSinceStart()
-
getElapsedTime
@ManagedAttribute(description="Number of seconds since cache started", displayName="Seconds since cache started", units=SECONDS, measurementType=TRENDSUP) @Deprecated public long getElapsedTime()Deprecated.usegetTimeSinceStart()instead.Returns number of seconds since cache started- Returns:
- number of seconds since cache started
-
getTimeSinceReset
@ManagedAttribute(description="Number of seconds since the cache statistics were last reset", displayName="Seconds since cache statistics were reset", units=SECONDS) public long getTimeSinceReset()
-
resetStatistics
public void resetStatistics()
Description copied from class:JmxStatsCommandInterceptorResets statistics gathered. Is a no-op, and should be overridden if it is to be meaningful.- Specified by:
resetStatisticsin interfaceJmxStatisticsExposer- Overrides:
resetStatisticsin classJmxStatsCommandInterceptor
-
addEvictions
public void addEvictions(long numEvictions)
-
-