org.jboss.cache.interceptors
Class BaseRpcInterceptor
java.lang.Object
org.jboss.cache.commands.AbstractVisitor
org.jboss.cache.interceptors.base.CommandInterceptor
org.jboss.cache.interceptors.BaseRpcInterceptor
- All Implemented Interfaces:
- Visitor
- Direct Known Subclasses:
- InvalidationInterceptor, LegacyDataGravitatorInterceptor, OptimisticReplicationInterceptor, ReplicationInterceptor
public abstract class BaseRpcInterceptor
- extends CommandInterceptor
Acts as a base for all RPC calls - subclassed by
ReplicationInterceptor
and OptimisticReplicationInterceptor
.
- Author:
- Manik Surtani (manik AT jboss DOT org)
Method Summary |
protected void |
checkResponses(List rsps)
Checks whether any of the responses are exceptions. |
void |
injectComponents(RPCManager rpcManager,
BuddyManager buddyManager,
ReplicationQueue replicationQueue,
TransactionTable txTable,
CommandsFactory commandsFactory)
|
protected boolean |
isLocalModeForced(InvocationContext ctx)
|
protected boolean |
isSynchronous(Option option)
|
protected boolean |
isTransactionalAndLocal(InvocationContext ctx)
The call runs in a transaction and it was initiated on this node of the cluster. |
protected void |
replicateCall(InvocationContext ctx,
ReplicableCommand call,
boolean sync,
Option o)
|
protected void |
replicateCall(InvocationContext ctx,
ReplicableCommand call,
boolean sync,
Option o,
boolean useOutOfBandMessage)
|
protected void |
replicateCall(InvocationContext ctx,
Vector<org.jgroups.Address> recipients,
ReplicableCommand c,
boolean sync,
Option o,
boolean useOutOfBandMessage)
|
protected void |
replicateCall(Vector<org.jgroups.Address> recipients,
ReplicableCommand call,
boolean sync,
boolean wrapCacheCommandInReplicateMethod,
boolean useOutOfBandMessage,
boolean isBroadcast,
long timeout)
|
protected boolean |
skipReplicationOfTransactionMethod(InvocationContext ctx)
It does not make sense replicating a transaction method(commit, rollback, prepare) if one of the following is true: |
Methods inherited from class org.jboss.cache.commands.AbstractVisitor |
visitClearDataCommand, visitCollection, visitCommitCommand, visitCreateNodeCommand, visitEvictFqnCommand, visitExistsNodeCommand, visitGetChildrenNamesCommand, visitGetDataMapCommand, visitGetKeysCommand, visitGetKeyValueCommand, visitGetNodeCommand, visitGravitateDataCommand, visitInvalidateCommand, visitMoveCommand, visitOptimisticPrepareCommand, visitPrepareCommand, visitPutDataMapCommand, visitPutForExternalReadCommand, visitPutKeyValueCommand, visitRemoveKeyCommand, visitRemoveNodeCommand, visitRollbackCommand |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
txTable
protected TransactionTable txTable
rpcManager
protected RPCManager rpcManager
defaultSynchronous
protected boolean defaultSynchronous
BaseRpcInterceptor
public BaseRpcInterceptor()
injectComponents
public void injectComponents(RPCManager rpcManager,
BuddyManager buddyManager,
ReplicationQueue replicationQueue,
TransactionTable txTable,
CommandsFactory commandsFactory)
checkResponses
protected void checkResponses(List rsps)
throws Throwable
- Checks whether any of the responses are exceptions. If yes, re-throws
them (as exceptions or runtime exceptions).
- Throws:
Throwable
replicateCall
protected void replicateCall(InvocationContext ctx,
ReplicableCommand call,
boolean sync,
Option o,
boolean useOutOfBandMessage)
throws Throwable
- Throws:
Throwable
replicateCall
protected void replicateCall(InvocationContext ctx,
ReplicableCommand call,
boolean sync,
Option o)
throws Throwable
- Throws:
Throwable
replicateCall
protected void replicateCall(InvocationContext ctx,
Vector<org.jgroups.Address> recipients,
ReplicableCommand c,
boolean sync,
Option o,
boolean useOutOfBandMessage)
throws Throwable
- Throws:
Throwable
replicateCall
protected void replicateCall(Vector<org.jgroups.Address> recipients,
ReplicableCommand call,
boolean sync,
boolean wrapCacheCommandInReplicateMethod,
boolean useOutOfBandMessage,
boolean isBroadcast,
long timeout)
throws Throwable
- Throws:
Throwable
skipReplicationOfTransactionMethod
protected boolean skipReplicationOfTransactionMethod(InvocationContext ctx)
- It does not make sense replicating a transaction method(commit, rollback, prepare) if one of the following is true:
- call was not initiated here, but on other member of the cluster
- there is no transaction. Why broadcast a commit or rollback if there is no transaction going on?
- the current transaction did not modify any data
isTransactionalAndLocal
protected boolean isTransactionalAndLocal(InvocationContext ctx)
- The call runs in a transaction and it was initiated on this node of the cluster.
isSynchronous
protected boolean isSynchronous(Option option)
isLocalModeForced
protected boolean isLocalModeForced(InvocationContext ctx)
Copyright © 2009 JBoss, a division of Red Hat. All Rights Reserved.