|
||||||||||
| 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.LeanMonoGammaTxn
public final class LeanMonoGammaTxn
A Lean GammaTxn implementation that is optimized for dealing with only a single transactional reference.
| Field Summary | |
|---|---|
Tranlocal |
tranlocal
|
| 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 | |
|---|---|
LeanMonoGammaTxn(GammaStm stm)
|
|
LeanMonoGammaTxn(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. |
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 final Tranlocal tranlocal
| Constructor Detail |
|---|
public LeanMonoGammaTxn(GammaStm stm)
public LeanMonoGammaTxn(GammaTxnConfig config)
| Method Detail |
|---|
public final Tranlocal locate(BaseGammaTxnRef o)
locate 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 abort()
TxnIf the Txn already is aborted, the call is ignored.
abort in interface Txnabort 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 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 boolean softReset()
GammaTxn
softReset in class GammaTxnpublic final void hardReset()
GammaTxn
hardReset in class GammaTxnpublic final boolean isReadConsistent(Tranlocal justAdded)
isReadConsistent in class GammaTxnpublic void initLocalConflictCounter()
GammaTxn
initLocalConflictCounter in class GammaTxn
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||