public interface StateTransferLock
if (stateTransferLock.acquireForCommand()) {
try {
// execute this command!
} finally {
stateTransferLock.releaseForCommand(cmd);
}
}
| Modifier and Type | Field and Description |
|---|---|
static int |
NO_BLOCKING_CACHE_VIEW |
static final int NO_BLOCKING_CACHE_VIEW
boolean acquireForCommand(InvocationContext ctx, WriteCommand command) throws InterruptedException, TimeoutException
InterruptedExceptionTimeoutExceptionboolean acquireForCommand(TxInvocationContext ctx, PrepareCommand command) throws InterruptedException, TimeoutException
InterruptedExceptionTimeoutExceptionboolean acquireForCommand(TxInvocationContext ctx, CommitCommand command) throws InterruptedException, TimeoutException
InterruptedExceptionTimeoutExceptionboolean acquireForCommand(TxInvocationContext ctx, RollbackCommand command) throws InterruptedException, TimeoutException
InterruptedExceptionTimeoutExceptionboolean acquireForCommand(TxInvocationContext ctx, LockControlCommand cmd) throws TimeoutException, InterruptedException
TimeoutExceptionInterruptedExceptionvoid releaseForCommand(InvocationContext ctx, WriteCommand command)
void releaseForCommand(TxInvocationContext ctx, PrepareCommand command)
void releaseForCommand(TxInvocationContext ctx, CommitCommand command)
void releaseForCommand(TxInvocationContext ctx, RollbackCommand command)
void releaseForCommand(TxInvocationContext ctx, LockControlCommand cmd)
void blockNewTransactions(int cacheViewId)
throws InterruptedException
InterruptedExceptionvoid unblockNewTransactions(int cacheViewId)
void blockNewTransactionsAsync()
boolean areNewTransactionsBlocked()
int getBlockingCacheViewId()
void waitForStateTransferToEnd(InvocationContext ctx, VisitableCommand command, int newCacheViewId) throws TimeoutException, InterruptedException, StateTransferLockReacquisitionException
StateTransferLockReacquisitionException - Unlike the acquireForCommand methods, it throws a
StateTransferLockReacquisitionException if it can't acquire the state transfer lock back.TimeoutExceptionInterruptedExceptionCopyright © 2012 JBoss by Red Hat. All Rights Reserved.