|
||||||||||
| 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<ReadonlyConfiguration,org.multiverse.stms.AbstractTransactionSnapshot>
org.multiverse.stms.alpha.transactions.readonly.AbstractReadonlyAlphaTransaction
org.multiverse.stms.alpha.transactions.readonly.NonTrackingReadonlyAlphaTransaction
public class NonTrackingReadonlyAlphaTransaction
A readonly AlphaTransaction implementation that doesn't track reads.
MapUpdateAlphaTransaction a readonly transaction doesn't need track
any reads done. This has the advantage that a readonly transaction consumes a lot less resources (so no collection
needed to track all the reads) and commits are also a lot quicker (no dirtyness checking).
A disadvantage of not tracking reads, is that the retry/orelse functionality is not available in reaodnly
transactions because the transaction has no clue which objects were loaded. So it also has no clue about the objects
to listen to on a retry.
Although readonly transactions are isolated from update transactions from a correctness point of view, from a
practical point of view a readonly transaction could be obstructed by an update transaction:
in the following scenario, the second load will fail with a LoadTooOldVersionException:
T1 (ro): |load_X-----------------load_X| T2 (up): |write_X|In the future a version history will be added for previous committed data. So the chance that a old version is not available is going to decrease.
| Nested Class Summary | |
|---|---|
static class |
NonTrackingReadonlyAlphaTransaction.Factory
|
| Field Summary |
|---|
| Fields inherited from class org.multiverse.stms.AbstractTransaction |
|---|
config |
| Fields inherited from interface org.multiverse.MultiverseConstants |
|---|
___SANITY_CHECKS_ENABLED |
| Constructor Summary | |
|---|---|
NonTrackingReadonlyAlphaTransaction(ReadonlyConfiguration config)
|
|
| Method Summary | |
|---|---|
protected void |
attach(AlphaTranlocal tranlocal)
|
protected boolean |
dodoRegisterRetryLatch(org.multiverse.api.latches.Latch latch,
long wakeupVersion)
|
protected AlphaTranlocal |
findAttached(AlphaTransactionalObject txObject)
|
| Methods inherited from class org.multiverse.stms.alpha.transactions.readonly.AbstractReadonlyAlphaTransaction |
|---|
createLoadUncommittedException, doOpenForCommutingWrite, doOpenForConstruction, doOpenForRead, doOpenForWrite |
| 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, doAbortPrepared, doClear, doInit, doPrepare, endOr, endOrAndStartElse, getAttempt, getConfiguration, getReadVersion, getRemainingTimeoutNs, getSnapshot, getStatus, init, makeChangesPermanent, 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 NonTrackingReadonlyAlphaTransaction(ReadonlyConfiguration config)
| Method Detail |
|---|
protected boolean dodoRegisterRetryLatch(org.multiverse.api.latches.Latch latch,
long wakeupVersion)
dodoRegisterRetryLatch in class AbstractAlphaTransaction<ReadonlyConfiguration,org.multiverse.stms.AbstractTransactionSnapshot>protected AlphaTranlocal findAttached(AlphaTransactionalObject txObject)
findAttached in class AbstractReadonlyAlphaTransactionprotected void attach(AlphaTranlocal tranlocal)
attach in class AbstractReadonlyAlphaTransaction
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||