|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.multiverse.stms.gamma.transactions.GammaTxn
org.multiverse.stms.gamma.transactions.lean.LeanFixedLengthGammaTxn
public final class LeanFixedLengthGammaTxn
A Lean GammaTxn that is optimized for a fixed number of GammaTxnRefs.
| Field Summary | |
|---|---|
boolean |
hasReads
|
Tranlocal |
head
|
Listeners[] |
listenersArray
|
int |
size
|
| Fields inherited from class org.multiverse.stms.gamma.transactions.GammaTxn |
|---|
abortOnly, attempt, commitConflict, config, evaluatingCommute, hasWrites, listeners, pool, remainingTimeoutNs, retryListener, richmansMansConflictScan, status, transactionType |
| Fields inherited from interface org.multiverse.MultiverseConstants |
|---|
LOCKMODE_EXCLUSIVE, LOCKMODE_NONE, LOCKMODE_READ, LOCKMODE_WRITE, SHAKE_BUGS, SPIN_YIELD, TRACING_ENABLED |
| Constructor Summary | |
|---|---|
LeanFixedLengthGammaTxn(GammaStm stm)
|
|
LeanFixedLengthGammaTxn(GammaTxnConfig config)
|
|
| Method Summary | |
|---|---|
void |
abort()
Aborts this Txn. |
void |
commit()
Commits this Txn. |
Tranlocal |
getRefTranlocal(BaseGammaTxnRef ref)
Gets the Tranlocal for a specific AbstractGammaTxnRef. |
void |
hardReset()
Does a hard reset of an aborted/committed transaction. |
void |
initLocalConflictCounter()
Initializes the local conflict counter if the transaction has a need for it. |
boolean |
isReadConsistent(Tranlocal justAdded)
|
Tranlocal |
locate(BaseGammaTxnRef o)
|
void |
prepare()
Prepares this transaction to be committed. |
void |
retry()
Retries the transaction. |
void |
shiftInFront(Tranlocal newHead)
|
boolean |
softReset()
Does a soft reset of an aborted/committed transaction. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public Tranlocal head
public int size
public boolean hasReads
public final Listeners[] listenersArray
| Constructor Detail |
|---|
public LeanFixedLengthGammaTxn(GammaStm stm)
public LeanFixedLengthGammaTxn(GammaTxnConfig config)
| Method Detail |
|---|
public final boolean isReadConsistent(Tranlocal justAdded)
isReadConsistent in class GammaTxnpublic final void commit()
TxnTxn will always be aborted if the commit does not succeed.
Commit will not throw a ReadWriteConflict after the transaction is prepared.
So if prepared successfully, a commit will always succeed.
If there are TxnListeners (either normal ones or permanent ones) and they thrown a RuntimeException
or Error, this will be re-thrown. If a listener fails after the prepare/commit the transaction still is
committed.
commit in interface Txncommit in class GammaTxnpublic final void prepare()
TxnIt is very important that the transaction eventually commits or aborts, if it doesn't no other transaction reading/writing the committed resources, can't commit.
public final void abort()
TxnIf the Txn already is aborted, the call is ignored.
abort in interface Txnabort in class GammaTxnpublic final Tranlocal getRefTranlocal(BaseGammaTxnRef ref)
GammaTxn
getRefTranlocal in class GammaTxnref - the AbstractGammaTxnRef
public final void retry()
TxnRetryError
is thrown which is caught by the TxnExecutor.
public final Tranlocal locate(BaseGammaTxnRef o)
locate in class GammaTxnpublic final void hardReset()
GammaTxn
hardReset in class GammaTxnpublic final boolean softReset()
GammaTxn
softReset in class GammaTxnpublic final void shiftInFront(Tranlocal newHead)
public void initLocalConflictCounter()
GammaTxn
initLocalConflictCounter in class GammaTxn
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||