org.multiverse.stms.alpha
Class AlphaStmConfig
java.lang.Object
org.multiverse.stms.alpha.AlphaStmConfig
public final class AlphaStmConfig
- extends Object
An Object responsible for storing the configuration for an AlphaStm. So instead of having to deal with ever
growing number of arguments, the AlphaStm constructor only needs a single argument.
Once the AlphaStm is constructed, changes made to the config object is not visible to the stm that received. It wil
have copied all fields, and doesn't read from the config after creation anymore.
AlphaStmConfig is not thread-safe. It can be shared between threads as long as no changes are to the config and there
is a save handover point from construction to usage. A volatile variable or mutex would do the trick. As long as
there is a happens before relation between the write and the read expressed in terms of the JMM.
A config will always be checked by the constructor of the stm if all fields are correctly initialized.
- Author:
- Peter Veentjer.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
maxReadSpinCount
public int maxReadSpinCount
clock
public org.multiverse.api.clock.PrimitiveClock clock
commitLockPolicy
public org.multiverse.api.commitlock.CommitLockPolicy commitLockPolicy
backoffPolicy
public org.multiverse.api.backoff.BackoffPolicy backoffPolicy
quickReleaseWriteLocksEnabled
public boolean quickReleaseWriteLocksEnabled
speculativeConfigurationEnabled
public boolean speculativeConfigurationEnabled
maxRetries
public int maxRetries
maxFixedUpdateSize
public int maxFixedUpdateSize
optimizedConflictDetectionEnabled
public boolean optimizedConflictDetectionEnabled
dirtyCheckEnabled
public boolean dirtyCheckEnabled
explicitRetryAllowed
public boolean explicitRetryAllowed
readTrackingEnabled
public boolean readTrackingEnabled
allowWriteSkew
public boolean allowWriteSkew
interruptible
public boolean interruptible
loggingOfControlFlowErrorsEnabled
public boolean loggingOfControlFlowErrorsEnabled
AlphaStmConfig
public AlphaStmConfig()
createDebugConfig
public static AlphaStmConfig createDebugConfig()
createFastConfig
public static AlphaStmConfig createFastConfig()
ensureValid
public void ensureValid()
- Check if the AlphaStmConfig has been configured correctly.
- Throws:
IllegalStateException - if the configuration isn't valid.
Copyright © 2008-2010 Multiverse. All Rights Reserved.