|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.multiverse.stms.AbstractTransaction<C,S>
org.multiverse.stms.alpha.transactions.AbstractAlphaTransaction<UpdateConfiguration,org.multiverse.stms.AbstractTransactionSnapshot>
org.multiverse.stms.alpha.transactions.update.AbstractUpdateAlphaTransaction
org.multiverse.stms.alpha.transactions.update.ArrayUpdateAlphaTransaction
public final class ArrayUpdateAlphaTransaction
A AbstractUpdateAlphaTransaction where the tranlocals are stored in an array. An array
is faster for very small collection than a MapUpdateAlphaTransaction.
| Field Summary |
|---|
| Fields inherited from class org.multiverse.stms.alpha.transactions.update.AbstractUpdateAlphaTransaction |
|---|
updateTransactionStatus |
| Fields inherited from class org.multiverse.stms.AbstractTransaction |
|---|
config |
| Fields inherited from interface org.multiverse.MultiverseConstants |
|---|
___SANITY_CHECKS_ENABLED |
| Constructor Summary | |
|---|---|
ArrayUpdateAlphaTransaction(UpdateConfiguration config,
int size)
|
|
| Method Summary | |
|---|---|
protected void |
attach(AlphaTranlocal tranlocal)
Attaches the tranlocal to this Transaction. |
protected void |
dodoClear()
|
protected boolean |
dodoRegisterRetryLatch(org.multiverse.api.latches.Latch latch,
long wakeupVersion)
|
AlphaTranlocal |
doOpenForCommutingWrite(AlphaTransactionalObject txObject)
|
protected AlphaTranlocal |
doOpenForWrite(AlphaTransactionalObject txObject)
|
protected void |
doReleaseWriteLocksForFailure()
Releases all the locks on the transactional objects of the attached tranlocals that have been acquired. |
protected void |
doReleaseWriteLocksForSuccess(long writeVersion)
Releases the locks on the tranlocal objects of the attached tranlocals with the given writeVersion. |
protected AlphaTranlocal |
findAttached(AlphaTransactionalObject txObject)
Finds the tranlocal for the given transactional object in the set of attached tranlocals. |
protected boolean |
hasReadConflict()
Checks if the reads don't have conflicts. |
protected boolean |
hasWriteConflict()
Checks if attached updated-items have a conflict. |
protected boolean |
isDirty()
Returns the state of the attached tranlocals. |
protected org.multiverse.api.Listeners[] |
makeChangesPermanent(long writeVersion)
Writes the tranlocals that need to be written to their transactional objects. |
protected boolean |
tryWriteLocks(org.multiverse.api.commitlock.CommitLockFilter commitLockFilter)
Locks the writeset. |
| Methods inherited from class org.multiverse.stms.alpha.transactions.update.AbstractUpdateAlphaTransaction |
|---|
doAbortPrepared, doClear, doOpenForConstruction, doOpenForRead, doOpenForWritePreviousCommittedAndAttach, doPrepare, doReleaseWriteLockForSuccess, doReleaseWriteSetLocksForFailure, hasReadConflict, hasWriteConflict, isDirty, makeChangesPermanent, makePermanent |
| Methods inherited from class org.multiverse.stms.alpha.transactions.AbstractAlphaTransaction |
|---|
doRegisterRetryLatch, load, openForCommutingWrite, openForConstruction, openForRead, openForWrite |
| Methods inherited from class org.multiverse.stms.AbstractTransaction |
|---|
abort, commit, doAbortActive, doInit, endOr, endOrAndStartElse, getAttempt, getConfiguration, getReadVersion, getRemainingTimeoutNs, getSnapshot, getStatus, init, prepare, registerLifecycleListener, registerRetryLatch, restart, setAttempt, setRemainingTimeoutNs, startOr, storeSnapshot, takeSnapshot |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.multiverse.api.Transaction |
|---|
abort, commit, getAttempt, getConfiguration, getReadVersion, getRemainingTimeoutNs, getStatus, prepare, registerLifecycleListener, registerRetryLatch, restart, setAttempt, setRemainingTimeoutNs |
| Constructor Detail |
|---|
public ArrayUpdateAlphaTransaction(UpdateConfiguration config,
int size)
| Method Detail |
|---|
protected void dodoClear()
dodoClear in class AbstractUpdateAlphaTransactionprotected boolean isDirty()
AbstractUpdateAlphaTransaction
isDirty in class AbstractUpdateAlphaTransactionpublic AlphaTranlocal doOpenForCommutingWrite(AlphaTransactionalObject txObject)
doOpenForCommutingWrite in class AbstractUpdateAlphaTransactionprotected AlphaTranlocal doOpenForWrite(AlphaTransactionalObject txObject)
doOpenForWrite in class AbstractUpdateAlphaTransactionprotected void attach(AlphaTranlocal tranlocal)
AbstractUpdateAlphaTransaction
attach in class AbstractUpdateAlphaTransactiontranlocal - the opened AlphaTranlocal to attach.protected AlphaTranlocal findAttached(AlphaTransactionalObject txObject)
AbstractUpdateAlphaTransaction
findAttached in class AbstractUpdateAlphaTransactiontxObject - the transactional object to find the tranlocal for.
protected boolean hasWriteConflict()
AbstractUpdateAlphaTransaction
hasWriteConflict in class AbstractUpdateAlphaTransactionprotected boolean hasReadConflict()
AbstractUpdateAlphaTransaction
hasReadConflict in class AbstractUpdateAlphaTransaction
protected boolean dodoRegisterRetryLatch(org.multiverse.api.latches.Latch latch,
long wakeupVersion)
dodoRegisterRetryLatch in class AbstractAlphaTransaction<UpdateConfiguration,org.multiverse.stms.AbstractTransactionSnapshot>protected boolean tryWriteLocks(org.multiverse.api.commitlock.CommitLockFilter commitLockFilter)
AbstractUpdateAlphaTransaction
tryWriteLocks in class AbstractUpdateAlphaTransactionprotected void doReleaseWriteLocksForFailure()
AbstractUpdateAlphaTransaction
doReleaseWriteLocksForFailure in class AbstractUpdateAlphaTransactionprotected void doReleaseWriteLocksForSuccess(long writeVersion)
AbstractUpdateAlphaTransaction
doReleaseWriteLocksForSuccess in class AbstractUpdateAlphaTransactionwriteVersion - the writeVersion of the tranlocals to release.protected org.multiverse.api.Listeners[] makeChangesPermanent(long writeVersion)
AbstractUpdateAlphaTransaction
makeChangesPermanent in class AbstractUpdateAlphaTransactionwriteVersion - the version of the commit.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||