public abstract class AbstractTxLockingInterceptor extends AbstractLockingInterceptor
Modifier and Type | Field and Description |
---|---|
protected RpcManager |
rpcManager |
protected TransactionTable |
txTable |
cacheConfiguration
Constructor and Description |
---|
AbstractTxLockingInterceptor() |
Modifier and Type | Method and Description |
---|---|
protected Object |
invokeNextAndCommitIf1Pc(TxInvocationContext ctx,
PrepareCommand command) |
protected void |
lockAndRegisterBackupLock(TxInvocationContext ctx,
Object key,
long lockTimeout,
boolean skipLocking)
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,
long lockTimeout,
boolean skipLocking)
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
getLockAcquisitionTimeout, getLog, getNext, handleDefault, hasNext, hasSkipLocking, injectConfiguration, 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 Object invokeNextAndCommitIf1Pc(TxInvocationContext ctx, PrepareCommand command) throws Throwable
Throwable
protected final void lockAndRegisterBackupLock(TxInvocationContext ctx, Object key, long lockTimeout, boolean skipLocking) throws InterruptedException
InterruptedException
protected final void lockKeyAndCheckOwnership(InvocationContext ctx, Object key, long lockTimeout, boolean skipLocking) throws InterruptedException
InterruptedException
Copyright © 2017 JBoss, a division of Red Hat. All Rights Reserved.