public abstract class AbstractTxLockingInterceptor extends AbstractLockingInterceptor
| Modifier and Type | Field and Description |
|---|---|
protected RpcManager |
rpcManager |
protected TransactionTable |
txTable |
cdl, dataContainer, entryFactory, lockManagercacheConfiguration| 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,
TimeService timeService) |
Object |
visitCommitCommand(TxInvocationContext ctx,
CommitCommand command) |
Object |
visitGetKeyValueCommand(InvocationContext ctx,
GetKeyValueCommand command) |
Object |
visitRollbackCommand(TxInvocationContext ctx,
RollbackCommand command) |
cleanLocksAndRethrow, lockKey, lockKey, setDependencies, shouldLock, visitEvictCommand, visitInvalidateCommand, visitInvalidateL1Command, visitPutKeyValueCommandgetLockAcquisitionTimeout, getLog, getNext, handleDefault, hasNext, hasSkipLocking, injectConfiguration, invokeNextInterceptor, setNextvisitApplyDeltaCommand, visitClearCommand, visitCollection, visitDistributedExecuteCommand, visitEntrySetCommand, visitKeySetCommand, visitLockControlCommand, visitPrepareCommand, visitPutMapCommand, visitRemoveCommand, visitReplaceCommand, visitSizeCommand, visitUnknownCommand, visitValuesCommandprotected TransactionTable txTable
protected RpcManager rpcManager
public void setDependencies(TransactionTable txTable, RpcManager rpcManager, TimeService timeService)
public Object visitRollbackCommand(TxInvocationContext ctx, RollbackCommand command) throws Throwable
visitRollbackCommand in interface VisitorvisitRollbackCommand in class AbstractVisitorThrowablepublic Object visitGetKeyValueCommand(InvocationContext ctx, GetKeyValueCommand command) throws Throwable
visitGetKeyValueCommand in interface VisitorvisitGetKeyValueCommand in class AbstractVisitorThrowablepublic Object visitCommitCommand(TxInvocationContext ctx, CommitCommand command) throws Throwable
visitCommitCommand in interface VisitorvisitCommitCommand in class AbstractVisitorThrowableprotected final Object invokeNextAndCommitIf1Pc(TxInvocationContext ctx, PrepareCommand command) throws Throwable
Throwableprotected final void lockAndRegisterBackupLock(TxInvocationContext ctx, Object key, long lockTimeout, boolean skipLocking) throws InterruptedException
InterruptedExceptionprotected final void lockKeyAndCheckOwnership(InvocationContext ctx, Object key, long lockTimeout, boolean skipLocking) throws InterruptedException
InterruptedExceptionCopyright © 2016 JBoss, a division of Red Hat. All rights reserved.