org.infinispan.interceptors
Class StateTransferLockInterceptor
java.lang.Object
org.infinispan.commands.AbstractVisitor
org.infinispan.interceptors.base.CommandInterceptor
org.infinispan.interceptors.StateTransferLockInterceptor
- All Implemented Interfaces:
- Visitor
public class StateTransferLockInterceptor
- extends CommandInterceptor
An interceptor that blocks any commands when the StateTransferLock is locked.
To make the state transfer as short as possible, synchronous remote commands don't wait
at all for the state transfer lock. So it's the originator's job to retry the command
after the state transfer has ended. This interceptor handles the retries in handleWithRetries.
- Since:
- 5.1
- Author:
- Dan Berindei <dan@infinispan.org>
|
Method Summary |
protected Log |
getLog()
|
void |
init(StateTransferLock stateTransferLock,
Configuration configuration)
|
Object |
visitClearCommand(InvocationContext ctx,
ClearCommand command)
|
Object |
visitCommitCommand(TxInvocationContext ctx,
CommitCommand command)
|
Object |
visitLockControlCommand(TxInvocationContext ctx,
LockControlCommand command)
|
Object |
visitPrepareCommand(TxInvocationContext ctx,
PrepareCommand command)
|
Object |
visitPutKeyValueCommand(InvocationContext ctx,
PutKeyValueCommand command)
|
Object |
visitPutMapCommand(InvocationContext ctx,
PutMapCommand 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.commands.AbstractVisitor |
visitApplyDeltaCommand, visitCollection, visitDistributedExecuteCommand, visitEntrySetCommand, visitEvictCommand, visitGetKeyValueCommand, visitInvalidateCommand, visitInvalidateL1Command, visitKeySetCommand, visitSizeCommand, visitUnknownCommand, visitValuesCommand |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StateTransferLockInterceptor
public StateTransferLockInterceptor()
getLog
protected Log getLog()
- Overrides:
getLog in class CommandInterceptor
init
public void init(StateTransferLock stateTransferLock,
Configuration configuration)
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
visitCommitCommand
public Object visitCommitCommand(TxInvocationContext ctx,
CommitCommand command)
throws Throwable
- Specified by:
visitCommitCommand in interface Visitor- Overrides:
visitCommitCommand in class AbstractVisitor
- Throws:
Throwable
visitLockControlCommand
public Object visitLockControlCommand(TxInvocationContext ctx,
LockControlCommand command)
throws Throwable
- Specified by:
visitLockControlCommand in interface Visitor- Overrides:
visitLockControlCommand in class AbstractVisitor
- Throws:
Throwable
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
visitClearCommand
public Object visitClearCommand(InvocationContext ctx,
ClearCommand command)
throws Throwable
- Specified by:
visitClearCommand in interface Visitor- Overrides:
visitClearCommand in class AbstractVisitor
- Throws:
Throwable
visitPutMapCommand
public Object visitPutMapCommand(InvocationContext ctx,
PutMapCommand command)
throws Throwable
- Specified by:
visitPutMapCommand in interface Visitor- Overrides:
visitPutMapCommand in class AbstractVisitor
- Throws:
Throwable
Copyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.