org.jboss.cache.interceptors
Class TxInterceptor

java.lang.Object
  extended by org.jboss.cache.interceptors.Interceptor
      extended by org.jboss.cache.interceptors.MethodDispacherInterceptor
          extended by org.jboss.cache.interceptors.BaseTransactionalContextInterceptor
              extended by org.jboss.cache.interceptors.TxInterceptor
All Implemented Interfaces:
InterceptorMBean, TxInterceptorMBean

public class TxInterceptor
extends BaseTransactionalContextInterceptor
implements TxInterceptorMBean

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.

Author:
Manik Surtani (manik@jboss.org), Steve Woodcock (stevew@jofti.com)

Field Summary
 
Fields inherited from class org.jboss.cache.interceptors.BaseTransactionalContextInterceptor
txManager, txTable
 
Fields inherited from class org.jboss.cache.interceptors.Interceptor
cache, configuration, last, log, next, trace
 
Constructor Summary
TxInterceptor()
           
 
Method Summary
 Map<String,Object> dumpStatistics()
          This implementation returns an empty Map.
 long getCommits()
          Returns the number of transaction commits
 long getPrepares()
          Returns the number of transaction prepares
 long getRollbacks()
          Returns the number of transaction rollbacks
protected  Object handleAddChildMethod(InvocationContext ctx, GlobalTransaction tx, Fqn parentFqn, Object childName, Node cn, boolean createUndoOps)
          Handles CacheImpl._addChild(org.jboss.cache.transaction.GlobalTransaction, org.jboss.cache.Fqn, Object, org.jboss.cache.Node, boolean)
protected  Object handleCommitMethod(InvocationContext ctx, GlobalTransaction globalTransaction)
          Handles CacheImpl.commit(org.jboss.cache.transaction.GlobalTransaction)
protected  Object handleDataGravitationCleanupMethod(InvocationContext ctx, Fqn primary, Fqn backup)
          Handles RemoteCacheInvocationDelegate.dataGravitationCleanup(org.jboss.cache.Fqn, org.jboss.cache.Fqn)
protected  Object handleEvictMethod(InvocationContext ctx, Fqn fqn)
          Handles evict()
protected  Object handleEvictVersionedNodeMethod(InvocationContext ctx, Fqn fqn, DataVersion dataVersion)
          Handles CacheImpl._evict(org.jboss.cache.Fqn, org.jboss.cache.optimistic.DataVersion)
protected  Object handleExistsMethod(InvocationContext ctx, Fqn fqn)
          Handles CacheImpl.exists(String)
protected  Object handleGetDataMapMethod(InvocationContext ctx, Fqn fqn)
          Handles CacheImpl._getData(org.jboss.cache.Fqn)
protected  Object handleGetChildrenNamesMethod(InvocationContext ctx, Fqn fqn)
          Handles CacheImpl._getChildrenNames(org.jboss.cache.Fqn)
protected  Object handleGetKeysMethod(InvocationContext ctx, Fqn fqn)
          Handles Cache.getKeys(Fqn)
protected  Object handleGetKeyValueMethod(InvocationContext ctx, Fqn fqn, Object key, boolean sendNodeEvent)
          Handles CacheImpl._get(org.jboss.cache.Fqn, Object, boolean)
protected  Object handleGetNodeMethod(InvocationContext ctx, Fqn fqn)
          Handles CacheImpl._get(org.jboss.cache.Fqn)
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 handleMoveMethod(InvocationContext ctx, Fqn from, Fqn to)
          Handles CacheImpl._move(org.jboss.cache.Fqn, org.jboss.cache.Fqn)
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 handlePrepareMethod(InvocationContext ctx, GlobalTransaction gtx, List modification, org.jgroups.Address coordinator, boolean onePhaseCommit)
          Handles CacheImpl.prepare(org.jboss.cache.transaction.GlobalTransaction, java.util.List, org.jgroups.Address, boolean)
