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:
- Mircea.Markus@jboss.com
-
Field Summary
Fields inherited from class org.infinispan.interceptors.BaseAsyncInterceptor
cacheConfiguration -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether an interceptor's statistics are being captured.final voidonStart()voidResets statistics gathered.voidsetStatisticsEnabled(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, visitWriteOnlyManyEntriesCommandMethods inherited from class org.infinispan.interceptors.BaseAsyncInterceptor
asyncInvokeNext, asyncInvokeNext, asyncInvokeNext, asyncValue, delayedNull, delayedValue, delayedValue, invokeNext, invokeNextAndExceptionally, invokeNextAndFinally, invokeNextAndHandle, invokeNextThenAccept, invokeNextThenApply, isSuccessfullyDone, makeStage, setNextInterceptor, valueOrExceptionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
getStatisticsEnabledin interfaceJmxStatisticsExposer- Returns:
- true if statistics are captured
-
setStatisticsEnabled
public void setStatisticsEnabled(boolean enabled) Description copied from interface:JmxStatisticsExposerEnables an interceptor's cache statistics If true, the interceptor will capture statistics and make them available through the mbean.- Specified by:
setStatisticsEnabledin 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:
resetStatisticsin interfaceJmxStatisticsExposer
-