org.infinispan.interceptors
Class DeadlockDetectingInterceptor

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

public class DeadlockDetectingInterceptor
extends CommandInterceptor

This interceptor populates the DeadlockDetectingGlobalTransaction with appropriate information needed in order to accomplish deadlock detection. It MUST process populate data before the replication takes place, so it will do all the tasks before calling CommandInterceptor.invokeNextInterceptor(org.infinispan.context.InvocationContext, org.infinispan.commands.VisitableCommand).

Note: for local caches, deadlock detection dos NOT work for aggregate operations (clear, putAll).

Since:
4.0
Author:
Mircea.Markus@jboss.com

Field Summary
 
Fields inherited from class org.infinispan.interceptors.base.CommandInterceptor
configuration, log, trace
 
Constructor Summary
DeadlockDetectingInterceptor()
           
 
Method Summary
 void init(TransactionTable txTable, LockManager lockManager, TransactionManager txManager, DistributionManager distributionManager)
           
 void start()
          Only does a sanity check.
 Object visitPrepareCommand(TxInvocationContext ctx, PrepareCommand command)
           
 Object visitPutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command)
           
 Object visitRemoveCommand(InvocationContext ctx, RemoveCommand command)
           
 Object visitReplaceCommand(InvocationContext ctx, ReplaceCommand command)
           
 Object visitRollbackCommand(TxInvocationContext ctx, RollbackCommand command)
           
 
Methods inherited from class org.infinispan.interceptors.base.CommandInterceptor
getNext, handleDefault, hasNext, invokeNextInterceptor, setNext
 
Methods inherited from class org.infinispan.commands.AbstractVisitor
visitClearCommand, visitCollection, visitCommitCommand, visitEntrySetCommand, visitEvictCommand, visitGetKeyValueCommand, visitInvalidateCommand, visitKeySetCommand, visitLockControlCommand, visitPutMapCommand, visitSizeCommand, visitValuesCommand
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeadlockDetectingInterceptor

public DeadlockDetectingInterceptor()
Method Detail

init

public void init(TransactionTable txTable,
                 LockManager lockManager,
                 TransactionManager txManager,
                 DistributionManager distributionManager)

start

public void start()
Only does a sanity check.


visitPutKeyValueCommand

public Object visitPutKeyValueCommand(InvocationContext ctx,
                                      PutKeyValueCommand command)
                               throws Throwable
Specified by:
visitPutKeyValueCommand in interface Visitor
Overrides:
visitPutKeyValueCommand in class AbstractVisitor
Throws:
Throwable

visitRemoveCommand

public Object visitRemoveCommand(InvocationContext ctx,
                                 RemoveCommand command)
                          throws Throwable
Specified by:
visitRemoveCommand in interface Visitor
Overrides:
visitRemoveCommand in class AbstractVisitor
Throws:
Throwable

visitReplaceCommand

public Object visitReplaceCommand(InvocationContext ctx,
                                  ReplaceCommand command)
                           throws Throwable
Specified by:
visitReplaceCommand in interface Visitor
Overrides:
visitReplaceCommand in class AbstractVisitor
Throws:
Throwable

visitPrepareCommand

public Object visitPrepareCommand(TxInvocationContext ctx,
                                  PrepareCommand command)
                           throws Throwable
Specified by:
visitPrepareCommand in interface Visitor
Overrides:
visitPrepareCommand in class AbstractVisitor
Throws:
Throwable

visitRollbackCommand

public Object visitRollbackCommand(TxInvocationContext ctx,
                                   RollbackCommand command)
                            throws Throwable
Specified by:
visitRollbackCommand in interface Visitor
Overrides:
visitRollbackCommand in class AbstractVisitor
Throws:
Throwable

Google Analytics

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