org.infinispan.interceptors
Class DistTxInterceptor

java.lang.Object
  extended by org.infinispan.commands.AbstractVisitor
      extended by org.infinispan.interceptors.base.CommandInterceptor
          extended by org.infinispan.interceptors.BaseTransactionalContextInterceptor
              extended by org.infinispan.interceptors.TxInterceptor
                  extended by org.infinispan.interceptors.DistTxInterceptor
All Implemented Interfaces:
Visitor

public class DistTxInterceptor
extends TxInterceptor

A special form of the TxInterceptor that is aware of distribution and consistent hashing, and as such only replays methods during a remote prepare that are targeted to this specific cache instance.

Since:
4.0
Author:
Manik Surtani

Field Summary
 
Fields inherited from class org.infinispan.interceptors.TxInterceptor
commandsFactory
 
Fields inherited from class org.infinispan.interceptors.BaseTransactionalContextInterceptor
txManager, txTable
 
Fields inherited from class org.infinispan.interceptors.base.CommandInterceptor
configuration, log, trace
 
Constructor Summary
DistTxInterceptor()
           
 
Method Summary
protected  VisitableCommand getCommandToReplay(VisitableCommand command)
          Only replays modifications that are
 void injectDistributionManager(DistributionManager dm)
           
 
Methods inherited from class org.infinispan.interceptors.TxInterceptor
assertTxIsStillValid, attachGtxAndPassUpChain, buildPrepareCommand, cleanupStaleLocks, createLocalTx, getCommits, getPrepares, getRollbacks, getStatisticsEnabled, handleDefault, intialize, resetStatistics, runCommitPhase, runPreparePhase, runRollbackPhase, setStatisticsEnabled, visitCommitCommand, visitPrepareCommand, visitRollbackCommand
 
Methods inherited from class org.infinispan.interceptors.BaseTransactionalContextInterceptor
injectDependencies, isRollingBack, setTransactionalContext
 
Methods inherited from class org.infinispan.interceptors.base.CommandInterceptor
getNext, hasNext, invokeNextInterceptor, setNext
 
Methods inherited from class org.infinispan.commands.AbstractVisitor
visitClearCommand, visitCollection, visitEvictCommand, visitGetKeyValueCommand, visitInvalidateCommand, visitPutKeyValueCommand, visitPutMapCommand, visitRemoveCommand, visitReplaceCommand, visitSizeCommand
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DistTxInterceptor

public DistTxInterceptor()
Method Detail

injectDistributionManager

public void injectDistributionManager(DistributionManager dm)

getCommandToReplay

protected VisitableCommand getCommandToReplay(VisitableCommand command)
Only replays modifications that are

Overrides:
getCommandToReplay in class TxInterceptor
Parameters:
command - modification in a prepare call
Returns:
a VisitableCommand representing this modification, fit for replaying, or null if the command should not be replayed.


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