Package org.multiverse.stms.gamma
Class GammaStm
- java.lang.Object
-
- org.multiverse.stms.gamma.GammaStm
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private classGammaStm.GammaTxnFactoryBuilderImplprivate classGammaStm.GammaTxnRefFactoryBuilderImplprivate classGammaStm.GammaTxnRefFactoryImplprivate static classGammaStm.NonSpeculativeGammaTxnFactoryprivate static classGammaStm.SpeculativeGammaTxnFactory
-
Field Summary
-
Constructor Summary
Constructors Constructor Description GammaStm()GammaStm(GammaStmConfig config)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static GammaStmcreateFast()Creates a GammaStm implementation optimized for speed.GammaTxnRefFactorygetDefaultRefFactory()Returns the defaultTxnRefFactorythat can be used for easy and cheap access to a reference factory instead of setting one up through theTxnRefFactoryBuilder.TxnCollectionsFactorygetDefaultTxnCollectionFactory()Gets the defaultTxnCollectionsFactory.GammaTxnExecutorgetDefaultTxnExecutor()Returns the defaultTxnExecutorthat is useful for testing/experimentation purposes.GlobalConflictCountergetGlobalConflictCounter()GammaTxnRefFactoryBuildergetTxRefFactoryBuilder()Gets theTxnRefFactoryBuilder.GammaTxnnewDefaultTxn()Starts a default Txn that is useful for testing/experimentation purposes.GammaOrElseBlocknewOrElseBlock()Creates an OrElseBlock.GammaTxnFactoryBuildernewTxnFactoryBuilder()Gets theTxnFactoryBuilderthat needs to be used to execute aTxncreated by this Stm.
-
-
-
Field Detail
-
defaultMaxRetries
public final int defaultMaxRetries
-
spinCount
public final int spinCount
-
defaultBackoffPolicy
public final BackoffPolicy defaultBackoffPolicy
-
globalConflictCounter
public final GlobalConflictCounter globalConflictCounter
-
defaultRefFactory
public final GammaStm.GammaTxnRefFactoryImpl defaultRefFactory
-
refFactoryBuilder
public final GammaTxnRefFactoryBuilder refFactoryBuilder
-
defaultxnExecutor
public final GammaTxnExecutor defaultxnExecutor
-
defaultConfig
public final GammaTxnConfig defaultConfig
-
defaultTransactionalCollectionFactory
public final NaiveTxnCollectionFactory defaultTransactionalCollectionFactory
-
readBiasedThreshold
public final int readBiasedThreshold
-
defaultOrElseBlock
public final GammaOrElseBlock defaultOrElseBlock
-
-
Constructor Detail
-
GammaStm
public GammaStm()
-
GammaStm
public GammaStm(GammaStmConfig config)
-
-
Method Detail
-
createFast
public static GammaStm createFast()
Creates a GammaStm implementation optimized for speed. This method probably will be invoked by theGlobalStmInstance.- Returns:
- the created GammaStm.
-
newDefaultTxn
public final GammaTxn 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
public final GammaTxnExecutor 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
public final GammaOrElseBlock newOrElseBlock()
Description copied from interface:StmCreates an OrElseBlock.- Specified by:
newOrElseBlockin interfaceStm- Returns:
- the created OrElseBlock.
-
getGlobalConflictCounter
public final GlobalConflictCounter getGlobalConflictCounter()
-
getDefaultRefFactory
public final GammaTxnRefFactory 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
public final GammaTxnFactoryBuilder 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
public final TxnCollectionsFactory getDefaultTxnCollectionFactory()
Description copied from interface:StmGets the defaultTxnCollectionsFactory.- Specified by:
getDefaultTxnCollectionFactoryin interfaceStm- Returns:
- the default
TxnCollectionsFactory.
-
getTxRefFactoryBuilder
public final GammaTxnRefFactoryBuilder getTxRefFactoryBuilder()
Description copied from interface:StmGets theTxnRefFactoryBuilder.- Specified by:
getTxRefFactoryBuilderin interfaceStm- Returns:
- the TxnRefFactoryBuilder.
-
-