|
||||||||||
| 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.MapUpdateAlphaTransaction
public final class MapUpdateAlphaTransaction
A AbstractUpdateAlphaTransaction implementation where the AlphaTranlocals are stored in an
IdentityHashMap (to prevent unwanted equals/hashcode calls on AlphaTransactionalObjects.
| Nested Class Summary | |
|---|---|
static class |
MapUpdateAlphaTransaction.Factory
|
| 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 | |
|---|---|
MapUpdateAlphaTransaction(UpdateConfiguration config)
|
|
| 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)
|
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, doOpenForCommutingWrite, doOpenForConstruction, doOpenForRead, doOpenForWrite, 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 MapUpdateAlphaTransaction(UpdateConfiguration config)
| Method Detail |
|---|
protected void dodoClear()
dodoClear 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 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 boolean isDirty()
AbstractUpdateAlphaTransaction
isDirty in class AbstractUpdateAlphaTransactionprotected boolean hasWriteConflict()
AbstractUpdateAlphaTransaction
hasWriteConflict in class AbstractUpdateAlphaTransactionprotected boolean hasReadConflict()
AbstractUpdateAlphaTransaction
hasReadConflict in class AbstractUpdateAlphaTransactionprotected org.multiverse.api.Listeners[] makeChangesPermanent(long writeVersion)
AbstractUpdateAlphaTransaction
makeChangesPermanent in class AbstractUpdateAlphaTransactionwriteVersion - the version of the commit.
protected boolean dodoRegisterRetryLatch(org.multiverse.api.latches.Latch latch,
long wakeupVersion)
dodoRegisterRetryLatch in class AbstractAlphaTransaction<UpdateConfiguration,org.multiverse.stms.AbstractTransactionSnapshot>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||