Class AbstractDelegatingHandler
- java.lang.Object
-
- org.infinispan.remoting.inboundhandler.AbstractDelegatingHandler
-
- All Implemented Interfaces:
JmxStatisticsExposer,PerCacheInboundInvocationHandler
public abstract class AbstractDelegatingHandler extends Object implements PerCacheInboundInvocationHandler
Class to be extended to allow some control over thePerCacheInboundInvocationHandlerin tests.- Since:
- 7.1
- Author:
- Pedro Ruivo
-
-
Field Summary
Fields Modifier and Type Field Description protected PerCacheInboundInvocationHandlerdelegate
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractDelegatingHandler(PerCacheInboundInvocationHandler delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidafterHandle(org.infinispan.commands.remote.CacheRpcCommand command, DeliverOrder order, boolean delegated)Invoked after the command is handled.protected booleanbeforeHandle(org.infinispan.commands.remote.CacheRpcCommand command, Reply reply, DeliverOrder order)Invoked before the command is handled by the realPerCacheInboundInvocationHandler.intgetFirstTopologyAsMember()booleangetStatisticsEnabled()Returns whether an interceptor's statistics are being captured.voidhandle(org.infinispan.commands.remote.CacheRpcCommand command, Reply reply, DeliverOrder order)Handles theCacheRpcCommandfrom other node.voidregisterXSiteCommandReceiver(boolean sync)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.-
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
registerXSiteActionSequencer
-
-
-
-
Field Detail
-
delegate
protected final PerCacheInboundInvocationHandler delegate
-
-
Constructor Detail
-
AbstractDelegatingHandler
protected AbstractDelegatingHandler(PerCacheInboundInvocationHandler delegate)
-
-
Method Detail
-
handle
public void handle(org.infinispan.commands.remote.CacheRpcCommand command, Reply reply, DeliverOrder order)Description copied from interface:PerCacheInboundInvocationHandlerHandles theCacheRpcCommandfrom other node.- Specified by:
handlein interfacePerCacheInboundInvocationHandler- Parameters:
command- theCacheRpcCommandto handle-reply- the return value is passed to this object in order to be sent back to the senderorder- theDeliverOrderin which the command was sent
-
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.
-
beforeHandle
protected boolean beforeHandle(org.infinispan.commands.remote.CacheRpcCommand command, Reply reply, DeliverOrder order)Invoked before the command is handled by the realPerCacheInboundInvocationHandler.- Returns:
trueif the command should be handled by the readPerCacheInboundInvocationHandler,falseotherwise.
-
afterHandle
protected void afterHandle(org.infinispan.commands.remote.CacheRpcCommand command, DeliverOrder order, boolean delegated)Invoked after the command is handled.- Parameters:
delegated-trueif the command was handled by the realPerCacheInboundInvocationHandler,falseotherwise.
-
registerXSiteCommandReceiver
public void registerXSiteCommandReceiver(boolean sync)
- 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
-
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
-
resetStatistics
public void resetStatistics()
Description copied from interface:JmxStatisticsExposerResets an interceptor's cache statistics- Specified by:
resetStatisticsin interfaceJmxStatisticsExposer
-
-