org.jboss.cache.interceptors
Class BaseRpcInterceptor
java.lang.Object
org.jboss.cache.interceptors.Interceptor
org.jboss.cache.interceptors.MethodDispacherInterceptor
org.jboss.cache.interceptors.BaseRpcInterceptor
- All Implemented Interfaces:
- InterceptorMBean
- Direct Known Subclasses:
- DataGravitatorInterceptor, InvalidationInterceptor, OptimisticReplicationInterceptor, ReplicationInterceptor
public abstract class BaseRpcInterceptor
- extends MethodDispacherInterceptor
Acts as a base for all RPC calls - subclassed by
ReplicationInterceptor
and OptimisticReplicationInterceptor
.
- Author:
- Manik Surtani (manik@jboss.org)
Method Summary |
protected boolean |
containsModifications(InvocationContext ctx)
|
protected void |
checkResponses(List rsps)
Checks whether any of the responses are exceptions. |
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 |
putCallOnAsyncReplicationQueue(MethodCall call)
|
protected void |
replicateCall(InvocationContext ctx,
List<org.jgroups.Address> recipients,
MethodCall call,
boolean sync,
Option o)
|
protected void |
replicateCall(InvocationContext ctx,
List<org.jgroups.Address> recipients,
MethodCall call,
boolean sync,
Option o,
boolean wrapMethodCallInReplicateMethod,
boolean useOutOfBandMessage)
|
protected void |
replicateCall(InvocationContext ctx,
MethodCall call,
boolean sync,
Option o)
|
protected void |
replicateCall(InvocationContext ctx,
MethodCall call,
boolean sync,
Option o,
boolean useOutOfBandMessage)
|
void |
setCache(CacheSPI cache)
|
protected boolean |
skipReplicationOfTransactionMethod(InvocationContext ctx)
It does not make sense replicating a transaction method(commit, rollback, prepare) if one of the following:
- call was not initiated here, but on other member of the cluster
- there is no transaction. |
Methods inherited from class org.jboss.cache.interceptors.MethodDispacherInterceptor |
handleAddChildMethod, handleBlockChannelMethod, handleCommitMethod, handleDataGravitationCleanupMethod, handleEvictMethod, handleEvictVersionedNodeMethod, handleExistsMethod, handleGetDataMapMethod, handleGetChildrenNamesMethod, handleGetKeysMethod, handleGetKeyValueMethod, handleGetNodeMethod, handleLockMethod, handleMoveMethod, handleOptimisticPrepareMethod, handlePrepareMethod, handlePrintMethod, handlePutDataEraseMethod, handlePutDataEraseVersionedMethod, handlePutDataMethod, handlePutDataVersionedMethod, handlePutForExternalReadMethod, handlePutForExternalReadVersionedMethod, handlePutKeyValueMethod, handlePutKeyValueVersionedMethod, handleReleaseAllLocksMethod, handleRemoveDataMethod, handleRemoveDataVersionedMethod, handleRemoveKeyMethod, handleRemoveKeyVersionedMethod, handleRemoveNodeMethod, handleRemoveNodeVersionedMethod, handleRollbackMethod, handleUnblockChannelMethod, invoke, skipMethodCall |
Methods inherited from class org.jboss.cache.interceptors.Interceptor |
assertTransactionValid, dumpStatistics, getLast, getNext, getStatisticsEnabled, initLogger, isActive, isPreparing, isValid, nextInterceptor, peekNode, resetStatistics, setLast, setNext, setStatisticsEnabled, toString |
defaultSynchronous
protected boolean defaultSynchronous
BaseRpcInterceptor
public BaseRpcInterceptor()
setCache
public void setCache(CacheSPI cache)
- Overrides:
setCache
in class Interceptor
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,
MethodCall call,
boolean sync,
Option o,
boolean useOutOfBandMessage)
throws Throwable
- Throws:
Throwable
replicateCall
protected void replicateCall(InvocationContext ctx,
MethodCall call,
boolean sync,
Option o)
throws Throwable
- Throws:
Throwable
replicateCall
protected void replicateCall(InvocationContext ctx,
List<org.jgroups.Address> recipients,
MethodCall call,
boolean sync,
Option o)
throws Throwable
- Throws:
Throwable
replicateCall
protected void replicateCall(InvocationContext ctx,
List<org.jgroups.Address> recipients,
MethodCall call,
boolean sync,
Option o,
boolean wrapMethodCallInReplicateMethod,
boolean useOutOfBandMessage)
throws Throwable
- Throws:
Throwable
putCallOnAsyncReplicationQueue
protected void putCallOnAsyncReplicationQueue(MethodCall call)
containsModifications
protected boolean containsModifications(InvocationContext ctx)
skipReplicationOfTransactionMethod
protected boolean skipReplicationOfTransactionMethod(InvocationContext ctx)
- It does not make sense replicating a transaction method(commit, rollback, prepare) if one of the following:
- call was not initiated here, but on other member of the cluster
- there is no transaction. Why calling a commit if no transaction going on?
- the current transaction did not modufy any data, so other members are not aware of it
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)
Copyright © 2008 JBoss, a division of Red Hat. All Rights Reserved.