protected  Object handlePrintMethod(InvocationContext ctx, Fqn fqn)
          Handles CacheImpl._print(org.jboss.cache.Fqn)
protected  Object handlePutDataEraseMethod(InvocationContext ctx, GlobalTransaction gt, Fqn fqn, Map newData, boolean createUndoOps, boolean eraseContents)
          Handles CacheImpl._put(org.jboss.cache.transaction.GlobalTransaction, org.jboss.cache.Fqn, java.util.Map, boolean, boolean)
protected  Object handlePutDataEraseVersionedMethod(InvocationContext ctx, GlobalTransaction gtx, Fqn fqn, Map data, boolean createUndoOps, boolean eraseContent, DataVersion dv)
          Handles CacheImpl._put(org.jboss.cache.transaction.GlobalTransaction, org.jboss.cache.Fqn, java.util.Map, boolean, boolean, org.jboss.cache.optimistic.DataVersion)
protected  Object handlePutDataMethod(InvocationContext ctx, GlobalTransaction tx, Fqn fqn, Map data, boolean createUndoOps)
          Handles CacheImpl._put(org.jboss.cache.transaction.GlobalTransaction, String, java.util.Map, boolean)
protected  Object handlePutDataVersionedMethod(InvocationContext ctx, GlobalTransaction globalTransaction, Fqn fqn, Map map, Boolean createUndoOps, DataVersion dataVersion)
          Handles CacheImpl._put(org.jboss.cache.transaction.GlobalTransaction, org.jboss.cache.Fqn, java.util.Map, boolean, org.jboss.cache.optimistic.DataVersion)
protected  Object handlePutForExternalReadMethod(InvocationContext ctx, GlobalTransaction tx, Fqn fqn, Object key, Object value)
          Handles CacheImpl._putForExternalRead(org.jboss.cache.transaction.GlobalTransaction, org.jboss.cache.Fqn, Object, Object)
protected  Object handlePutForExternalReadVersionedMethod(InvocationContext ctx, GlobalTransaction gtx, Fqn fqn, Object key, Object value, DataVersion dv)
          Handles CacheImpl._putForExternalRead(org.jboss.cache.transaction.GlobalTransaction, org.jboss.cache.Fqn, Object, Object, org.jboss.cache.optimistic.DataVersion)
protected  Object handlePutKeyValueMethod(InvocationContext ctx, GlobalTransaction gtx, Fqn fqn, Object key, Object value, boolean createUndoOps)
          Handles CacheImpl._put(org.jboss.cache.transaction.GlobalTransaction, String, Object, Object, boolean)
protected  Object handlePutKeyValueVersionedMethod(InvocationContext ctx, GlobalTransaction gtx, Fqn fqn, Object key, Object value, boolean createUndoOps, DataVersion dv)
          Handles CacheImpl._put(org.jboss.cache.transaction.GlobalTransaction, org.jboss.cache.Fqn, Object, Object, boolean, org.jboss.cache.optimistic.DataVersion)
protected  Object handleReleaseAllLocksMethod(InvocationContext ctx, Fqn fqn)
          Handles CacheImpl._releaseAllLocks(org.jboss.cache.Fqn)
protected  Object handleRemoveDataMethod(InvocationContext ctx, GlobalTransaction tx, Fqn fqn, boolean createUndoOps)
          Handles CacheImpl._removeData(org.jboss.cache.transaction.GlobalTransaction, Fqn, boolean)
protected  Object handleRemoveDataVersionedMethod(InvocationContext ctx, GlobalTransaction gtx, Fqn fqn, boolean createUndoOps, DataVersion dv)
          Handles CacheImpl._removeData(org.jboss.cache.transaction.GlobalTransaction, org.jboss.cache.Fqn, boolean, org.jboss.cache.optimistic.DataVersion)
protected  Object handleRemoveKeyMethod(InvocationContext ctx, GlobalTransaction tx, Fqn fqn, Object key, boolean createUndoOps)
          Handles CacheImpl._remove(org.jboss.cache.transaction.GlobalTransaction, String, Object, boolean)
