Class AbstractDelegatingHandler
java.lang.Object
org.infinispan.remoting.inboundhandler.AbstractDelegatingHandler
- All Implemented Interfaces:
PerCacheInboundInvocationHandler
public abstract class AbstractDelegatingHandler
extends Object
implements PerCacheInboundInvocationHandler
Class to be extended to allow some control over the
PerCacheInboundInvocationHandler
in tests.- Since:
- 7.1
- Author:
- Pedro Ruivo
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected -
Method Summary
Modifier and TypeMethodDescriptionprotected voidafterHandle(CacheRpcCommand command, DeliverOrder order, boolean delegated) Invoked after the command is handled.protected booleanbeforeHandle(CacheRpcCommand command, Reply reply, DeliverOrder order) Invoked before the command is handled by the realPerCacheInboundInvocationHandler.voidChecks if any pending tasks are now ready to be ran and will run in them in a separate thread.intvoidhandle(CacheRpcCommand command, Reply reply, DeliverOrder order) Handles theCacheRpcCommandfrom other node.voidsetFirstTopologyAsMember(int firstTopologyAsMember)
-
Field Details
-
delegate
-
-
Constructor Details
-
AbstractDelegatingHandler
-
-
Method Details
-
handle
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
Invoked before the command is handled by the realPerCacheInboundInvocationHandler.- Returns:
trueif the command should be handled by the readPerCacheInboundInvocationHandler,falseotherwise.
-
afterHandle
Invoked after the command is handled.- Parameters:
delegated-trueif the command was handled by the realPerCacheInboundInvocationHandler,falseotherwise.
-
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
-