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 class
GammaStm.GammaTxnFactoryBuilderImpl
private class
GammaStm.GammaTxnRefFactoryBuilderImpl
private class
GammaStm.GammaTxnRefFactoryImpl
private static class
GammaStm.NonSpeculativeGammaTxnFactory
private static class
GammaStm.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 GammaStm
createFast()
Creates a GammaStm implementation optimized for speed.GammaTxnRefFactory
getDefaultRefFactory()
Returns the defaultTxnRefFactory
that can be used for easy and cheap access to a reference factory instead of setting one up through theTxnRefFactoryBuilder
.TxnCollectionsFactory
getDefaultTxnCollectionFactory()
Gets the defaultTxnCollectionsFactory
.GammaTxnExecutor
getDefaultTxnExecutor()
Returns the defaultTxnExecutor
that is useful for testing/experimentation purposes.GlobalConflictCounter
getGlobalConflictCounter()
GammaTxnRefFactoryBuilder
getTxRefFactoryBuilder()
Gets theTxnRefFactoryBuilder
.GammaTxn
newDefaultTxn()
Starts a default Txn that is useful for testing/experimentation purposes.GammaOrElseBlock
newOrElseBlock()
Creates an OrElseBlock.GammaTxnFactoryBuilder
newTxnFactoryBuilder()
Gets theTxnFactoryBuilder
that needs to be used to execute aTxn
created 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: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
public final GammaTxnExecutor 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
public final GammaOrElseBlock newOrElseBlock()
Description copied from interface:Stm
Creates an OrElseBlock.- Specified by:
newOrElseBlock
in interfaceStm
- Returns:
- the created OrElseBlock.
-
getGlobalConflictCounter
public final GlobalConflictCounter getGlobalConflictCounter()
-
getDefaultRefFactory
public final GammaTxnRefFactory 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
public final GammaTxnFactoryBuilder 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
public final TxnCollectionsFactory getDefaultTxnCollectionFactory()
Description copied from interface:Stm
Gets the defaultTxnCollectionsFactory
.- Specified by:
getDefaultTxnCollectionFactory
in interfaceStm
- Returns:
- the default
TxnCollectionsFactory
.
-
getTxRefFactoryBuilder
public final GammaTxnRefFactoryBuilder getTxRefFactoryBuilder()
Description copied from interface:Stm
Gets theTxnRefFactoryBuilder
.- Specified by:
getTxRefFactoryBuilder
in interfaceStm
- Returns:
- the TxnRefFactoryBuilder.
-
-