public final class FatVariableLengthGammaTxn extends GammaTxn
Modifier and Type | Field and Description |
---|---|
Tranlocal[] |
array |
boolean |
hasReads |
long |
localConflictCount |
int |
size |
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 |
---|
FatVariableLengthGammaTxn(GammaStm stm) |
FatVariableLengthGammaTxn(GammaTxnConfig config) |
Modifier and Type | Method and Description |
---|---|
void |
abort()
Aborts this Txn.
|
void |
attach(Tranlocal tranlocal,
int hash) |
void |
commit()
Commits this Txn.
|
Tranlocal |
getRefTranlocal(BaseGammaTxnRef ref)
Gets the Tranlocal for a specific AbstractGammaTxnRef.
|
float |
getUsage() |
void |
hardReset()
Does a hard reset of an aborted/committed transaction.
|
int |
indexOf(BaseGammaTxnRef ref,
int hash) |
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.
|
int |
size() |
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 Tranlocal[] array
public int size
public boolean hasReads
public long localConflictCount
public FatVariableLengthGammaTxn(GammaStm stm)
public FatVariableLengthGammaTxn(GammaTxnConfig config)
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 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 void abort()
Txn
If the Txn already is aborted, the call is ignored.
public final Tranlocal locate(BaseGammaTxnRef o)
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 void initLocalConflictCounter()
GammaTxn
initLocalConflictCounter
in class GammaTxn
public final boolean isReadConsistent(Tranlocal justAdded)
isReadConsistent
in class GammaTxn
public final float getUsage()
public final int size()
public final int indexOf(BaseGammaTxnRef ref, int hash)
public final void attach(Tranlocal tranlocal, int hash)
Copyright © 2020. All rights reserved.