protected  Object handleRemoveKeyVersionedMethod(InvocationContext ctx, GlobalTransaction gtx, Fqn fqn, Object key, boolean createUndoOps, DataVersion dv)
          Handles CacheImpl._remove(org.jboss.cache.transaction.GlobalTransaction, org.jboss.cache.Fqn, Object, boolean, org.jboss.cache.optimistic.DataVersion)
protected  Object handleRemoveNodeMethod(InvocationContext ctx, GlobalTransaction tx, Fqn fqn, boolean createUndoOps)
          Handles CacheImpl._remove(org.jboss.cache.transaction.GlobalTransaction, String, boolean)
protected  Object handleRemoveNodeVersionedMethod(InvocationContext ctx, GlobalTransaction gtx, Fqn fqn, boolean createUndoOps, DataVersion dv)
          Handles CacheImpl._remove(org.jboss.cache.transaction.GlobalTransaction, org.jboss.cache.Fqn, boolean, org.jboss.cache.optimistic.DataVersion)
protected  Object handleRollbackMethod(InvocationContext ctx, GlobalTransaction globalTransaction)
          Handles CacheImpl.rollback(org.jboss.cache.transaction.GlobalTransaction)
 void resetStatistics()
          This implementation is a no-op.
protected  void runCommitPhase(InvocationContext ctx, GlobalTransaction gtx, Transaction tx, List modifications, List clModifications, boolean onePhaseCommit)
          creates a commit() MethodCall and feeds it to handleCommitRollback();
protected  Object runPreparePhase(InvocationContext ctx, GlobalTransaction gtx, List modifications)
          Handles a local prepare - invoked by the sync handler.
protected  void runRollbackPhase(InvocationContext ctx, GlobalTransaction gtx, Transaction tx, List modifications)
          creates a rollback() MethodCall and feeds it to handleCommitRollback();
 
Methods inherited from class org.jboss.cache.interceptors.BaseTransactionalContextInterceptor
copyInvocationScopeOptionsToTxScope, isRollingBack, setTransactionalContext
 
Methods inherited from class org.jboss.cache.interceptors.MethodDispacherInterceptor
handleBlockChannelMethod, handleUnblockChannelMethod, invoke, skipMethodCall
 
Methods inherited from class org.jboss.cache.interceptors.Interceptor
assertTransactionValid, getLast, getNext, getStatisticsEnabled, initLogger, isActive, isPreparing, isValid, nextInterceptor, peekNode, setCache, setLast, setNext, setStatisticsEnabled, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jboss.cache.interceptors.InterceptorMBean
getStatisticsEnabled, setStatisticsEnabled
 

Constructor Detail

TxInterceptor

public TxInterceptor()
Method Detail

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

handlePrepareMethod

protected Object handlePrepareMethod(InvocationContext ctx,
                                     GlobalTransaction gtx,
                                     List modification,
                                     org.jgroups.Address coordinator,
                                     boolean onePhaseCommit)
                              throws Throwable
Description copied from class: MethodDispacherInterceptor
Handles CacheImpl.prepare(org.jboss.cache.transaction.GlobalTransaction, java.util.List, org.jgroups.Address, boolean)

Overrides:
handlePrepareMethod 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)
                           throws Throwable
Description copied from class: MethodDispacherInterceptor
Handles CacheImpl._lock(org.jboss.cache.Fqn, org.jboss.cache.lock.NodeLock.LockType, boolean)

Overrides:
handleLockMethod in class MethodDispacherInterceptor
Throws:
Throwable

handleRemoveDataVersionedMethod

protected Object handleRemoveDataVersionedMethod(InvocationContext ctx,
                                                 GlobalTransaction gtx,
                                                 Fqn fqn,
                                                 boolean createUndoOps,
                                                 DataVersion dv)
                                          throws Throwable
