public class TrianglePerCacheInboundInvocationHandler extends BasePerCacheInboundInvocationHandler implements LockListener, Action
PerCacheInboundInvocationHandler
implementation for non-transactional and distributed caches that uses the
triangle algorithm.blockingExecutor, configuration, MBEAN_COMPONENT_NAME, nonBlockingExecutor
Constructor and Description |
---|
TrianglePerCacheInboundInvocationHandler() |
Modifier and Type | Method and Description |
---|---|
ActionStatus |
check(ActionState state)
It checks this action.
|
protected Log |
getLog() |
TriangleOrderManager |
getTriangleOrderManager() |
void |
handle(CacheRpcCommand command,
Reply reply,
DeliverOrder order)
Handles the
CacheRpcCommand 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() |
checkForReadyTasks, getFirstTopologyAsMember, getStatisticsEnabled, getXSiteRequestsReceived, isCommandSentBeforeFirstTopology, isStatisticsEnabled, isStopped, registerXSiteCommandReceiver, resetStatistics, setFirstTopologyAsMember, setStatisticsEnabled, stop
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addListener, onException
public TrianglePerCacheInboundInvocationHandler()
public void start()
start
in class BasePerCacheInboundInvocationHandler
public void handle(CacheRpcCommand command, Reply reply, DeliverOrder order)
PerCacheInboundInvocationHandler
CacheRpcCommand
from other node.handle
in interface PerCacheInboundInvocationHandler
command
- the CacheRpcCommand
to handle.reply
- the return value is passed to this object in order to be sent back to the senderorder
- the DeliverOrder
in which the command was sentpublic void onEvent(LockState state)
LockListener
onEvent
in interface LockListener
state
- the lock state. Possible values are LockState.ACQUIRED
, LockState.TIMED_OUT
or
LockState.DEADLOCKED
.public ActionStatus check(ActionState state)
Action
ActionStatus.READY
or ActionStatus.CANCELED
are final states.
This method should be thread safe and idempotent since it can be invoked multiple times by multiples threads.public TriangleOrderManager getTriangleOrderManager()
public void onFinally(ActionState state)
Action
protected Log getLog()
getLog
in class BasePerCacheInboundInvocationHandler
protected boolean isTraceEnabled()
isTraceEnabled
in class BasePerCacheInboundInvocationHandler
Copyright © 2021 JBoss by Red Hat. All rights reserved.