org.jboss.cache.interceptors
Class OptimisticReplicationInterceptor
java.lang.Object
org.jboss.cache.interceptors.Interceptor
org.jboss.cache.interceptors.BaseRpcInterceptor
org.jboss.cache.interceptors.OptimisticReplicationInterceptor
- All Implemented Interfaces:
- InterceptorMBean
public class OptimisticReplicationInterceptor
- extends BaseRpcInterceptor
Replication interceptor for the optimistically locked interceptor chain. Responsible for replicating
state to remote nodes. Unlike it's cousin, the ReplicationInterceptor
, this interceptor
only deals with transactional calls. Just like all things to do with Optimistic Locking, it is a requirement that
everything is done in a transaction and the transaction context is available via InvocationContext.getTransaction()
and InvocationContext.getGlobalTransaction()
.
- Author:
- Manik Surtani (manik@jboss.org), Steve Woodcock (stevew@jofti.com)
Methods inherited from class org.jboss.cache.interceptors.Interceptor |
dumpStatistics, getLast, getNext, getStatisticsEnabled, isActive, isOnePhaseCommitPrepareMehod, isPreparing, isValid, resetStatistics, setLast, setNext, setStatisticsEnabled, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
OptimisticReplicationInterceptor
public OptimisticReplicationInterceptor()
invoke
public java.lang.Object invoke(InvocationContext ctx)
throws java.lang.Throwable
- Overrides:
invoke
in class Interceptor
- Throws:
java.lang.Throwable
broadcastPrepare
protected void broadcastPrepare(MethodCall methodCall,
GlobalTransaction gtx)
throws java.lang.Throwable
- Throws:
java.lang.Throwable
broadcastCommit
protected void broadcastCommit(GlobalTransaction gtx)
throws java.lang.Throwable
- Throws:
java.lang.Throwable
broadcastRollback
protected void broadcastRollback(GlobalTransaction gtx)
throws java.lang.Throwable
- Throws:
java.lang.Throwable
getTransactionWorkspace
protected TransactionWorkspace getTransactionWorkspace(GlobalTransaction gtx)
throws CacheException
- Throws:
CacheException