Package org.infinispan.interceptors.impl
Class JmxStatsCommandInterceptor
java.lang.Object
org.infinispan.interceptors.BaseAsyncInterceptor
org.infinispan.interceptors.DDAsyncInterceptor
org.infinispan.interceptors.impl.JmxStatsCommandInterceptor
- All Implemented Interfaces:
Visitor
,AsyncInterceptor
,JmxStatisticsExposer
- Direct Known Subclasses:
CacheLoaderInterceptor
,CacheMgmtInterceptor
,CacheWriterInterceptor
@MBean
public abstract class JmxStatsCommandInterceptor
extends DDAsyncInterceptor
implements JmxStatisticsExposer
Base class for all the interceptors exposing management statistics.
- Since:
- 9.0
- Author:
- [email protected]
-
Field Summary
Fields inherited from class org.infinispan.interceptors.BaseAsyncInterceptor
cacheConfiguration
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns whether an interceptor's statistics are being captured.final void
onStart()
void
Resets statistics gathered.void
setStatisticsEnabled
(boolean enabled) Enables an interceptor's cache statistics If true, the interceptor will capture statistics and make them available through the mbean.Methods inherited from class org.infinispan.interceptors.DDAsyncInterceptor
handleDefault, visitClearCommand, visitCommand, visitCommitCommand, visitComputeCommand, visitComputeIfAbsentCommand, visitEntrySetCommand, visitEvictCommand, visitGetAllCommand, visitGetCacheEntryCommand, visitGetKeyValueCommand, visitInvalidateCommand, visitInvalidateL1Command, visitIracPutKeyValueCommand, visitKeySetCommand, visitLockControlCommand, visitPrepareCommand, visitPutKeyValueCommand, visitPutMapCommand, visitReadOnlyKeyCommand, visitReadOnlyManyCommand, visitReadWriteKeyCommand, visitReadWriteKeyValueCommand, visitReadWriteManyCommand, visitReadWriteManyEntriesCommand, visitRemoveCommand, visitReplaceCommand, visitRollbackCommand, visitSizeCommand, visitTouchCommand, visitUnknownCommand, visitWriteOnlyKeyCommand, visitWriteOnlyKeyValueCommand, 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
-
Constructor Details
-
JmxStatsCommandInterceptor
public JmxStatsCommandInterceptor()
-
-
Method Details
-
onStart
public final void onStart() -
getStatisticsEnabled
@ManagedAttribute(description="Enables or disables the gathering of statistics by this component", writable=true) public boolean getStatisticsEnabled()Returns whether an interceptor's statistics are being captured.- Specified by:
getStatisticsEnabled
in interfaceJmxStatisticsExposer
- Returns:
- true if statistics are captured
-
setStatisticsEnabled
public void setStatisticsEnabled(boolean enabled) Description copied from interface:JmxStatisticsExposer
Enables an interceptor's cache statistics If true, the interceptor will capture statistics and make them available through the mbean.- Specified by:
setStatisticsEnabled
in interfaceJmxStatisticsExposer
- Parameters:
enabled
- whether gathering statistics for JMX are enabled.
-
resetStatistics
@ManagedOperation(displayName="Reset Statistics", description="Resets statistics gathered by this component") public void resetStatistics()Resets statistics gathered. Is a no-op, and should be overridden if it is to be meaningful.- Specified by:
resetStatistics
in interfaceJmxStatisticsExposer
-