|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.multiverse.stms.alpha.mixins.ThreadUnsafeTxObjectMixin
public abstract class ThreadUnsafeTxObjectMixin
A threadunsafe tx object mixin that can be used for benchmarking purposes if you want to see what the overhead is caused by cas/volatile read/volatile write operations.
Can't be used in a multithreaded program.
| Field Summary |
|---|
| Fields inherited from interface org.multiverse.MultiverseConstants |
|---|
___SANITY_CHECKS_ENABLED |
| Constructor Summary | |
|---|---|
ThreadUnsafeTxObjectMixin()
|
|
| Method Summary | |
|---|---|
org.multiverse.api.Listeners |
___getListeners()
|
org.multiverse.api.Transaction |
___getLockOwner()
|
AlphaTranlocal |
___load()
Loads the most recently committed AlphaTranlocal. |
AlphaTranlocal |
___load(long readVersion)
Loads a readonly AlphaTranlocal with a version equal or smaller than readVersion. |
AlphaTranlocal |
___openForCommutingOperation()
Opens this AlphaTransactionalObject for a commuting operation. |
AlphaTranlocal |
___openUnconstructed()
Creates a fresh AlphaTranlocal. |
RegisterRetryListenerResult |
___registerRetryListener(org.multiverse.api.latches.Latch listener,
long minimumWakeupVersion)
Registers a listener for retrying (the condition variable version for STM's). |
void |
___releaseLock(org.multiverse.api.Transaction expectedLockOwner)
|
void |
___storeInitial(AlphaTranlocal tranlocal,
long writeVersion)
The store that is executed after a transactional object is constructed. |
org.multiverse.api.Listeners |
___storeUpdate(AlphaTranlocal tranlocal,
long writeVersion,
boolean releaseLock)
Stores the the content and releases the lock. |
boolean |
___tryLock(org.multiverse.api.Transaction lockOwner)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ThreadUnsafeTxObjectMixin()
| Method Detail |
|---|
public AlphaTranlocal ___load()
AlphaTransactionalObject
___load in interface AlphaTransactionalObjectpublic org.multiverse.api.Listeners ___getListeners()
public AlphaTranlocal ___load(long readVersion)
AlphaTransactionalObjectAlphaTranlocal with a version equal or smaller than readVersion. It is very important
for the implementation to not to return a too old version. If this happens, the system could start to suffer from
lost updates (not seeing changes you should have seen).
___load in interface AlphaTransactionalObjectreadVersion - the version of the Tranlocal to read.
public AlphaTranlocal ___openForCommutingOperation()
AlphaTransactionalObject
___openForCommutingOperation in interface AlphaTransactionalObjectpublic org.multiverse.api.Transaction ___getLockOwner()
___getLockOwner in interface org.multiverse.api.commitlock.CommitLockpublic boolean ___tryLock(org.multiverse.api.Transaction lockOwner)
___tryLock in interface org.multiverse.api.commitlock.CommitLockpublic void ___releaseLock(org.multiverse.api.Transaction expectedLockOwner)
___releaseLock in interface org.multiverse.api.commitlock.CommitLockpublic AlphaTranlocal ___openUnconstructed()
AlphaTransactionalObject
___openUnconstructed in interface AlphaTransactionalObject
public org.multiverse.api.Listeners ___storeUpdate(AlphaTranlocal tranlocal,
long writeVersion,
boolean releaseLock)
AlphaTransactionalObject
___storeUpdate in interface AlphaTransactionalObjecttranlocal - the Tranlocal to storeAndReleaseLock.writeVersion - the version to storeAndReleaseLock the Tranlocal with.releaseLock - is the lock should be released immediately after the write. This
functionality is needed for the quickReleaseWriteLocks optimization.
public void ___storeInitial(AlphaTranlocal tranlocal,
long writeVersion)
AlphaTransactionalObjectAlphaTransactionalObject.___storeUpdate(AlphaTranlocal, long, boolean) needs to be used.
___storeInitial in interface AlphaTransactionalObjecttranlocal - the tranlocal to store.writeVersion - the version of the write.
public RegisterRetryListenerResult ___registerRetryListener(org.multiverse.api.latches.Latch listener,
long minimumWakeupVersion)
AlphaTransactionalObject
___registerRetryListener in interface AlphaTransactionalObjectlistener - the Latch to registerLifecycleListener.minimumWakeupVersion - the minimum version to wake up for.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||