org.infinispan.interceptors
Class DistTxInterceptor
java.lang.Object
org.infinispan.commands.AbstractVisitor
org.infinispan.interceptors.base.CommandInterceptor
org.infinispan.interceptors.TxInterceptor
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
Methods inherited from class org.infinispan.interceptors.TxInterceptor |
enlist, getCommits, getPrepares, getRollbacks, init, isStatisticsEnabled, resetStatistics, setStatisticsEnabled, visitGetKeyValueCommand, visitInvalidateCommand, visitLockControlCommand |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DistTxInterceptor
public DistTxInterceptor()
injectDistributionManager
public void injectDistributionManager(DistributionManager dm,
CommandsFactory commandsFactory)
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.
visitPrepareCommand
public Object visitPrepareCommand(TxInvocationContext ctx,
PrepareCommand cmd)
throws Throwable
- Specified by:
visitPrepareCommand
in interface Visitor
- Overrides:
visitPrepareCommand
in class TxInterceptor
- Throws:
Throwable
visitRollbackCommand
public Object visitRollbackCommand(TxInvocationContext ctx,
RollbackCommand cmd)
throws Throwable
- Specified by:
visitRollbackCommand
in interface Visitor
- Overrides:
visitRollbackCommand
in class TxInterceptor
- Throws:
Throwable
visitCommitCommand
public Object visitCommitCommand(TxInvocationContext ctx,
CommitCommand cmd)
throws Throwable
- Specified by:
visitCommitCommand
in interface Visitor
- Overrides:
visitCommitCommand
in class TxInterceptor
- Throws:
Throwable
visitPutKeyValueCommand
public Object visitPutKeyValueCommand(InvocationContext ctx,
PutKeyValueCommand command)
throws Throwable
- Specified by:
visitPutKeyValueCommand
in interface Visitor
- Overrides:
visitPutKeyValueCommand
in class TxInterceptor
- Throws:
Throwable
visitRemoveCommand
public Object visitRemoveCommand(InvocationContext ctx,
RemoveCommand command)
throws Throwable
- Specified by:
visitRemoveCommand
in interface Visitor
- Overrides:
visitRemoveCommand
in class TxInterceptor
- Throws:
Throwable
visitReplaceCommand
public Object visitReplaceCommand(InvocationContext ctx,
ReplaceCommand command)
throws Throwable
- Specified by:
visitReplaceCommand
in interface Visitor
- Overrides:
visitReplaceCommand
in class TxInterceptor
- Throws:
Throwable
visitClearCommand
public Object visitClearCommand(InvocationContext ctx,
ClearCommand command)
throws Throwable
- Specified by:
visitClearCommand
in interface Visitor
- Overrides:
visitClearCommand
in class TxInterceptor
- Throws:
Throwable
visitPutMapCommand
public Object visitPutMapCommand(InvocationContext ctx,
PutMapCommand command)
throws Throwable
- Specified by:
visitPutMapCommand
in interface Visitor
- Overrides:
visitPutMapCommand
in class TxInterceptor
- Throws:
Throwable
Copyright © 2010 JBoss, a division of Red Hat. All Rights Reserved.