org.jboss.cache.interceptors
Class OptimisticTxInterceptor

java.lang.Object
  extended by org.jboss.cache.commands.AbstractVisitor
      extended by org.jboss.cache.interceptors.base.CommandInterceptor
          extended by org.jboss.cache.interceptors.BaseTransactionalContextInterceptor
              extended by org.jboss.cache.interceptors.TxInterceptor
                  extended by org.jboss.cache.interceptors.OptimisticTxInterceptor
All Implemented Interfaces:
Visitor

Deprecated. will be removed along with optimistic and pessimistic locking.

@Deprecated
public class OptimisticTxInterceptor
extends TxInterceptor

A new interceptor to simplify functionality in the TxInterceptor.

Since:
2.2.0
Author:
Manik Surtani (manik AT jboss DOT org)

Field Summary
protected  org.jboss.cache.interceptors.OptimisticTxInterceptor.ModificationsReplayVisitor replayVisitor
          Deprecated.  
 
Fields inherited from class org.jboss.cache.interceptors.TxInterceptor
commandsFactory, optimistic, rpcManager
 
Fields inherited from class org.jboss.cache.interceptors.BaseTransactionalContextInterceptor
txManager, txTable
 
Fields inherited from class org.jboss.cache.interceptors.base.CommandInterceptor
configuration, log, trace
 
Constructor Summary
OptimisticTxInterceptor()
          Deprecated.  
 
Method Summary
protected  PrepareCommand buildPrepareCommand(GlobalTransaction gtx, List modifications, boolean onePhaseCommit)
          Deprecated.  
protected  void cleanupStaleLocks(InvocationContext ctx)
          Deprecated.  
 Object handleDefault(InvocationContext ctx, VisitableCommand command)
          Deprecated. Tests if we already have a tx running.
protected  void replayModifications(InvocationContext ctx, Transaction ltx, PrepareCommand command)
          Deprecated. Replays modifications by passing them up the interceptor chain.
 Object visitOptimisticPrepareCommand(InvocationContext ctx, OptimisticPrepareCommand command)
          Deprecated. Visits a OptimisticPrepareCommand.
 
Methods inherited from class org.jboss.cache.interceptors.TxInterceptor
assertTxIsStillValid, attachGtxAndPassUpChain, createLocalTx, dumpStatistics, getCommits, getNumberOfSyncsRegistered, getPrepares, getRollbacks, getStatisticsEnabled, intialize, resetStatistics, runCommitPhase, runPreparePhase, runRollbackPhase, setStatisticsEnabled, visitCommitCommand, visitInvalidateCommand, visitPrepareCommand, visitRollbackCommand
 
Methods inherited from class org.jboss.cache.interceptors.BaseTransactionalContextInterceptor
copyInvocationScopeOptionsToTxScope, isRollingBack, setTransactionalContext
 
Methods inherited from class org.jboss.cache.interceptors.base.CommandInterceptor
getNext, hasNext, invokeNextInterceptor, setNext
 
Methods inherited from class org.jboss.cache.commands.AbstractVisitor
visitClearDataCommand, visitCollection, visitCreateNodeCommand, visitEvictFqnCommand, visitExistsNodeCommand, visitGetChildrenNamesCommand, visitGetDataMapCommand, visitGetKeysCommand, visitGetKeyValueCommand, visitGetNodeCommand, visitGravitateDataCommand, visitMoveCommand, visitPutDataMapCommand, visitPutForExternalReadCommand, visitPutKeyValueCommand, visitRemoveKeyCommand, visitRemoveNodeCommand
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

replayVisitor

protected final org.jboss.cache.interceptors.OptimisticTxInterceptor.ModificationsReplayVisitor replayVisitor
Deprecated. 
Constructor Detail

OptimisticTxInterceptor

public OptimisticTxInterceptor()
Deprecated. 
Method Detail

visitOptimisticPrepareCommand

public Object visitOptimisticPrepareCommand(InvocationContext ctx,
                                            OptimisticPrepareCommand command)
                                     throws Throwable
Deprecated. 
Description copied from interface: Visitor
Visits a OptimisticPrepareCommand.

Specified by:
visitOptimisticPrepareCommand in interface Visitor
Overrides:
visitOptimisticPrepareCommand in class AbstractVisitor
Parameters:
ctx - invocation context
command - command to visit
Returns:
response from the visit
Throws:
Throwable - in the event of problems.

handleDefault

public Object handleDefault(InvocationContext ctx,
                            VisitableCommand command)
                     throws Throwable
Deprecated. 
Description copied from class: TxInterceptor
Tests if we already have a tx running. If so, register a sync handler for this method invocation. if not, create a local tx if we're using opt locking.

Overrides:
handleDefault in class TxInterceptor
Parameters:
ctx - invocation context
command - command to invoke
Returns:
return value
Throws:
Throwable - in the event of problems

buildPrepareCommand

protected PrepareCommand buildPrepareCommand(GlobalTransaction gtx,
                                             List modifications,
                                             boolean onePhaseCommit)
Deprecated. 
Overrides:
buildPrepareCommand in class TxInterceptor

replayModifications

protected void replayModifications(InvocationContext ctx,
                                   Transaction ltx,
                                   PrepareCommand command)
                            throws Throwable
Deprecated. 
Replays modifications by passing them up the interceptor chain.

Overrides:
replayModifications in class TxInterceptor
Throws:
Throwable

cleanupStaleLocks

protected void cleanupStaleLocks(InvocationContext ctx)
                          throws Throwable
Deprecated. 
Overrides:
cleanupStaleLocks in class TxInterceptor
Throws:
Throwable


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