Description copied from class: MethodDispacherInterceptor
Handles CacheImpl._removeData(org.jboss.cache.transaction.GlobalTransaction, org.jboss.cache.Fqn, boolean, org.jboss.cache.optimistic.DataVersion)

Overrides:
handleRemoveDataVersionedMethod in class MethodDispacherInterceptor
Throws:
Throwable

handleRemoveKeyVersionedMethod

protected Object handleRemoveKeyVersionedMethod(InvocationContext ctx,
                                                GlobalTransaction gtx,
                                                Fqn fqn,
                                                Object key,
                                                boolean createUndoOps,
                                                DataVersion dv)
                                         throws Throwable
Description copied from class: MethodDispacherInterceptor
Handles CacheImpl._remove(org.jboss.cache.transaction.GlobalTransaction, org.jboss.cache.Fqn, Object, boolean, org.jboss.cache.optimistic.DataVersion)

Overrides:
handleRemoveKeyVersionedMethod in class MethodDispacherInterceptor
Throws:
Throwable

handleRemoveNodeVersionedMethod

protected Object handleRemoveNodeVersionedMethod(InvocationContext ctx,
                                                 GlobalTransaction gtx,
                                                 Fqn fqn,
                                                 boolean createUndoOps,
                                                 DataVersion dv)
                                          throws Throwable
Description copied from class: MethodDispacherInterceptor
Handles CacheImpl._remove(org.jboss.cache.transaction.GlobalTransaction, org.jboss.cache.Fqn, boolean, org.jboss.cache.optimistic.DataVersion)

Overrides:
handleRemoveNodeVersionedMethod in class MethodDispacherInterceptor
Throws:
Throwable

handleDataGravitationCleanupMethod

protected Object handleDataGravitationCleanupMethod(InvocationContext ctx,
                                                    Fqn primary,
                                                    Fqn backup)
                                             throws Throwable
Description copied from class: MethodDispacherInterceptor
Handles RemoteCacheInvocationDelegate.dataGravitationCleanup(org.jboss.cache.Fqn, org.jboss.cache.Fqn)

Overrides:
handleDataGravitationCleanupMethod in class MethodDispacherInterceptor
Throws:
Throwable

handlePutForExternalReadVersionedMethod

protected Object handlePutForExternalReadVersionedMethod(InvocationContext ctx,
                                                         GlobalTransaction gtx,
                                                         Fqn fqn,
                                                         Object key,
                                                         Object value,
                                                         DataVersion dv)
                                                  throws Throwable
Description copied from class: MethodDispacherInterceptor
Handles CacheImpl._putForExternalRead(org.jboss.cache.transaction.GlobalTransaction, org.jboss.cache.Fqn, Object, Object, org.jboss.cache.optimistic.DataVersion)

Overrides:
handlePutForExternalReadVersionedMethod in class MethodDispacherInterceptor
Throws:
Throwable

handlePutKeyValueVersionedMethod

protected Object handlePutKeyValueVersionedMethod(InvocationContext ctx,
                                                  GlobalTransaction gtx,
                                                  Fqn fqn,
                                                  Object key,
                                                  Object value,
                                                  boolean createUndoOps,
                                                  DataVersion dv)
                                           throws Throwable
Description copied from class: MethodDispacherInterceptor
Handles CacheImpl._put(org.jboss.cache.transaction.GlobalTransaction, org.jboss.cache.Fqn, Object, Object, boolean, org.jboss.cache.optimistic.DataVersion)

Overrides:
handlePutKeyValueVersionedMethod in class MethodDispacherInterceptor
Throws:
Throwable

handlePutDataVersionedMethod

protected Object handlePutDataVersionedMethod(InvocationContext ctx,
                                              GlobalTransaction globalTransaction,
                                              Fqn fqn,
                                              Map map,
                                              Boolean createUndoOps,
                                              DataVersion dataVersion)
                                       throws Throwable
