org.jboss.cache.interceptors
Class PessimisticLockInterceptor
java.lang.Object
org.jboss.cache.commands.AbstractVisitor
org.jboss.cache.interceptors.base.CommandInterceptor
org.jboss.cache.interceptors.base.PrePostProcessingCommandInterceptor
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
Method Summary |
void |
doAfterCall(InvocationContext ctx,
VisitableCommand command)
Deprecated. Callback that is invoked after every handleXXX() method defined above. |
protected Object |
handleClearDataCommand(InvocationContext ctx,
ClearDataCommand command)
Deprecated. |
protected Object |
handleCommitCommand(InvocationContext ctx,
CommitCommand command)
Deprecated. |
protected Object |
handleEvictFqnCommand(InvocationContext ctx,
EvictCommand command)
Deprecated. |
protected Object |
handleGetChildrenNamesCommand(InvocationContext ctx,
GetChildrenNamesCommand command)
Deprecated. |
protected Object |
handleGetKeysCommand(InvocationContext ctx,
GetKeysCommand command)
Deprecated. |
protected Object |
handleGetKeyValueCommand(InvocationContext ctx,
GetKeyValueCommand command)
Deprecated. |
protected Object |
handleGetNodeCommand(InvocationContext ctx,
GetNodeCommand command)
Deprecated. |
protected Object |
handleMoveCommand(InvocationContext ctx,
MoveCommand command)
Deprecated. |
protected Object |
handlePrepareCommand(InvocationContext ctx,
PrepareCommand command)
Deprecated. |
protected Object |
handlePutDataMapCommand(InvocationContext ctx,
PutDataMapCommand command)
Deprecated. |
protected Object |
handlePutForExternalReadCommand(InvocationContext ctx,
PutForExternalReadCommand command)
Deprecated. |
protected Object |
handlePutKeyValueCommand(InvocationContext ctx,
PutKeyValueCommand command)
Deprecated. |
protected Object |
handleRemoveKeyCommand(InvocationContext ctx,
RemoveKeyCommand command)
Deprecated. |
protected Object |
handleRemoveNodeCommand(InvocationContext ctx,
RemoveNodeCommand command)
Deprecated. |
protected 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, visitGetChildrenNamesCommand, visitGetDataMapCommand, visitGetKeysCommand, visitGetKeyValueCommand, visitGetNodeCommand, visitGravitateDataCommand, visitInvalidateCommand, visitMoveCommand, visitOptimisticPrepareCommand, visitPrepareCommand, visitPutDataMapCommand, visitPutForExternalReadCommand, visitPutKeyValueCommand, visitRemoveKeyCommand, visitRemoveNodeCommand, visitRollbackCommand |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PessimisticLockInterceptor
public PessimisticLockInterceptor()
- Deprecated.
injectDependencies
public void injectDependencies(DataContainer dataContainer,
LockManager lockManager,
CommandsFactory commandsFactory)
- Deprecated.
handlePutDataMapCommand
protected Object handlePutDataMapCommand(InvocationContext ctx,
PutDataMapCommand command)
throws Throwable
- Deprecated.
- Overrides:
handlePutDataMapCommand
in class PrePostProcessingCommandInterceptor
- Throws:
Throwable
handlePutKeyValueCommand
protected Object handlePutKeyValueCommand(InvocationContext ctx,
PutKeyValueCommand command)
throws Throwable
- Deprecated.
- Overrides:
handlePutKeyValueCommand
in class PrePostProcessingCommandInterceptor
- Throws:
Throwable
handlePutForExternalReadCommand
protected Object handlePutForExternalReadCommand(InvocationContext ctx,
PutForExternalReadCommand command)
throws Throwable
- Deprecated.
- Overrides:
handlePutForExternalReadCommand
in class PrePostProcessingCommandInterceptor
- Throws:
Throwable
handlePrepareCommand
protected Object handlePrepareCommand(InvocationContext ctx,
PrepareCommand command)
throws Throwable
- Deprecated.
- Overrides:
handlePrepareCommand
in class PrePostProcessingCommandInterceptor
- Throws:
Throwable
handleCommitCommand
protected Object handleCommitCommand(InvocationContext ctx,
CommitCommand command)
throws Throwable
- Deprecated.
- Overrides:
handleCommitCommand
in class PrePostProcessingCommandInterceptor
- Throws:
Throwable
handleRollbackCommand
protected Object handleRollbackCommand(InvocationContext ctx,
RollbackCommand command)
throws Throwable
- Deprecated.
- Overrides:
handleRollbackCommand
in class PrePostProcessingCommandInterceptor
- Throws:
Throwable
handleMoveCommand
protected Object handleMoveCommand(InvocationContext ctx,
MoveCommand command)
throws Throwable
- Deprecated.
- Overrides:
handleMoveCommand
in class PrePostProcessingCommandInterceptor
- Throws:
Throwable
handleRemoveNodeCommand
protected Object handleRemoveNodeCommand(InvocationContext ctx,
RemoveNodeCommand command)
throws Throwable
- Deprecated.
- Overrides:
handleRemoveNodeCommand
in class PrePostProcessingCommandInterceptor
- Throws:
Throwable
lockAllForRemoval
public void lockAllForRemoval(NodeSPI node,
InvocationContext ctx,
TransactionContext transactionContext)
throws 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 inspectctx
- invocation contexttransactionContext
- transaction entry
- Throws:
InterruptedException
- in the event of interruption
handleRemoveKeyCommand
protected Object handleRemoveKeyCommand(InvocationContext ctx,
RemoveKeyCommand command)
throws Throwable
- Deprecated.
- Overrides:
handleRemoveKeyCommand
in class PrePostProcessingCommandInterceptor
- Throws:
Throwable
handleClearDataCommand
protected Object handleClearDataCommand(InvocationContext ctx,
ClearDataCommand command)
throws Throwable
- Deprecated.
- Overrides:
handleClearDataCommand
in class PrePostProcessingCommandInterceptor
- Throws:
Throwable
handleEvictFqnCommand
protected Object handleEvictFqnCommand(InvocationContext ctx,
EvictCommand command)
throws Throwable
- Deprecated.
- Overrides:
handleEvictFqnCommand
in class PrePostProcessingCommandInterceptor
- Throws:
Throwable
handleGetKeyValueCommand
protected Object handleGetKeyValueCommand(InvocationContext ctx,
GetKeyValueCommand command)
throws Throwable
- Deprecated.
- Overrides:
handleGetKeyValueCommand
in class PrePostProcessingCommandInterceptor
- Throws:
Throwable
handleGetNodeCommand
protected Object handleGetNodeCommand(InvocationContext ctx,
GetNodeCommand command)
throws Throwable
- Deprecated.
- Overrides:
handleGetNodeCommand
in class PrePostProcessingCommandInterceptor
- Throws:
Throwable
handleGetKeysCommand
protected Object handleGetKeysCommand(InvocationContext ctx,
GetKeysCommand command)
throws Throwable
- Deprecated.
- Overrides:
handleGetKeysCommand
in class PrePostProcessingCommandInterceptor
- Throws:
Throwable
handleGetChildrenNamesCommand
protected Object handleGetChildrenNamesCommand(InvocationContext ctx,
GetChildrenNamesCommand command)
throws Throwable
- Deprecated.
- Overrides:
handleGetChildrenNamesCommand
in class PrePostProcessingCommandInterceptor
- Throws:
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 contextcommand
- command which was invoked
Copyright © 2009 JBoss, a division of Red Hat. All Rights Reserved.