@MBean(objectName="Statistics", description="General statistics such as timings, hit/miss ratio, etc.") public final class CacheMgmtInterceptor extends JmxStatsCommandInterceptor
cacheConfiguration
Constructor and Description |
---|
CacheMgmtInterceptor() |
getStatisticsEnabled, onStart, setStatisticsEnabled
handleDefault, visitClearCommand, visitCommand, visitCommitCommand, visitEntrySetCommand, visitGetKeysInGroupCommand, visitInvalidateCommand, visitInvalidateL1Command, visitKeySetCommand, visitLockControlCommand, visitPrepareCommand, visitRollbackCommand, visitSizeCommand, visitUnknownCommand, visitWriteOnlyManyCommand, visitWriteOnlyManyEntriesCommand
asyncInvokeNext, asyncInvokeNext, asyncInvokeNext, asyncValue, delayedNull, delayedValue, delayedValue, invokeNext, invokeNextAndExceptionally, invokeNextAndFinally, invokeNextAndHandle, invokeNextThenAccept, invokeNextThenApply, isSuccessfullyDone, makeStage, setNextInterceptor, valueOrException
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
visitRemoveExpiredCommand
public void start()
@ManagedAttribute(description="Hit Times", displayName="Hit Times", dataType=TIMER, units=NANOSECONDS) public void setHitTimes(Timer hitTimes)
@ManagedAttribute(description="Miss times", displayName="Miss times", dataType=TIMER, units=NANOSECONDS) public void setMissTimes(Timer missTimes)
@ManagedAttribute(description="Store Times", displayName="Store Times", dataType=TIMER, units=NANOSECONDS) public void setStoreTimes(Timer storeTimes)
@ManagedAttribute(description="Remove Times", displayName="Remove Times", dataType=TIMER, units=NANOSECONDS) public void setRemoveTimes(Timer removeTimes)
public Object visitEvictCommand(InvocationContext ctx, EvictCommand command) throws Throwable
visitEvictCommand
in interface Visitor
visitEvictCommand
in class DDAsyncInterceptor
Throwable
public final Object visitGetKeyValueCommand(InvocationContext ctx, GetKeyValueCommand command)
visitGetKeyValueCommand
in interface Visitor
visitGetKeyValueCommand
in class DDAsyncInterceptor
public final Object visitGetCacheEntryCommand(InvocationContext ctx, GetCacheEntryCommand command)
visitGetCacheEntryCommand
in interface Visitor
visitGetCacheEntryCommand
in class DDAsyncInterceptor
public void addDataRead(boolean foundValue, long timeNanoSeconds)
public Object visitGetAllCommand(InvocationContext ctx, GetAllCommand command)
visitGetAllCommand
in interface Visitor
visitGetAllCommand
in class DDAsyncInterceptor
public Object visitPutMapCommand(InvocationContext ctx, PutMapCommand command)
visitPutMapCommand
in interface Visitor
visitPutMapCommand
in class DDAsyncInterceptor
public Object visitPutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command)
visitPutKeyValueCommand
in interface Visitor
visitPutKeyValueCommand
in class DDAsyncInterceptor
public Object visitReplaceCommand(InvocationContext ctx, ReplaceCommand command)
visitReplaceCommand
in interface Visitor
visitReplaceCommand
in class DDAsyncInterceptor
public Object visitComputeCommand(InvocationContext ctx, ComputeCommand command)
visitComputeCommand
in interface Visitor
visitComputeCommand
in class DDAsyncInterceptor
public Object visitComputeIfAbsentCommand(InvocationContext ctx, ComputeIfAbsentCommand command)
visitComputeIfAbsentCommand
in interface Visitor
visitComputeIfAbsentCommand
in class DDAsyncInterceptor
public Object visitReadOnlyKeyCommand(InvocationContext ctx, ReadOnlyKeyCommand command)
visitReadOnlyKeyCommand
in interface Visitor
visitReadOnlyKeyCommand
in class DDAsyncInterceptor
public Object visitReadOnlyManyCommand(InvocationContext ctx, ReadOnlyManyCommand command)
visitReadOnlyManyCommand
in interface Visitor
visitReadOnlyManyCommand
in class DDAsyncInterceptor
public Object visitWriteOnlyKeyCommand(InvocationContext ctx, WriteOnlyKeyCommand command)
visitWriteOnlyKeyCommand
in interface Visitor
visitWriteOnlyKeyCommand
in class DDAsyncInterceptor
public Object visitReadWriteKeyValueCommand(InvocationContext ctx, ReadWriteKeyValueCommand command)
visitReadWriteKeyValueCommand
in interface Visitor
visitReadWriteKeyValueCommand
in class DDAsyncInterceptor
public Object visitReadWriteKeyCommand(InvocationContext ctx, ReadWriteKeyCommand command)
visitReadWriteKeyCommand
in interface Visitor
visitReadWriteKeyCommand
in class DDAsyncInterceptor
public Object visitWriteOnlyKeyValueCommand(InvocationContext ctx, WriteOnlyKeyValueCommand command)
visitWriteOnlyKeyValueCommand
in interface Visitor
visitWriteOnlyKeyValueCommand
in class DDAsyncInterceptor
public Object visitReadWriteManyCommand(InvocationContext ctx, ReadWriteManyCommand command)
visitReadWriteManyCommand
in interface Visitor
visitReadWriteManyCommand
in class DDAsyncInterceptor
public Object visitReadWriteManyEntriesCommand(InvocationContext ctx, ReadWriteManyEntriesCommand command)
visitReadWriteManyEntriesCommand
in interface Visitor
visitReadWriteManyEntriesCommand
in class DDAsyncInterceptor
public Object visitRemoveCommand(InvocationContext ctx, RemoveCommand command)
visitRemoveCommand
in interface Visitor
visitRemoveCommand
in class DDAsyncInterceptor
@ManagedAttribute(description="Number of cache attribute hits", displayName="Number of cache hits", measurementType=TRENDSUP) public long getHits()
@ManagedAttribute(description="Number of cache attribute misses", displayName="Number of cache misses", measurementType=TRENDSUP) public long getMisses()
@ManagedAttribute(description="Number of cache removal hits", displayName="Number of cache removal hits", measurementType=TRENDSUP) public long getRemoveHits()
@ManagedAttribute(description="Number of cache removals where keys were not found", displayName="Number of cache removal misses", measurementType=TRENDSUP) public long getRemoveMisses()
@ManagedAttribute(description="Number of cache attribute put operations", displayName="Number of cache puts", measurementType=TRENDSUP) public long getStores()
@ManagedAttribute(description="Number of cache eviction operations", displayName="Number of cache evictions", measurementType=TRENDSUP) public long getEvictions()
@ManagedAttribute(description="Percentage hit/(hit+miss) ratio for the cache", displayName="Hit ratio", units=PERCENTAGE) public double getHitRatio()
@ManagedAttribute(description="Read/writes ratio for the cache", displayName="Read/write ratio", units=PERCENTAGE) public double getReadWriteRatio()
@ManagedAttribute(description="Average number of milliseconds for a read operation on the cache", displayName="Average read time", units=MILLISECONDS) public long getAverageReadTime()
@ManagedAttribute(description="Average number of nanoseconds for a read operation on the cache", displayName="Average read time", units=NANOSECONDS) public long getAverageReadTimeNanos()
@ManagedAttribute(description="Average number of milliseconds for a write operation in the cache", displayName="Average write time", units=MILLISECONDS) public long getAverageWriteTime()
@ManagedAttribute(description="Average number of nanoseconds for a write operation in the cache", displayName="Average write time", units=NANOSECONDS) public long getAverageWriteTimeNanos()
@ManagedAttribute(description="Average number of milliseconds for a remove operation in the cache", displayName="Average remove time", units=MILLISECONDS) public long getAverageRemoveTime()
@ManagedAttribute(description="Average number of nanoseconds for a remove operation in the cache", displayName="Average remove time", units=NANOSECONDS) public long getAverageRemoveTimeNanos()
@ManagedAttribute(description="Number of entries in the cache including passivated entries", displayName="Number of current cache entries") public int getNumberOfEntries()
@ManagedAttribute(description="Number of entries currently in-memory excluding expired entries", displayName="Number of in-memory cache entries") public int getNumberOfEntriesInMemory()
@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()
@ManagedAttribute(description="Amount off-heap memory used by this cache (bytes)", displayName="Off-Heap memory used") public long getOffHeapMemoryUsed()
@ManagedAttribute(description="Amount of nodes required to guarantee data consistency", displayName="Required Minimum Nodes") public int getRequiredMinimumNumberOfNodes()
public static int calculateRequiredMinimumNumberOfNodes(AdvancedCache<?,?> cache, ComponentRegistry componentRegistry)
@ManagedAttribute(description="Number of seconds since cache started", displayName="Seconds since cache started", units=SECONDS, measurementType=TRENDSUP) public long getTimeSinceStart()
@ManagedAttribute(description="Number of seconds since cache started", displayName="Seconds since cache started", units=SECONDS, measurementType=TRENDSUP) @Deprecated public long getElapsedTime()
getTimeSinceStart()
instead.@ManagedAttribute(description="Number of seconds since the cache statistics were last reset", displayName="Seconds since cache statistics were reset", units=SECONDS) public long getTimeSinceReset()
public void resetStatistics()
JmxStatsCommandInterceptor
resetStatistics
in interface JmxStatisticsExposer
resetStatistics
in class JmxStatsCommandInterceptor
public void addEvictions(long numEvictions)
Copyright © 2021 JBoss by Red Hat. All rights reserved.