org.jboss.cache.interceptors
Class PessimisticLockInterceptor

java.lang.Object
  extended by org.jboss.cache.commands.AbstractVisitor
      extended by org.jboss.cache.interceptors.base.CommandInterceptor
          extended by org.jboss.cache.interceptors.base.PrePostProcessingCommandInterceptor
              extended by org.jboss.cache.interceptors.PessimisticLockInterceptor
All Implemented Interfaces:
Visitor

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

@Deprecated
public class PessimisticLockInterceptor
extends PrePostProcessingCommandInterceptor

An interceptor that handles locking. When a TX is associated, we register for TX completion and unlock the locks acquired within the scope of the TX. When no TX is present, we keep track of the locks acquired during the current method and unlock when the method returns.

Version:
$Id: PessimisticLockInterceptor.java 7168 2008-11-19 17:37:20Z jason.greene@jboss.com $
Author:
Bela Ban

Field Summary
 
Fields inherited from class org.jboss.cache.interceptors.base.CommandInterceptor
configuration, log, trace
 
Constructor Summary
PessimisticLockInterceptor()
          Deprecated.  
 
Method Summary
 void doAfterCall(InvocationContext ctx, VisitableCommand command)
          Deprecated. Callback that is invoked after every handleXXX() method defined above.
protected  java.lang.Object handleClearDataCommand(InvocationContext ctx, ClearDataCommand command)
          Deprecated.  
protected  java.lang.Object handleCommitCommand(InvocationContext ctx, CommitCommand command)
          Deprecated.  
protected  java.lang.Object handleEvictFqnCommand(InvocationContext ctx, EvictCommand command)
          Deprecated.  
protected  java.lang.Object handleGetChildrenNamesCommand(InvocationContext ctx, GetChildrenNamesCommand command)
          Deprecated.  
protected  java.lang.Object handleGetKeysCommand(InvocationContext ctx, GetKeysCommand command)
          Deprecated.  
protected  java.lang.Object handleGetKeyValueCommand(InvocationContext ctx, GetKeyValueCommand command)
          Deprecated.  
protected  java.lang.Object handleGetNodeCommand(InvocationContext ctx, GetNodeCommand command)
          Deprecated.  
protected  java.lang.Object handleMoveCommand(InvocationContext ctx, MoveCommand command)
          Deprecated.  
protected  java.lang.Object handlePrepareCommand(InvocationContext ctx, PrepareCommand command)
          Deprecated.  
protected  java.lang.Object handlePutDataMapCommand(InvocationContext ctx, PutDataMapCommand command)
          Deprecated.  
protected  java.lang.Object handlePutForExternalReadCommand(InvocationContext ctx, PutForExternalReadCommand command)
          Deprecated.  
protected  java.lang.Object handlePutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command)
          Deprecated.  
protected  java.lang.Object handleRemoveKeyCommand(InvocationContext ctx, RemoveKeyCommand command)
          Deprecated.  
protected  java.lang.Object handleRemoveNodeCommand(InvocationContext ctx, RemoveNodeCommand command)
          Deprecated.  
protected  java.lang.Object handleRollbackCommand(InvocationContext ctx, RollbackCommand command)
          Deprecated.  
 void injectDependencies(DataContainer dataContainer, LockManager lockManager, CommandsFactory commandsFactory)
          Deprecated.  
 void lockAllForRemoval(NodeSPI node, InvocationContext ctx, TransactionContext transactionContext)
          Deprecated. Acquires write locks on the node and all child nodes, adding children to the list of removed nodes in the context.
 
Methods inherited from class org.jboss.cache.interceptors.base.PrePostProcessingCommandInterceptor
doBeforeCall, handleCreateNodeCommand, handleExistsNodeCommand, handleGetDataMapCommand, handleGravitateDataCommand, handleInvalidateCommand, handleOptimisticPrepareCommand, visitClearDataCommand, visitCommitCommand, visitCreateNodeCommand, visitEvictFqnCommand, visitExistsNodeCommand, visitGetDataMapCommand, visitGetChildrenNamesCommand, visitGetKeysCommand, visitGetKeyValueCommand, visitGetNodeCommand, visitGravitateDataCommand, visitInvalidateCommand, visitMoveCommand, visitOptimisticPrepareCommand, visitPrepareCommand, visitPutDataMapCommand, visitPutForExternalReadCommand, visitPutKeyValueCommand, visitRemoveKeyCommand, visitRemoveNodeCommand, visitRollbackCommand
 
Methods inherited from class org.jboss.cache.interceptors.base.CommandInterceptor
getNext, handleDefault, hasNext, invokeNextInterceptor, setNext
 
Methods inherited from class org.jboss.cache.commands.AbstractVisitor
visitCollection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PessimisticLockInterceptor

public PessimisticLockInterceptor()
Deprecated. 
Method Detail

injectDependencies

public void injectDependencies(DataContainer dataContainer,
                               LockManager lockManager,
                               CommandsFactory commandsFactory)
Deprecated. 

handlePutDataMapCommand

protected java.lang.Object handlePutDataMapCommand(InvocationContext ctx,
                                                   PutDataMapCommand command)
                                            throws java.lang.Throwable
Deprecated. 
Overrides:
handlePutDataMapCommand in class PrePostProcessingCommandInterceptor
Throws:
java.lang.Throwable

handlePutKeyValueCommand

