org.jboss.cache.interceptors
Class OptimisticInterceptor
java.lang.Object
org.jboss.cache.interceptors.Interceptor
org.jboss.cache.interceptors.OptimisticInterceptor
- All Implemented Interfaces:
- InterceptorMBean
- Direct Known Subclasses:
- OptimisticCreateIfNotExistsInterceptor, OptimisticLockingInterceptor, OptimisticNodeInterceptor, OptimisticValidatorInterceptor
public class OptimisticInterceptor
- extends Interceptor
Abstract interceptor for optimistic locking
- Author:
- Manik Surtani (manik@jboss.org)
Methods inherited from class org.jboss.cache.interceptors.Interceptor |
dumpStatistics, getLast, getNext, getStatisticsEnabled, invoke, 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 |
txManager
protected javax.transaction.TransactionManager txManager
txTable
protected TransactionTable txTable
trace
protected boolean trace
OptimisticInterceptor
public OptimisticInterceptor()
setCache
public void setCache(CacheSPI cache)
- Overrides:
setCache
in class Interceptor
getTransactionWorkspace
protected TransactionWorkspace getTransactionWorkspace(GlobalTransaction gtx)
throws CacheException
- Throws:
CacheException
greedyGetFqns
protected void greedyGetFqns(java.util.List<Fqn> list,
NodeSPI<?,?> n,
Fqn newBase)
- Adds the Fqn of the node as well as all children and childrens children to the list.
- Parameters:
list
- n
-
getGlobalTransaction
protected GlobalTransaction getGlobalTransaction(InvocationContext ctx)
throws CacheException
- Returns:
- the
GlobalTransaction
, extracted from the current InvocationContext
.
- Throws:
CacheException
- if the GlobalTransaction
or Transaction
associated with the
InvocationContext
is null.