public class TotalOrderRemoteTransactionState extends Object
Constructor and Description |
---|
TotalOrderRemoteTransactionState(GlobalTransaction globalTransaction) |
Modifier and Type | Method and Description |
---|---|
void |
addAllSynchronizedBlocks(Collection<TotalOrderLatch> blocks) |
void |
addKeysLockedForClear() |
void |
addLockedKey(Object key) |
void |
addSynchronizedBlock(TotalOrderLatch block) |
void |
awaitUntilReset() |
boolean |
equals(Object o) |
Collection<TotalOrderLatch> |
getConflictingTransactionBlocks() |
GlobalTransaction |
getGlobalTransaction() |
Collection<Object> |
getLockedKeys() |
TotalOrderLatch |
getTransactionSynchronizedBlock() |
int |
hashCode() |
boolean |
isCommitReceived()
check if the transaction is marked for commit (by the Commit Command)
|
boolean |
isFinished() |
boolean |
isRollbackReceived()
check if the transaction is marked for rollback (by the Rollback Command)
|
void |
prepared()
mark the transaction as prepared (the validation was finished) and notify a possible pending commit or rollback
command
|
void |
preparing()
mark the transaction as preparing, blocking the commit and rollback commands until the
prepared() is
invoked |
void |
reset() |
void |
setTransactionSynchronizedBlock(TotalOrderLatch block)
Sets the
TotalOrderLatch to be associated to this transaction |
String |
toString() |
boolean |
waitUntilPrepared(boolean commit)
Commit and rollback commands invokes this method and they are blocked here if the state is PREPARING
|
public TotalOrderRemoteTransactionState(GlobalTransaction globalTransaction)
public boolean isRollbackReceived()
public boolean isCommitReceived()
public void prepared()
public void preparing()
prepared()
is
invokedpublic final boolean waitUntilPrepared(boolean commit) throws InterruptedException
commit
- true if it is a commit command, false otherwiseInterruptedException
- when it is interrupted while waitingpublic final boolean isFinished()
public final Collection<Object> getLockedKeys()
org.infinispan.transaction.totalorder.TotalOrderManager
public final TotalOrderLatch getTransactionSynchronizedBlock()
TotalOrderLatch
associated to this transactionpublic final void setTransactionSynchronizedBlock(TotalOrderLatch block)
TotalOrderLatch
to be associated to this transactionpublic final GlobalTransaction getGlobalTransaction()
public final void awaitUntilReset() throws InterruptedException
InterruptedException
public final void reset()
public final void addSynchronizedBlock(TotalOrderLatch block)
public final void addAllSynchronizedBlocks(Collection<TotalOrderLatch> blocks)
public final void addKeysLockedForClear()
public final void addLockedKey(Object key)
public Collection<TotalOrderLatch> getConflictingTransactionBlocks()
Copyright © 2014 JBoss, a division of Red Hat. All Rights Reserved.