protected java.lang.Object handlePutKeyValueCommand(InvocationContext ctx,
                                                    PutKeyValueCommand command)
                                             throws java.lang.Throwable
Deprecated. 
Overrides:
handlePutKeyValueCommand in class PrePostProcessingCommandInterceptor
Throws:
java.lang.Throwable

handlePutForExternalReadCommand

protected java.lang.Object handlePutForExternalReadCommand(InvocationContext ctx,
                                                           PutForExternalReadCommand command)
                                                    throws java.lang.Throwable
Deprecated. 
Overrides:
handlePutForExternalReadCommand in class PrePostProcessingCommandInterceptor
Throws:
java.lang.Throwable

handlePrepareCommand

protected java.lang.Object handlePrepareCommand(InvocationContext ctx,
                                                PrepareCommand command)
                                         throws java.lang.Throwable
Deprecated. 
Overrides:
handlePrepareCommand in class PrePostProcessingCommandInterceptor
Throws:
java.lang.Throwable

handleCommitCommand

protected java.lang.Object handleCommitCommand(InvocationContext ctx,
                                               CommitCommand command)
                                        throws java.lang.Throwable
Deprecated. 
Overrides:
handleCommitCommand in class PrePostProcessingCommandInterceptor
Throws:
java.lang.Throwable

handleRollbackCommand

protected java.lang.Object handleRollbackCommand(InvocationContext ctx,
                                                 RollbackCommand command)
                                          throws java.lang.Throwable
Deprecated. 
Overrides:
handleRollbackCommand in class PrePostProcessingCommandInterceptor
Throws:
java.lang.Throwable

handleMoveCommand

protected java.lang.Object handleMoveCommand(InvocationContext ctx,
                                             MoveCommand command)
                                      throws java.lang.Throwable
Deprecated. 
Overrides:
handleMoveCommand in class PrePostProcessingCommandInterceptor
Throws:
java.lang.Throwable

handleRemoveNodeCommand

protected java.lang.Object handleRemoveNodeCommand(InvocationContext ctx,
                                                   RemoveNodeCommand command)
                                            throws java.lang.Throwable
Deprecated. 
Overrides:
handleRemoveNodeCommand in class PrePostProcessingCommandInterceptor
Throws:
java.lang.Throwable

lockAllForRemoval

public void lockAllForRemoval(NodeSPI node,
                              InvocationContext ctx,
                              TransactionContext transactionContext)
                       throws java.lang.InterruptedException
Deprecated. 
Acquires write locks on the node and all child nodes, adding children to the list of removed nodes in the context.

Parameters:
node - node to inspect
ctx - invocation context
transactionContext - transaction entry
Throws:
java.lang.InterruptedException - in the event of interruption

handleRemoveKeyCommand

protected java.lang.Object handleRemoveKeyCommand(InvocationContext ctx,
                                                  RemoveKeyCommand command)
                                           throws java.lang.Throwable
Deprecated. 
Overrides:
handleRemoveKeyCommand in class PrePostProcessingCommandInterceptor
Throws:
java.lang.Throwable

handleClearDataCommand

protected java.lang.Object handleClearDataCommand(InvocationContext ctx,
                                                  ClearDataCommand command)
                                           throws java.lang.Throwable
Deprecated. 
Overrides:
handleClearDataCommand in class PrePostProcessingCommandInterceptor
Throws:
java.lang.Throwable

handleEvictFqnCommand

protected java.lang.Object handleEvictFqnCommand(InvocationContext ctx,
                                                 EvictCommand command)
                                          throws java.lang.Throwable
Deprecated. 
Overrides:
handleEvictFqnCommand in class PrePostProcessingCommandInterceptor
Throws:
java.lang.Throwable

handleGetKeyValueCommand

protected java.lang.Object handleGetKeyValueCommand(InvocationContext ctx,
                                                    GetKeyValueCommand command)
                                             throws java.lang.Throwable
Deprecated. 
Overrides:
handleGetKeyValueCommand in class PrePostProcessingCommandInterceptor
Throws:
java.lang.Throwable

handleGetNodeCommand

protected java.lang.Object handleGetNodeCommand(InvocationContext ctx,
                                                GetNodeCommand command)
                                         throws java.lang.Throwable
Deprecated. 
Overrides:
handleGetNodeCommand in class PrePostProcessingCommandInterceptor
Throws:
java.lang.Throwable

handleGetKeysCommand

protected java.lang.Object handleGetKeysCommand(InvocationContext ctx,
                                                GetKeysCommand command)
                                         throws java.lang.Throwable
Deprecated. 
Overrides:
handleGetKeysCommand in class PrePostProcessingCommandInterceptor
Throws:
java.lang.Throwable

handleGetChildrenNamesCommand

protected java.lang.Object handleGetChildrenNamesCommand(InvocationContext ctx,
                                                         GetChildrenNamesCommand command)
                                                  throws java.lang.Throwable
Deprecated. 
Overrides:
handleGetChildrenNamesCommand in class PrePostProcessingCommandInterceptor
Throws:
java.lang.Throwable

doAfterCall

public void doAfterCall(InvocationContext ctx,
                        VisitableCommand command)
Deprecated. 
Description copied from class: PrePostProcessingCommandInterceptor
Callback that is invoked after every handleXXX() method defined above.

Specified by:
doAfterCall in class PrePostProcessingCommandInterceptor
Parameters:
ctx - invocation context
command - command which was invoked


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