org.jboss.cache.interceptors
Class MVCCLockingInterceptor

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.MVCCLockingInterceptor
All Implemented Interfaces:
Visitor

public class MVCCLockingInterceptor
extends PrePostProcessingCommandInterceptor

Interceptor to implement MVCC functionality.

Since:
3.0
Author:
Manik Surtani (manik AT jboss DOT org)
See Also:
MVCC designs

Field Summary
 
Fields inherited from class org.jboss.cache.interceptors.base.CommandInterceptor
configuration, log, trace
 
Constructor Summary
MVCCLockingInterceptor()
           
 
Method Summary
protected  void doAfterCall(InvocationContext ctx, VisitableCommand command)
          Callback that is invoked after every handleXXX() method defined above.
protected  boolean doBeforeCall(InvocationContext ctx, VisitableCommand command)
           
 java.lang.Object handleClearDataCommand(InvocationContext ctx, ClearDataCommand command)
           
 java.lang.Object handleCommitCommand(InvocationContext ctx, CommitCommand command)
           
 java.lang.Object handleEvictFqnCommand(InvocationContext ctx, EvictCommand command)
           
 java.lang.Object handleExistsNodeCommand(InvocationContext ctx, ExistsCommand command)
           
 java.lang.Object handleGetDataMapCommand(InvocationContext ctx, GetDataMapCommand command)
           
 java.lang.Object handleGetChildrenNamesCommand(InvocationContext ctx, GetChildrenNamesCommand command)
           
 java.lang.Object handleGetKeysCommand(InvocationContext ctx, GetKeysCommand command)
           
 java.lang.Object handleGetKeyValueCommand(InvocationContext ctx, GetKeyValueCommand command)
           
 java.lang.Object handleGetNodeCommand(InvocationContext ctx, GetNodeCommand command)
           
 java.lang.Object handleGravitateDataCommand(InvocationContext ctx, GravitateDataCommand command)
           
 java.lang.Object handleInvalidateCommand(InvocationContext ctx, InvalidateCommand command)
           
 java.lang.Object handleMoveCommand(InvocationContext ctx, MoveCommand command)
           
 java.lang.Object handlePrepareCommand(InvocationContext ctx, PrepareCommand command)
           
 java.lang.Object handlePutDataMapCommand(InvocationContext ctx, PutDataMapCommand command)
           
 java.lang.Object handlePutForExternalReadCommand(InvocationContext ctx, PutForExternalReadCommand command)
           
 java.lang.Object handlePutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command)
           
 java.lang.Object handleRemoveKeyCommand(InvocationContext ctx, RemoveKeyCommand command)
           
 java.lang.Object handleRemoveNodeCommand(InvocationContext ctx, RemoveNodeCommand command)
           
 java.lang.Object handleRollbackCommand(InvocationContext ctx, RollbackCommand command)
           
 void setDependencies(LockManager lockManager, DataContainer dataContainer, MVCCNodeHelper helper)
           
 
Methods inherited from class org.jboss.cache.interceptors.base.PrePostProcessingCommandInterceptor
handleCreateNodeCommand, 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

MVCCLockingInterceptor

public MVCCLockingInterceptor()
Method Detail

setDependencies

public void setDependencies(LockManager lockManager,
                            DataContainer dataContainer,
                            MVCCNodeHelper helper)

doBeforeCall

protected boolean doBeforeCall(InvocationContext ctx,
                               VisitableCommand command)
Overrides:
doBeforeCall in class PrePostProcessingCommandInterceptor

handlePutDataMapCommand

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

handlePutKeyValueCommand

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

handlePutForExternalReadCommand

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

handleRemoveNodeCommand

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

handleClearDataCommand

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

handleEvictFqnCommand

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

handleInvalidateCommand

public java.lang.Object handleInvalidateCommand(InvocationContext ctx,
                                                InvalidateCommand command)
                                         throws java.lang.Throwable
Overrides:
handleInvalidateCommand in class PrePostProcessingCommandInterceptor
Throws:
java.lang.Throwable

handleRemoveKeyCommand

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

handleGetDataMapCommand

public java.lang.Object handleGetDataMapCommand(InvocationContext ctx,
                                                GetDataMapCommand command)
                                         throws java.lang.Throwable
Overrides:
handleGetDataMapCommand in class PrePostProcessingCommandInterceptor
Throws:
java.lang.Throwable

handleExistsNodeCommand

public java.lang.Object handleExistsNodeCommand(InvocationContext ctx,
                                                ExistsCommand command)
                                         throws java.lang.Throwable
Overrides:
handleExistsNodeCommand in class PrePostProcessingCommandInterceptor
Throws:
java.lang.Throwable

handleGetKeyValueCommand

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

handleGetNodeCommand

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

handleGetKeysCommand

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

handleGetChildrenNamesCommand

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

handleMoveCommand

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

handleGravitateDataCommand

public java.lang.Object handleGravitateDataCommand(InvocationContext ctx,
                                                   GravitateDataCommand command)
                                            throws java.lang.Throwable
Overrides:
handleGravitateDataCommand in class PrePostProcessingCommandInterceptor
Throws:
java.lang.Throwable

handleRollbackCommand

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

handleCommitCommand

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

handlePrepareCommand

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

doAfterCall

protected void doAfterCall(InvocationContext ctx,
                           VisitableCommand command)
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.