Class TrianglePerCacheInboundInvocationHandler
- java.lang.Object
-
- org.infinispan.remoting.inboundhandler.BasePerCacheInboundInvocationHandler
-
- org.infinispan.remoting.inboundhandler.TrianglePerCacheInboundInvocationHandler
-
- All Implemented Interfaces:
JmxStatisticsExposer
,Action
,PerCacheInboundInvocationHandler
,LockListener
public class TrianglePerCacheInboundInvocationHandler extends BasePerCacheInboundInvocationHandler implements LockListener, Action
APerCacheInboundInvocationHandler
implementation for non-transactional and distributed caches that uses the triangle algorithm.- Since:
- 9.0
- Author:
- Pedro Ruivo
-
-
Field Summary
-
Fields inherited from class org.infinispan.remoting.inboundhandler.BasePerCacheInboundInvocationHandler
configuration, MBEAN_COMPONENT_NAME, remoteCommandsExecutor
-
-
Constructor Summary
Constructors Constructor Description TrianglePerCacheInboundInvocationHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ActionStatus
check(ActionState state)
It checks this action.protected org.infinispan.util.logging.Log
getLog()
BlockingTaskAwareExecutorService
getRemoteExecutor()
TriangleOrderManager
getTriangleOrderManager()
void
handle(org.infinispan.commands.remote.CacheRpcCommand command, Reply reply, DeliverOrder order)
Handles theCacheRpcCommand
from other node.protected boolean
isTraceEnabled()
void
onEvent(LockState state)
Invoked when the lock is available.void
onFinally(ActionState state)
Invoked always after the command is executed.void
start()
-
Methods inherited from class org.infinispan.remoting.inboundhandler.BasePerCacheInboundInvocationHandler
getAsyncXSitePendingRequests, getAsyncXSiteRequestQueueTime, getAsyncXSiteRequestRunningTime, getAsyncXSiteRequestsReceived, getAsyncXSiteRunningRequests, getFirstTopologyAsMember, getStatisticsEnabled, getSyncXSiteRequestsReceived, isCommandSentBeforeFirstTopology, isStatisticsEnabled, isStopped, registerXSiteActionSequencer, registerXSiteCommandReceiver, resetStatistics, setFirstTopologyAsMember, setStatisticsEnabled, stop
-
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.action.Action
addListener, onException
-
-
-
-
Method Detail
-
start
public void start()
- Overrides:
start
in classBasePerCacheInboundInvocationHandler
-
handle
public void handle(org.infinispan.commands.remote.CacheRpcCommand command, Reply reply, DeliverOrder order)
Description copied from interface:PerCacheInboundInvocationHandler
Handles theCacheRpcCommand
from other node.- Specified by:
handle
in interfacePerCacheInboundInvocationHandler
- Parameters:
command
- theCacheRpcCommand
to handle-reply
- the return value is passed to this object in order to be sent back to the senderorder
- theDeliverOrder
in which the command was sent
-
onEvent
public void onEvent(LockState state)
Description copied from interface:LockListener
Invoked when the lock is available.- Specified by:
onEvent
in interfaceLockListener
- Parameters:
state
- the lock state. Possible values areLockState.ACQUIRED
,LockState.TIMED_OUT
orLockState.DEADLOCKED
.
-
check
public ActionStatus check(ActionState state)
Description copied from interface:Action
It checks this action. WhenActionStatus.READY
orActionStatus.CANCELED
are final states. This method should be thread safe and idempotent since it can be invoked multiple times by multiples threads.
-
getTriangleOrderManager
public TriangleOrderManager getTriangleOrderManager()
-
getRemoteExecutor
public BlockingTaskAwareExecutorService getRemoteExecutor()
-
onFinally
public void onFinally(ActionState state)
Description copied from interface:Action
Invoked always after the command is executed.
-
getLog
protected org.infinispan.util.logging.Log getLog()
- Specified by:
getLog
in classBasePerCacheInboundInvocationHandler
-
isTraceEnabled
protected boolean isTraceEnabled()
- Specified by:
isTraceEnabled
in classBasePerCacheInboundInvocationHandler
-
-