public abstract class AbstractTxLockingInterceptor extends AbstractLockingInterceptor
Modifier and Type | Field and Description |
---|---|
protected RpcManager |
rpcManager |
protected TransactionTable |
txTable |
configuration
Constructor and Description |
---|
AbstractTxLockingInterceptor() |
Modifier and Type | Method and Description |
---|---|
protected void |
abortIfRemoteTransactionInvalid(TxInvocationContext ctx,
AbstractTransactionBoundaryCommand c) |
protected Object |
invokeNextAndCommitIf1Pc(TxInvocationContext ctx,
PrepareCommand command) |
protected void |
lockAndRegisterBackupLock(TxInvocationContext ctx,
Object key)
The backup (non-primary) owners keep a "backup lock" for each key they received in a lock/prepare command.
|
protected void |
lockKeyAndCheckOwnership(InvocationContext ctx,
Object key)
Besides acquiring a lock, this method also handles the following situation:
1.
|
void |
setDependencies(TransactionTable txTable,
RpcManager rpcManager) |
Object |
visitCommitCommand(TxInvocationContext ctx,
CommitCommand command) |
Object |
visitEvictCommand(InvocationContext ctx,
EvictCommand command) |
Object |
visitGetKeyValueCommand(InvocationContext ctx,
GetKeyValueCommand command) |
Object |
visitRollbackCommand(TxInvocationContext ctx,
RollbackCommand command) |
cleanLocksAndRethrow, lockKey, setDependencies, visitInvalidateCommand, visitInvalidateL1Command
getLog, getNext, handleDefault, hasNext, invokeNextInterceptor, setNext
visitApplyDeltaCommand, visitClearCommand, visitCollection, visitDistributedExecuteCommand, visitEntrySetCommand, visitKeySetCommand, visitLockControlCommand, visitPrepareCommand, visitPutKeyValueCommand, visitPutMapCommand, visitRemoveCommand, visitReplaceCommand, visitSizeCommand, visitUnknownCommand, visitValuesCommand
protected TransactionTable txTable
protected RpcManager rpcManager
public void setDependencies(TransactionTable txTable, RpcManager rpcManager)
public Object visitRollbackCommand(TxInvocationContext ctx, RollbackCommand command) throws Throwable
visitRollbackCommand
in interface Visitor
visitRollbackCommand
in class AbstractVisitor
Throwable
public final Object visitEvictCommand(InvocationContext ctx, EvictCommand command) throws Throwable
visitEvictCommand
in interface Visitor
visitEvictCommand
in class AbstractVisitor
Throwable
public Object visitGetKeyValueCommand(InvocationContext ctx, GetKeyValueCommand command) throws Throwable
visitGetKeyValueCommand
in interface Visitor
visitGetKeyValueCommand
in class AbstractVisitor
Throwable
public Object visitCommitCommand(TxInvocationContext ctx, CommitCommand command) throws Throwable
visitCommitCommand
in interface Visitor
visitCommitCommand
in class AbstractVisitor
Throwable
protected final void abortIfRemoteTransactionInvalid(TxInvocationContext ctx, AbstractTransactionBoundaryCommand c)
protected final Object invokeNextAndCommitIf1Pc(TxInvocationContext ctx, PrepareCommand command) throws Throwable
Throwable
protected final void lockAndRegisterBackupLock(TxInvocationContext ctx, Object key) throws InterruptedException
InterruptedException
protected final void lockKeyAndCheckOwnership(InvocationContext ctx, Object key) throws InterruptedException
InterruptedException
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.