|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.cache.interceptors.Interceptor
org.jboss.cache.interceptors.OptimisticInterceptor
org.jboss.cache.interceptors.TxInterceptor
public class TxInterceptor
This interceptor is the new default at the head of all interceptor chains, and makes transactional attributes available to all interceptors in the chain. This interceptor is also responsible for registering for synchronisation on transaction completion.
| Field Summary | |
|---|---|
protected javax.transaction.TransactionManager |
txManager
|
protected TransactionTable |
txTable
|
| Constructor Summary | |
|---|---|
TxInterceptor()
|
|
| Method Summary | |
|---|---|
java.util.Map |
dumpStatistics()
Returns a map of the cache interceptor's statistics Map elements consist of {String name, Object value} entries |
protected GlobalTransaction |
findGlobalTransaction(java.lang.Object[] params)
|
long |
getCommits()
Returns the number of transaction commits |
long |
getPrepares()
Returns the number of transaction prepares |
long |
getRollbacks()
Returns the number of transaction rollbacks |
void |
injectDataVersion(java.lang.Object obj)
|
java.lang.Object |
invoke(org.jgroups.blocks.MethodCall call)
|
void |
resetStatistics()
Resets an interceptor's cache statistics |
protected void |
runCommitPhase(GlobalTransaction gtx,
javax.transaction.Transaction tx,
java.util.List modifications,
boolean onePhaseCommit)
creates a commit() MethodCall and feeds it to handleCommitRollback(); |
protected java.lang.Object |
runPreparePhase(GlobalTransaction gtx,
java.util.List modifications)
Handles a local prepare - invoked by the sync handler. |
protected void |
runRollbackPhase(GlobalTransaction gtx,
javax.transaction.Transaction tx,
java.util.List modifications)
creates a rollback() MethodCall and feeds it to handleCommitRollback(); |
void |
setCache(TreeCache cache)
|
| Methods inherited from class org.jboss.cache.interceptors.OptimisticInterceptor |
|---|
getTransactionWorkspace |
| Methods inherited from class org.jboss.cache.interceptors.Interceptor |
|---|
getInvocationContext, getNext, getStatisticsEnabled, isActive, isBuddyGroupOrganisationMethod, isOnePhaseCommitPrepareMehod, isPreparing, isTransactionLifecycleMethod, isValid, setInvocationContext, setNext, setStatisticsEnabled |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.jboss.cache.interceptors.InterceptorMBean |
|---|
getStatisticsEnabled, setStatisticsEnabled |
| Field Detail |
|---|
protected javax.transaction.TransactionManager txManager
protected TransactionTable txTable
| Constructor Detail |
|---|
public TxInterceptor()
| Method Detail |
|---|
public void setCache(TreeCache cache)
setCache in class OptimisticInterceptor
public java.lang.Object invoke(org.jgroups.blocks.MethodCall call)
throws java.lang.Throwable
invoke in class Interceptorjava.lang.Throwablepublic long getPrepares()
TxInterceptorMBean
getPrepares in interface TxInterceptorMBeanpublic long getCommits()
TxInterceptorMBean
getCommits in interface TxInterceptorMBeanpublic long getRollbacks()
TxInterceptorMBean
getRollbacks in interface TxInterceptorMBeanpublic void resetStatistics()
InterceptorMBean
resetStatistics in interface InterceptorMBeanresetStatistics in class Interceptorpublic java.util.Map dumpStatistics()
InterceptorMBean
dumpStatistics in interface InterceptorMBeandumpStatistics in class Interceptorprotected GlobalTransaction findGlobalTransaction(java.lang.Object[] params)
public void injectDataVersion(java.lang.Object obj)
protected void runCommitPhase(GlobalTransaction gtx,
javax.transaction.Transaction tx,
java.util.List modifications,
boolean onePhaseCommit)
gtx -
protected void runRollbackPhase(GlobalTransaction gtx,
javax.transaction.Transaction tx,
java.util.List modifications)
gtx -
protected java.lang.Object runPreparePhase(GlobalTransaction gtx,
java.util.List modifications)
throws java.lang.Throwable
java.lang.Throwable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||