Description copied from class: MethodDispacherInterceptor
Handles CacheImpl._put(org.jboss.cache.transaction.GlobalTransaction, org.jboss.cache.Fqn, java.util.Map, boolean, org.jboss.cache.optimistic.DataVersion)

Overrides:
handlePutDataVersionedMethod in class MethodDispacherInterceptor
Throws:
Throwable

handlePutDataEraseVersionedMethod

protected Object handlePutDataEraseVersionedMethod(InvocationContext ctx,
                                                   GlobalTransaction gtx,
                                                   Fqn fqn,
                                                   Map data,
                                                   boolean createUndoOps,
                                                   boolean eraseContent,
                                                   DataVersion dv)
                                            throws Throwable
Description copied from class: MethodDispacherInterceptor
Handles CacheImpl._put(org.jboss.cache.transaction.GlobalTransaction, org.jboss.cache.Fqn, java.util.Map, boolean, boolean, org.jboss.cache.optimistic.DataVersion)

Overrides:
handlePutDataEraseVersionedMethod in class MethodDispacherInterceptor
Throws:
Throwable

handleExistsMethod

protected Object handleExistsMethod(InvocationContext ctx,
                                    Fqn fqn)
                             throws Throwable
Description copied from class: MethodDispacherInterceptor
Handles CacheImpl.exists(String)

Overrides:
handleExistsMethod in class MethodDispacherInterceptor
Throws:
Throwable

handleEvictVersionedNodeMethod

protected Object handleEvictVersionedNodeMethod(InvocationContext ctx,
                                                Fqn fqn,
                                                DataVersion dataVersion)
                                         throws Throwable
Description copied from class: MethodDispacherInterceptor
Handles CacheImpl._evict(org.jboss.cache.Fqn, org.jboss.cache.optimistic.DataVersion)

Overrides:
handleEvictVersionedNodeMethod in class MethodDispacherInterceptor
Throws:
Throwable

handleEvictMethod

protected Object handleEvictMethod(InvocationContext ctx,
                                   Fqn fqn)
                            throws Throwable
Description copied from class: MethodDispacherInterceptor
Handles evict()

Overrides:
handleEvictMethod in class MethodDispacherInterceptor
Throws:
Throwable

handleRemoveDataMethod

protected Object handleRemoveDataMethod(InvocationContext ctx,
                                        GlobalTransaction tx,
                                        Fqn fqn,
                                        boolean createUndoOps)
                                 throws Throwable
Description copied from class: MethodDispacherInterceptor
Handles CacheImpl._removeData(org.jboss.cache.transaction.GlobalTransaction, Fqn, boolean)

Overrides:
handleRemoveDataMethod in class MethodDispacherInterceptor
Throws:
Throwable

handleRemoveKeyMethod

protected Object handleRemoveKeyMethod(InvocationContext ctx,
                                       GlobalTransaction tx,
                                       Fqn fqn,
                                       Object key,
                                       boolean createUndoOps)
                                throws Throwable
Description copied from class: MethodDispacherInterceptor
Handles CacheImpl._remove(org.jboss.cache.transaction.GlobalTransaction, String, Object, boolean)

Overrides:
handleRemoveKeyMethod in class MethodDispacherInterceptor
Throws:
Throwable

handleRemoveNodeMethod

protected Object handleRemoveNodeMethod(InvocationContext ctx,
                                        GlobalTransaction tx,
                                        Fqn fqn,
                                        boolean createUndoOps)
                                 throws Throwable
Description copied from class: MethodDispacherInterceptor
Handles CacheImpl._remove(org.jboss.cache.transaction.GlobalTransaction, String, boolean)

Overrides:
handleRemoveNodeMethod in class MethodDispacherInterceptor
Throws:
Throwable

handleGetDataMapMethod

protected Object handleGetDataMapMethod(InvocationContext ctx,
                                        Fqn fqn)
                                 throws Throwable
Description copied from class: MethodDispacherInterceptor
Handles CacheImpl._getData(org.jboss.cache.Fqn)

