org.infinispan.interceptors.base
Class BaseRpcInterceptor
java.lang.Object
org.infinispan.commands.AbstractVisitor
org.infinispan.interceptors.base.CommandInterceptor
org.infinispan.interceptors.base.BaseRpcInterceptor
- All Implemented Interfaces:
- Visitor
- Direct Known Subclasses:
- DistributionInterceptor, InvalidationInterceptor, ReplicationInterceptor
public abstract class BaseRpcInterceptor
- extends CommandInterceptor
Acts as a base for all RPC calls - subclassed by
- Since:
- 4.0
- Author:
- Manik Surtani (manik@jboss.org)
Method Summary |
protected void |
checkResponses(List rsps)
Checks whether any of the responses are exceptions. |
void |
init()
|
void |
injectComponents(RpcManager rpcManager,
ReplicationQueue replicationQueue,
TransactionTable txTable,
CommandsFactory commandsFactory)
|
protected boolean |
isLocalModeForced(InvocationContext ctx)
|
protected boolean |
isSynchronous(InvocationContext ctx)
|
protected boolean |
isTransactionalAndLocal(InvocationContext ctx)
The call runs in a transaction and it was initiated on this cache instance of the cluster. |
protected void |
replicateCall(InvocationContext ctx,
CacheRpcCommand call,
boolean sync)
|
protected void |
replicateCall(InvocationContext ctx,
CacheRpcCommand call,
boolean sync,
boolean useOutOfBandMessage)
|
protected void |
replicateCall(InvocationContext ctx,
List<Address> recipients,
ReplicableCommand c,
boolean sync,
boolean useOutOfBandMessage)
|
protected void |
replicateCall(InvocationContext ctx,
ReplicableCommand call,
boolean sync)
|
protected void |
replicateCall(InvocationContext ctx,
ReplicableCommand call,
boolean sync,
boolean useOutOfBandMessage)
|
protected void |
replicateCall(List<Address> recipients,
ReplicableCommand call,
boolean sync,
boolean useOutOfBandMessage,
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.infinispan.commands.AbstractVisitor |
visitClearCommand, visitCollection, visitCommitCommand, visitEvictCommand, visitGetKeyValueCommand, visitInvalidateCommand, visitPrepareCommand, visitPutKeyValueCommand, visitPutMapCommand, visitRemoveCommand, visitReplaceCommand, visitRollbackCommand, visitSizeCommand |
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,
ReplicationQueue replicationQueue,
TransactionTable txTable,
CommandsFactory commandsFactory)
init
public void init()
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,
CacheRpcCommand call,
boolean sync,
boolean useOutOfBandMessage)
throws Throwable
- Throws:
Throwable
replicateCall
protected void replicateCall(InvocationContext ctx,
ReplicableCommand call,
boolean sync,
boolean useOutOfBandMessage)
throws Throwable
- Throws:
Throwable
replicateCall
protected void replicateCall(InvocationContext ctx,
CacheRpcCommand call,
boolean sync)
throws Throwable
- Throws:
Throwable
replicateCall
protected void replicateCall(InvocationContext ctx,
ReplicableCommand call,
boolean sync)
throws Throwable
- Throws:
Throwable
replicateCall
protected void replicateCall(InvocationContext ctx,
List<Address> recipients,
ReplicableCommand c,
boolean sync,
boolean useOutOfBandMessage)
throws Throwable
- Throws:
Throwable
replicateCall
protected void replicateCall(List<Address> recipients,
ReplicableCommand call,
boolean sync,
boolean useOutOfBandMessage,
long timeout)
throws Throwable
- Throws:
Throwable
skipReplicationOfTransactionMethod
protected final 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 final boolean isTransactionalAndLocal(InvocationContext ctx)
- The call runs in a transaction and it was initiated on this cache instance of the cluster.
isSynchronous
protected final boolean isSynchronous(InvocationContext ctx)
isLocalModeForced
protected final boolean isLocalModeForced(InvocationContext ctx)
Copyright © 2009 JBoss, a division of Red Hat. All Rights Reserved.