public final class FatMonoGammaTxn extends GammaTxn
Modifier and Type | Field and Description |
---|---|
Tranlocal |
tranlocal |
abortOnly, attempt, commitConflict, config, evaluatingCommute, hasWrites, listeners, pool, remainingTimeoutNs, retryListener, richmansMansConflictScan, status, transactionType
FAILURE, MASK_CONFLICT, MASK_SUCCESS, MASK_UNREGISTERED, REGISTRATION_DONE, REGISTRATION_NONE, REGISTRATION_NOT_NEEDED, TRANLOCAL_COMMUTING, TRANLOCAL_CONSTRUCTING, TRANLOCAL_READ, TRANLOCAL_WRITE, TRANSACTIONTYPE_FAT_FIXED_LENGTH, TRANSACTIONTYPE_FAT_MONO, TRANSACTIONTYPE_FAT_VARIABLE_LENGTH, TRANSACTIONTYPE_LEAN_FIXED_LENGTH, TRANSACTIONTYPE_LEAN_MONO, TX_ABORTED, TX_ACTIVE, TX_COMMITTED, TX_PREPARED, TYPE_BOOLEAN, TYPE_DOUBLE, TYPE_INT, TYPE_LONG, TYPE_REF, VERSION_UNCOMMITTED
LOCKMODE_EXCLUSIVE, LOCKMODE_NONE, LOCKMODE_READ, LOCKMODE_WRITE, SHAKE_BUGS, SPIN_YIELD, TRACING_ENABLED
Constructor and Description |
---|
FatMonoGammaTxn(GammaStm stm) |
FatMonoGammaTxn(GammaTxnConfig config) |
Modifier and Type | Method and Description |
---|---|
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.
|
abortAcquireOnNullLockMode, abortCommitOnAbortOnly, abortCommitOnBadStatus, abortCommuteOnBadStatus, abortCommuteOnBadStm, abortCommuteOnCommuteDetected, abortCommuteOnNullFunction, abortCommuteOnReadonly, abortEnsureOnBadStatus, abortEnsureOnEnsureDetected, abortIfAlive, abortLocateOnBadStatus, abortLocateOnNullArgument, abortOnOpenForCommuteWhileEvaluatingCommute, abortOnOpenForConstructionWhileEvaluatingCommute, abortOnOpenForReadWhileEvaluatingCommute, abortOnReadWriteConflict, abortOnRichmanConflictScanDetected, abortOnTransactionTooSmall, abortOpenForConstructionOnBadReference, abortOpenForConstructionOnBadStatus, abortOpenForConstructionOnBadStm, abortOpenForConstructionOnReadonly, abortOpenForConstructionRequired, abortOpenForReadOnBadStatus, abortOpenForReadOnBadStm, abortOpenForReadOnNonRefTypeDetected, abortOpenForReadOnNullLockMode, abortOpenForReadOrWriteOnExplicitLockingDetected, abortOpenForWriteOnReadonly, abortPrepareOnAbortOnly, abortPrepareOnBadStatus, abortRegisterOnListenerRequired, abortRetryOnBadStatus, abortRetryOnNoBlockingAllowed, abortRetryOnNoRetryPossible, awaitUpdate, copyForSpeculativeFailure, failAbortOnAlreadyCommitted, getAttempt, getConfig, getRemainingTimeoutNs, getStatus, hasWrites, init, isAbortOnly, isAlive, isLean, newRetryError, notifyListeners, register, setAbortOnly, skipPrepare
public final Tranlocal tranlocal
public FatMonoGammaTxn(GammaStm stm)
public FatMonoGammaTxn(GammaTxnConfig config)
public final Tranlocal locate(BaseGammaTxnRef o)
public final void commit()
Txn
Txn 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.
public final void abort()
Txn
If the Txn already is aborted, the call is ignored.
public final void prepare()
Txn
It 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 GammaTxn
ref
- the AbstractGammaTxnRefpublic final void retry()
Txn
RetryError
is thrown which is caught by the TxnExecutor
.public final boolean softReset()
GammaTxn
public final void hardReset()
GammaTxn
public final boolean isReadConsistent(Tranlocal justAdded)
isReadConsistent
in class GammaTxn
public void initLocalConflictCounter()
GammaTxn
initLocalConflictCounter
in class GammaTxn
Copyright © 2020. All rights reserved.