Overrides:
handleGetDataMapMethod in class MethodDispacherInterceptor
Throws:
Throwable

handleGetKeysMethod

protected Object handleGetKeysMethod(InvocationContext ctx,
                                     Fqn fqn)
                              throws Throwable
Description copied from class: MethodDispacherInterceptor
Handles Cache.getKeys(Fqn)

Overrides:
handleGetKeysMethod in class MethodDispacherInterceptor
Throws:
Throwable

handlePrintMethod

protected Object handlePrintMethod(InvocationContext ctx,
                                   Fqn fqn)
                            throws Throwable
Description copied from class: MethodDispacherInterceptor
Handles CacheImpl._print(org.jboss.cache.Fqn)

Overrides:
handlePrintMethod in class MethodDispacherInterceptor
Throws:
Throwable

handleReleaseAllLocksMethod

protected Object handleReleaseAllLocksMethod(InvocationContext ctx,
                                             Fqn fqn)
                                      throws Throwable
Description copied from class: MethodDispacherInterceptor
Handles CacheImpl._releaseAllLocks(org.jboss.cache.Fqn)

Overrides:
handleReleaseAllLocksMethod in class MethodDispacherInterceptor
Throws:
Throwable

handleGetChildrenNamesMethod

protected Object handleGetChildrenNamesMethod(InvocationContext ctx,
                                              Fqn fqn)
                                       throws Throwable
Description copied from class: MethodDispacherInterceptor
Handles CacheImpl._getChildrenNames(org.jboss.cache.Fqn)

Overrides:
handleGetChildrenNamesMethod in class MethodDispacherInterceptor
Throws:
Throwable

handleGetNodeMethod

protected Object handleGetNodeMethod(InvocationContext ctx,
                                     Fqn fqn)
                              throws Throwable
Description copied from class: MethodDispacherInterceptor
Handles CacheImpl._get(org.jboss.cache.Fqn)

Overrides:
handleGetNodeMethod in class MethodDispacherInterceptor
Throws:
Throwable

handleGetKeyValueMethod

protected Object handleGetKeyValueMethod(InvocationContext ctx,
                                         Fqn fqn,
                                         Object key,
                                         boolean sendNodeEvent)
                                  throws Throwable
Description copied from class: MethodDispacherInterceptor
Handles CacheImpl._get(org.jboss.cache.Fqn, Object, boolean)

Overrides:
handleGetKeyValueMethod in class MethodDispacherInterceptor
Throws:
Throwable

handleAddChildMethod

protected Object handleAddChildMethod(InvocationContext ctx,
                                      GlobalTransaction tx,
                                      Fqn parentFqn,
                                      Object childName,
                                      Node cn,
                                      boolean createUndoOps)
                               throws Throwable
Description copied from class: MethodDispacherInterceptor
Handles CacheImpl._addChild(org.jboss.cache.transaction.GlobalTransaction, org.jboss.cache.Fqn, Object, org.jboss.cache.Node, boolean)

Overrides:
handleAddChildMethod in class MethodDispacherInterceptor
Throws:
Throwable

handleMoveMethod

protected Object handleMoveMethod(InvocationContext ctx,
                                  Fqn from,
                                  Fqn to)
                           throws Throwable
Description copied from class: MethodDispacherInterceptor
Handles CacheImpl._move(org.jboss.cache.Fqn, org.jboss.cache.Fqn)

Overrides:
handleMoveMethod in class MethodDispacherInterceptor
Throws:
Throwable

handlePutKeyValueMethod

protected Object handlePutKeyValueMethod(InvocationContext ctx,
                                         GlobalTransaction gtx,
                                         Fqn fqn,
                                         Object key,
                                         Object value,
                                         boolean createUndoOps)
                                  throws Throwable
Description copied from class: MethodDispacherInterceptor
Handles CacheImpl._put(org.jboss.cache.transaction.GlobalTransaction, String, Object, Object, boolean)

Overrides:
handlePutKeyValueMethod in class MethodDispacherInterceptor
Throws:
Throwable

