public abstract class AbstractTxLockingInterceptor extends AbstractLockingInterceptor
Modifier and Type | Field and Description |
---|---|
protected RpcManager |
rpcManager |
protected TransactionTable |
txTable |
cdl, dataContainer, entryFactory, lockManager
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,
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, visitPutKeyValueCommand
getLockAcquisitionTimeout, getLog, getNext, handleDefault, hasNext, hasSkipLocking, injectConfiguration, invokeNextInterceptor, setNext
visitApplyDeltaCommand, visitClearCommand, visitCollection, visitDistributedExecuteCommand, visitEntrySetCommand, visitKeySetCommand, visitLockControlCommand, visitPrepareCommand, visitPutMapCommand, visitRemoveCommand, visitReplaceCommand, visitSizeCommand, visitUnknownCommand, visitValuesCommand
protected 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 Visitor
visitRollbackCommand
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 © 2014 JBoss, a division of Red Hat. All Rights Reserved.