public abstract class AbstractDelegatingHandler extends Object implements PerCacheInboundInvocationHandler
PerCacheInboundInvocationHandler
in tests.Modifier and Type | Field and Description |
---|---|
protected PerCacheInboundInvocationHandler |
delegate |
Modifier | Constructor and Description |
---|---|
protected |
AbstractDelegatingHandler(PerCacheInboundInvocationHandler delegate) |
Modifier and Type | Method and Description |
---|---|
protected void |
afterHandle(CacheRpcCommand command,
DeliverOrder order,
boolean delegated)
Invoked after the command is handled.
|
protected boolean |
beforeHandle(CacheRpcCommand command,
Reply reply,
DeliverOrder order)
Invoked before the command is handled by the real
PerCacheInboundInvocationHandler . |
void |
checkForReadyTasks()
Checks if any pending tasks are now ready to be ran and will run in them in a separate thread.
|
int |
getFirstTopologyAsMember() |
boolean |
getStatisticsEnabled()
Returns whether an interceptor's statistics are being captured.
|
void |
handle(CacheRpcCommand command,
Reply reply,
DeliverOrder order)
Handles the
CacheRpcCommand from other node. |
void |
registerXSiteCommandReceiver() |
void |
resetStatistics()
Resets an interceptor's cache statistics
|
void |
setFirstTopologyAsMember(int firstTopologyAsMember) |
void |
setStatisticsEnabled(boolean enabled)
Enables an interceptor's cache statistics If true, the interceptor will capture statistics and make them available
through the mbean.
|
protected final PerCacheInboundInvocationHandler delegate
protected AbstractDelegatingHandler(PerCacheInboundInvocationHandler delegate)
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 setFirstTopologyAsMember(int firstTopologyAsMember)
setFirstTopologyAsMember
in interface PerCacheInboundInvocationHandler
firstTopologyAsMember
- The first topology in which the local node was a member.
Any command with a lower topology id will be ignored.public int getFirstTopologyAsMember()
getFirstTopologyAsMember
in interface PerCacheInboundInvocationHandler
protected boolean beforeHandle(CacheRpcCommand command, Reply reply, DeliverOrder order)
PerCacheInboundInvocationHandler
.true
if the command should be handled by the read PerCacheInboundInvocationHandler
,
false
otherwise.protected void afterHandle(CacheRpcCommand command, DeliverOrder order, boolean delegated)
delegated
- true
if the command was handled by the real PerCacheInboundInvocationHandler
,
false
otherwise.public void registerXSiteCommandReceiver()
registerXSiteCommandReceiver
in interface PerCacheInboundInvocationHandler
public boolean getStatisticsEnabled()
JmxStatisticsExposer
getStatisticsEnabled
in interface JmxStatisticsExposer
public void setStatisticsEnabled(boolean enabled)
JmxStatisticsExposer
setStatisticsEnabled
in interface JmxStatisticsExposer
enabled
- true if statistics should be capturedpublic void resetStatistics()
JmxStatisticsExposer
resetStatistics
in interface JmxStatisticsExposer
public void checkForReadyTasks()
PerCacheInboundInvocationHandler
checkForReadyTasks
in interface PerCacheInboundInvocationHandler
Copyright © 2021 JBoss by Red Hat. All rights reserved.