handlePutForExternalReadMethod

protected Object handlePutForExternalReadMethod(InvocationContext ctx,
                                                GlobalTransaction tx,
                                                Fqn fqn,
                                                Object key,
                                                Object value)
                                         throws Throwable
Description copied from class: MethodDispacherInterceptor
Handles CacheImpl._putForExternalRead(org.jboss.cache.transaction.GlobalTransaction, org.jboss.cache.Fqn, Object, Object)

Overrides:
handlePutForExternalReadMethod in class MethodDispacherInterceptor
Throws:
Throwable

handlePutDataMethod

protected Object handlePutDataMethod(InvocationContext ctx,
                                     GlobalTransaction tx,
                                     Fqn fqn,
                                     Map data,
                                     boolean createUndoOps)
                              throws Throwable
Description copied from class: MethodDispacherInterceptor
Handles CacheImpl._put(org.jboss.cache.transaction.GlobalTransaction, String, java.util.Map, boolean)

Overrides:
handlePutDataMethod in class MethodDispacherInterceptor
Throws:
Throwable

handlePutDataEraseMethod

protected Object handlePutDataEraseMethod(InvocationContext ctx,
                                          GlobalTransaction gt,
                                          Fqn fqn,
                                          Map newData,
                                          boolean createUndoOps,
                                          boolean eraseContents)
                                   throws Throwable
Description copied from class: MethodDispacherInterceptor
Handles CacheImpl._put(org.jboss.cache.transaction.GlobalTransaction, org.jboss.cache.Fqn, java.util.Map, boolean, boolean)

Overrides:
handlePutDataEraseMethod in class MethodDispacherInterceptor
Throws:
Throwable

getPrepares

public long getPrepares()
Description copied from interface: TxInterceptorMBean
Returns the number of transaction prepares

Specified by:
getPrepares in interface TxInterceptorMBean
Returns:
the number of prepares

getCommits

public long getCommits()
Description copied from interface: TxInterceptorMBean
Returns the number of transaction commits

Specified by:
getCommits in interface TxInterceptorMBean
Returns:
the number of commits

getRollbacks

public long getRollbacks()
Description copied from interface: TxInterceptorMBean
Returns the number of transaction rollbacks

Specified by:
getRollbacks in interface TxInterceptorMBean
Returns:
the number of rollbacks

resetStatistics

public void resetStatistics()
Description copied from class: Interceptor
This implementation is a no-op. If individual Interceptors wish to expose statistics, they can override this method.

Specified by:
resetStatistics in interface InterceptorMBean
Overrides:
resetStatistics in class Interceptor

dumpStatistics

public Map<String,Object> dumpStatistics()
Description copied from class: Interceptor
This implementation returns an empty Map. If individual Interceptors wish to expose statistics, they can override this method.

Specified by:
dumpStatistics in interface InterceptorMBean
Overrides:
dumpStatistics in class Interceptor
Returns:
a map containing statistics

runCommitPhase

protected void runCommitPhase(InvocationContext ctx,
                              GlobalTransaction gtx,
                              Transaction tx,
                              List modifications,
                              List clModifications,
                              boolean onePhaseCommit)
creates a commit() MethodCall and feeds it to handleCommitRollback();

Parameters:
gtx -

runRollbackPhase

protected void runRollbackPhase(InvocationContext ctx,
                                GlobalTransaction gtx,
                                Transaction tx,
                                List modifications)
creates a rollback() MethodCall and feeds it to handleCommitRollback();

Parameters:
gtx -

runPreparePhase

protected Object runPreparePhase(InvocationContext ctx,
                                 GlobalTransaction gtx,
                                 List modifications)
                          throws Throwable
Handles a local prepare - invoked by the sync handler. Tests if the current tx matches the gtx passed in to the method call and passes the prepare() call up the chain.

Returns:
Throws:
Throwable


Copyright © 2008 JBoss, a division of Red Hat. All Rights Reserved.