Package org.multiverse.stms.gamma
Class GammaStm
java.lang.Object
org.multiverse.stms.gamma.GammaStm
- All Implemented Interfaces:
Stm
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate final class
private final class
private final class
private static final class
private static final class
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal BackoffPolicy
final GammaTxnConfig
final int
final GammaOrElseBlock
final GammaTxnExecutor
final GlobalConflictCounter
final int
final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic GammaStm
Creates a GammaStm implementation optimized for speed.final GammaTxnRefFactory
Returns the defaultTxnRefFactory
that can be used for easy and cheap access to a reference factory instead of setting one up through theTxnRefFactoryBuilder
.final TxnCollectionsFactory
Gets the defaultTxnCollectionsFactory
.final GammaTxnExecutor
Returns the defaultTxnExecutor
that is useful for testing/experimentation purposes.final GlobalConflictCounter
Gets theTxnRefFactoryBuilder
.final GammaTxn
Starts a default Txn that is useful for testing/experimentation purposes.final GammaOrElseBlock
Creates an OrElseBlock.final GammaTxnFactoryBuilder
Gets theTxnFactoryBuilder
that needs to be used to execute aTxn
created by this Stm.
-
Field Details
-
defaultMaxRetries
public final int defaultMaxRetries -
spinCount
public final int spinCount -
defaultBackoffPolicy
-
globalConflictCounter
-
defaultRefFactory
-
refFactoryBuilder
-
defaultxnExecutor
-
defaultConfig
-
defaultTransactionalCollectionFactory
-
readBiasedThreshold
public final int readBiasedThreshold -
defaultOrElseBlock
-
-
Constructor Details
-
GammaStm
public GammaStm() -
GammaStm
-
-
Method Details
-
createFast
Creates a GammaStm implementation optimized for speed. This method probably will be invoked by theGlobalStmInstance
.- Returns:
- the created GammaStm.
-
newDefaultTxn
Description copied from interface:Stm
Starts a default Txn that is useful for testing/experimentation purposes. This method is purely for easy to use access, but doesn't provide any configuration options. See theStm.newTxnFactoryBuilder()
for something more configurable. In mose cases this is not the method you want to use to manage transactions.Transactions returned by this method are not speculative.
- Specified by:
newDefaultTxn
in interfaceStm
- Returns:
- the new default Txn.
-
getDefaultTxnExecutor
Description copied from interface:Stm
Returns the defaultTxnExecutor
that is useful for testing/experimentation purposes. This method is purely for easy to use access, but it doesn't provide any configuration options. See theStm.newTxnFactoryBuilder()
for something more configurable.Transactions used in this Block are not speculative.
- Specified by:
getDefaultTxnExecutor
in interfaceStm
- Returns:
- the default TxnExecutor.
-
newOrElseBlock
Description copied from interface:Stm
Creates an OrElseBlock.- Specified by:
newOrElseBlock
in interfaceStm
- Returns:
- the created OrElseBlock.
-
getGlobalConflictCounter
-
getDefaultRefFactory
Description copied from interface:Stm
Returns the defaultTxnRefFactory
that can be used for easy and cheap access to a reference factory instead of setting one up through theTxnRefFactoryBuilder
.- Specified by:
getDefaultRefFactory
in interfaceStm
- Returns:
- the default TxnRefFactory.
-
newTxnFactoryBuilder
Description copied from interface:Stm
Gets theTxnFactoryBuilder
that needs to be used to execute aTxn
created by this Stm. See theTxnFactoryBuilder
for more info. The TxnFactoryBuilder also is responsible for creating the TxnExecutor since the Txn and TxnExecutor can be tightly coupled.- Specified by:
newTxnFactoryBuilder
in interfaceStm
- Returns:
- the TxnFactoryBuilder that is used to execute transactions on this Stm.
-
getDefaultTxnCollectionFactory
Description copied from interface:Stm
Gets the defaultTxnCollectionsFactory
.- Specified by:
getDefaultTxnCollectionFactory
in interfaceStm
- Returns:
- the default
TxnCollectionsFactory
.
-
getTxRefFactoryBuilder
Description copied from interface:Stm
Gets theTxnRefFactoryBuilder
.- Specified by:
getTxRefFactoryBuilder
in interfaceStm
- Returns:
- the TxnRefFactoryBuilder.
-