Class GammaStm
java.lang.Object
org.multiverse.stms.gamma.GammaStm
- All Implemented Interfaces:
Stm
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate final classprivate final classprivate final classprivate static final classprivate static final class -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal BackoffPolicyfinal GammaTxnConfigfinal intfinal GammaOrElseBlockfinal GammaTxnExecutorfinal GlobalConflictCounterfinal intfinal int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic GammaStmCreates a GammaStm implementation optimized for speed.final GammaTxnRefFactoryReturns the defaultTxnRefFactorythat can be used for easy and cheap access to a reference factory instead of setting one up through theTxnRefFactoryBuilder.final TxnCollectionsFactoryGets the defaultTxnCollectionsFactory.final GammaTxnExecutorReturns the defaultTxnExecutorthat is useful for testing/experimentation purposes.final GlobalConflictCounterGets theTxnRefFactoryBuilder.final GammaTxnStarts a default Txn that is useful for testing/experimentation purposes.final GammaOrElseBlockCreates an OrElseBlock.final GammaTxnFactoryBuilderGets theTxnFactoryBuilderthat needs to be used to execute aTxncreated 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:StmStarts 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:
newDefaultTxnin interfaceStm- Returns:
- the new default Txn.
-
getDefaultTxnExecutor
Description copied from interface:StmReturns the defaultTxnExecutorthat 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:
getDefaultTxnExecutorin interfaceStm- Returns:
- the default TxnExecutor.
-
newOrElseBlock
Description copied from interface:StmCreates an OrElseBlock.- Specified by:
newOrElseBlockin interfaceStm- Returns:
- the created OrElseBlock.
-
getGlobalConflictCounter
-
getDefaultRefFactory
Description copied from interface:StmReturns the defaultTxnRefFactorythat can be used for easy and cheap access to a reference factory instead of setting one up through theTxnRefFactoryBuilder.- Specified by:
getDefaultRefFactoryin interfaceStm- Returns:
- the default TxnRefFactory.
-
newTxnFactoryBuilder
Description copied from interface:StmGets theTxnFactoryBuilderthat needs to be used to execute aTxncreated by this Stm. See theTxnFactoryBuilderfor more info. The TxnFactoryBuilder also is responsible for creating the TxnExecutor since the Txn and TxnExecutor can be tightly coupled.- Specified by:
newTxnFactoryBuilderin interfaceStm- Returns:
- the TxnFactoryBuilder that is used to execute transactions on this Stm.
-
getDefaultTxnCollectionFactory
Description copied from interface:StmGets the defaultTxnCollectionsFactory.- Specified by:
getDefaultTxnCollectionFactoryin interfaceStm- Returns:
- the default
TxnCollectionsFactory.
-
getTxRefFactoryBuilder
Description copied from interface:StmGets theTxnRefFactoryBuilder.- Specified by:
getTxRefFactoryBuilderin interfaceStm- Returns:
- the TxnRefFactoryBuilder.
-