@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, setStatisticsEnabledhandleDefault, visitClearCommand, visitCommand, visitCommitCommand, visitEntrySetCommand, visitGetKeysInGroupCommand, visitInvalidateCommand, visitInvalidateL1Command, visitKeySetCommand, visitLockControlCommand, visitPrepareCommand, visitRollbackCommand, visitSizeCommand, visitUnknownCommand, visitWriteOnlyManyCommand, visitWriteOnlyManyEntriesCommandasyncInvokeNext, asyncInvokeNext, asyncInvokeNext, asyncValue, delayedNull, delayedValue, delayedValue, invokeNext, invokeNextAndExceptionally, invokeNextAndFinally, invokeNextAndHandle, invokeNextThenAccept, invokeNextThenApply, isSuccessfullyDone, makeStage, setNextInterceptor, valueOrExceptionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitvisitRemoveExpiredCommandpublic 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 VisitorvisitEvictCommand in class DDAsyncInterceptorThrowablepublic final Object visitGetKeyValueCommand(InvocationContext ctx, GetKeyValueCommand command)
visitGetKeyValueCommand in interface VisitorvisitGetKeyValueCommand in class DDAsyncInterceptorpublic final Object visitGetCacheEntryCommand(InvocationContext ctx, GetCacheEntryCommand command)
visitGetCacheEntryCommand in interface VisitorvisitGetCacheEntryCommand in class DDAsyncInterceptorpublic void addDataRead(boolean foundValue,
long timeNanoSeconds)
public Object visitGetAllCommand(InvocationContext ctx, GetAllCommand command)
visitGetAllCommand in interface VisitorvisitGetAllCommand in class DDAsyncInterceptorpublic Object visitPutMapCommand(InvocationContext ctx, PutMapCommand command)
visitPutMapCommand in interface VisitorvisitPutMapCommand in class DDAsyncInterceptorpublic Object visitPutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command)
visitPutKeyValueCommand in interface VisitorvisitPutKeyValueCommand in class DDAsyncInterceptorpublic Object visitReplaceCommand(InvocationContext ctx, ReplaceCommand command)
visitReplaceCommand in interface VisitorvisitReplaceCommand in class DDAsyncInterceptorpublic Object visitComputeCommand(InvocationContext ctx, ComputeCommand command)
visitComputeCommand in interface VisitorvisitComputeCommand in class DDAsyncInterceptorpublic Object visitComputeIfAbsentCommand(InvocationContext ctx, ComputeIfAbsentCommand command)
visitComputeIfAbsentCommand in interface VisitorvisitComputeIfAbsentCommand in class DDAsyncInterceptorpublic Object visitReadOnlyKeyCommand(InvocationContext ctx, ReadOnlyKeyCommand command)
visitReadOnlyKeyCommand in interface VisitorvisitReadOnlyKeyCommand in class DDAsyncInterceptorpublic Object visitReadOnlyManyCommand(InvocationContext ctx, ReadOnlyManyCommand command)
visitReadOnlyManyCommand in interface VisitorvisitReadOnlyManyCommand in class DDAsyncInterceptorpublic Object visitWriteOnlyKeyCommand(InvocationContext ctx, WriteOnlyKeyCommand command)
visitWriteOnlyKeyCommand in interface VisitorvisitWriteOnlyKeyCommand in class DDAsyncInterceptorpublic Object visitReadWriteKeyValueCommand(InvocationContext ctx, ReadWriteKeyValueCommand command)
visitReadWriteKeyValueCommand in interface VisitorvisitReadWriteKeyValueCommand in class DDAsyncInterceptorpublic Object visitReadWriteKeyCommand(InvocationContext ctx, ReadWriteKeyCommand command)
visitReadWriteKeyCommand in interface VisitorvisitReadWriteKeyCommand in class DDAsyncInterceptorpublic Object visitWriteOnlyKeyValueCommand(InvocationContext ctx, WriteOnlyKeyValueCommand command)
visitWriteOnlyKeyValueCommand in interface VisitorvisitWriteOnlyKeyValueCommand in class DDAsyncInterceptorpublic Object visitReadWriteManyCommand(InvocationContext ctx, ReadWriteManyCommand command)
visitReadWriteManyCommand in interface VisitorvisitReadWriteManyCommand in class DDAsyncInterceptorpublic Object visitReadWriteManyEntriesCommand(InvocationContext ctx, ReadWriteManyEntriesCommand command)
visitReadWriteManyEntriesCommand in interface VisitorvisitReadWriteManyEntriesCommand in class DDAsyncInterceptorpublic Object visitRemoveCommand(InvocationContext ctx, RemoveCommand command)
visitRemoveCommand in interface VisitorvisitRemoveCommand 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()
JmxStatsCommandInterceptorresetStatistics in interface JmxStatisticsExposerresetStatistics in class JmxStatsCommandInterceptorpublic void addEvictions(long numEvictions)
Copyright © 2022 JBoss by Red Hat. All rights reserved.