Class BasePerCacheInboundInvocationHandler
- java.lang.Object
-
- org.infinispan.remoting.inboundhandler.BasePerCacheInboundInvocationHandler
-
- All Implemented Interfaces:
JmxStatisticsExposer,PerCacheInboundInvocationHandler
- Direct Known Subclasses:
NonTxPerCacheInboundInvocationHandler,TrianglePerCacheInboundInvocationHandler,TxPerCacheInboundInvocationHandler
@MBean(objectName="InboundInvocationHandler", description="Handles all the remote requests.") public abstract class BasePerCacheInboundInvocationHandler extends Object implements PerCacheInboundInvocationHandlerImplementation with the default handling methods and utilities methods.- Since:
- 7.1
- Author:
- Pedro Ruivo
-
-
Field Summary
Fields Modifier and Type Field Description protected BlockingTaskAwareExecutorServiceblockingExecutorprotected Configurationconfigurationstatic StringMBEAN_COMPONENT_NAMEprotected BlockingTaskAwareExecutorServicenonBlockingExecutor
-
Constructor Summary
Constructors Constructor Description BasePerCacheInboundInvocationHandler()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidcheckForReadyTasks()Checks if any pending tasks are now ready to be ran and will run in them in a separate thread.intgetFirstTopologyAsMember()protected abstract LoggetLog()booleangetStatisticsEnabled()Returns whether an interceptor's statistics are being captured.longgetXSiteRequestsReceived()booleanisCommandSentBeforeFirstTopology(int commandTopologyId)booleanisStatisticsEnabled()booleanisStopped()protected abstract booleanisTraceEnabled()voidregisterXSiteCommandReceiver()voidresetStatistics()Resets an interceptor's cache statisticsvoidsetFirstTopologyAsMember(int firstTopologyAsMember)voidsetStatisticsEnabled(boolean enabled)Enables an interceptor's cache statistics If true, the interceptor will capture statistics and make them available through the mbean.voidstart()voidstop()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.infinispan.remoting.inboundhandler.PerCacheInboundInvocationHandler
handle
-
-
-
-
Field Detail
-
MBEAN_COMPONENT_NAME
public static final String MBEAN_COMPONENT_NAME
- See Also:
- Constant Field Values
-
blockingExecutor
protected BlockingTaskAwareExecutorService blockingExecutor
-
nonBlockingExecutor
protected BlockingTaskAwareExecutorService nonBlockingExecutor
-
configuration
protected Configuration configuration
-
-
Method Detail
-
start
public void start()
-
stop
public void stop()
-
isStopped
public boolean isStopped()
-
isCommandSentBeforeFirstTopology
public final boolean isCommandSentBeforeFirstTopology(int commandTopologyId)
-
getLog
protected abstract Log getLog()
-
isTraceEnabled
protected abstract boolean isTraceEnabled()
-
registerXSiteCommandReceiver
public void registerXSiteCommandReceiver()
- Specified by:
registerXSiteCommandReceiverin interfacePerCacheInboundInvocationHandler
-
getStatisticsEnabled
public boolean getStatisticsEnabled()
Description copied from interface:JmxStatisticsExposerReturns whether an interceptor's statistics are being captured.- Specified by:
getStatisticsEnabledin interfaceJmxStatisticsExposer- Returns:
- true if statistics are captured
-
resetStatistics
@ManagedOperation(description="Resets statistics gathered by this component", displayName="Reset statistics") public void resetStatistics()Description copied from interface:JmxStatisticsExposerResets an interceptor's cache statistics- Specified by:
resetStatisticsin interfaceJmxStatisticsExposer
-
isStatisticsEnabled
@ManagedAttribute(description="Enables or disables the gathering of statistics by this component", displayName="Statistics enabled", dataType=TRAIT, writable=true) public boolean isStatisticsEnabled()
-
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- true if statistics should be captured
-
getXSiteRequestsReceived
@ManagedAttribute(description="Returns the number of cross-site requests received by this node", displayName="Cross-Site Requests Received") public long getXSiteRequestsReceived()
-
setFirstTopologyAsMember
public void setFirstTopologyAsMember(int firstTopologyAsMember)
- Specified by:
setFirstTopologyAsMemberin interfacePerCacheInboundInvocationHandler- Parameters:
firstTopologyAsMember- The first topology in which the local node was a member. Any command with a lower topology id will be ignored.
-
getFirstTopologyAsMember
public int getFirstTopologyAsMember()
- Specified by:
getFirstTopologyAsMemberin interfacePerCacheInboundInvocationHandler- Returns:
- The first topology in which the local node was a member. Any command with a lower topology id will be ignored.
-
checkForReadyTasks
public void checkForReadyTasks()
Description copied from interface:PerCacheInboundInvocationHandlerChecks if any pending tasks are now ready to be ran and will run in them in a separate thread. This method does not block.- Specified by:
checkForReadyTasksin interfacePerCacheInboundInvocationHandler
-
-