org.jboss.cache.interceptors
Class OptimisticLockingInterceptor
java.lang.Object
org.jboss.cache.interceptors.Interceptor
org.jboss.cache.interceptors.MethodDispacherInterceptor
org.jboss.cache.interceptors.OptimisticInterceptor
org.jboss.cache.interceptors.OptimisticLockingInterceptor
- All Implemented Interfaces:
- InterceptorMBean
public class OptimisticLockingInterceptor
- extends OptimisticInterceptor
Locks nodes during transaction boundaries. Only affects prepare/commit/rollback method calls; other method calls
are simply passed up the interceptor stack.
- Author:
- Manik Surtani (manik@jboss.org), Steve Woodcock (stevew@jofti.com)
Method Summary |
protected Object |
handleCommitMethod(InvocationContext ctx,
GlobalTransaction globalTransaction)
Handles CacheImpl.commit(org.jboss.cache.transaction.GlobalTransaction) |
protected Object |
handleLockMethod(InvocationContext ctx,
Fqn fqn,
NodeLock.LockType lockType,
boolean recursive)
Handles CacheImpl._lock(org.jboss.cache.Fqn, org.jboss.cache.lock.NodeLock.LockType, boolean) |
protected Object |
handleOptimisticPrepareMethod(InvocationContext ctx,
GlobalTransaction gtx,
List modifications,
Map data,
org.jgroups.Address address,
boolean onePhaseCommit)
Handles CacheImpl.optimisticPrepare(org.jboss.cache.transaction.GlobalTransaction, java.util.List, java.util.Map, org.jgroups.Address, boolean) |
protected Object |
handleRollbackMethod(InvocationContext ctx,
GlobalTransaction globalTransaction)
Handles CacheImpl.rollback(org.jboss.cache.transaction.GlobalTransaction) |
void |
setCache(CacheSPI cache)
|
Methods inherited from class org.jboss.cache.interceptors.MethodDispacherInterceptor |
handleAddChildMethod, handleBlockChannelMethod, handleDataGravitationCleanupMethod, handleEvictMethod, handleEvictVersionedNodeMethod, handleExistsMethod, handleGetDataMapMethod, handleGetChildrenNamesMethod, handleGetKeysMethod, handleGetKeyValueMethod, handleGetNodeMethod, handleMoveMethod, handlePrepareMethod, handlePrintMethod, handlePutDataEraseMethod, handlePutDataEraseVersionedMethod, handlePutDataMethod, handlePutDataVersionedMethod, handlePutForExternalReadMethod, handlePutForExternalReadVersionedMethod, handlePutKeyValueMethod, handlePutKeyValueVersionedMethod, handleReleaseAllLocksMethod, handleRemoveDataMethod, handleRemoveDataVersionedMethod, handleRemoveKeyMethod, handleRemoveKeyVersionedMethod, handleRemoveNodeMethod, handleRemoveNodeVersionedMethod, 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 |
OptimisticLockingInterceptor
public OptimisticLockingInterceptor()
setCache
public void setCache(CacheSPI cache)
- Overrides:
setCache
in class Interceptor
handleOptimisticPrepareMethod
protected Object handleOptimisticPrepareMethod(InvocationContext ctx,
GlobalTransaction gtx,
List modifications,
Map data,
org.jgroups.Address address,
boolean onePhaseCommit)
throws Throwable
- Description copied from class:
MethodDispacherInterceptor
- Handles
CacheImpl.optimisticPrepare(org.jboss.cache.transaction.GlobalTransaction, java.util.List, java.util.Map, org.jgroups.Address, boolean)
- Overrides:
handleOptimisticPrepareMethod
in class MethodDispacherInterceptor
- Throws:
Throwable
handleCommitMethod
protected Object handleCommitMethod(InvocationContext ctx,
GlobalTransaction globalTransaction)
throws Throwable
- Description copied from class:
MethodDispacherInterceptor
- Handles
CacheImpl.commit(org.jboss.cache.transaction.GlobalTransaction)
- Overrides:
handleCommitMethod
in class MethodDispacherInterceptor
- Throws:
Throwable
handleRollbackMethod
protected Object handleRollbackMethod(InvocationContext ctx,
GlobalTransaction globalTransaction)
throws Throwable
- Description copied from class:
MethodDispacherInterceptor
- Handles
CacheImpl.rollback(org.jboss.cache.transaction.GlobalTransaction)
- Overrides:
handleRollbackMethod
in class MethodDispacherInterceptor
- Throws:
Throwable
handleLockMethod
protected Object handleLockMethod(InvocationContext ctx,
Fqn fqn,
NodeLock.LockType lockType,
boolean recursive)
- Description copied from class:
MethodDispacherInterceptor
- Handles
CacheImpl._lock(org.jboss.cache.Fqn, org.jboss.cache.lock.NodeLock.LockType, boolean)
- Overrides:
handleLockMethod
in class MethodDispacherInterceptor
Copyright © 2008 JBoss, a division of Red Hat. All Rights Reserved.