org.multiverse.stms.gamma

## Class GammaStm

- java.lang.Object
- - org.multiverse.stms.gamma.GammaStm

All Implemented Interfaces:
  Stm

    public final class GammaStm
    extends java.lang.Object
    implements Stm

### Field Summary

Fields
`BackoffPolicy` `defaultBackoffPolicy`
`GammaTxnConfig` `defaultConfig`
`int` `defaultMaxRetries`
`GammaOrElseBlock` `defaultOrElseBlock`
`org.multiverse.stms.gamma.GammaStm.GammaTxnRefFactoryImpl` `defaultRefFactory`
`NaiveTxnCollectionFactory` `defaultTransactionalCollectionFactory`
`GammaTxnExecutor` `defaultxnExecutor`
`GlobalConflictCounter` `globalConflictCounter`
`int` `readBiasedThreshold`
`GammaTxnRefFactoryBuilder` `refFactoryBuilder`
`int` `spinCount`

### Constructor Summary

Constructors
Constructor and Description
`GammaStm()`
`GammaStm(GammaStmConfig config)`

### Method Summary

Methods
`static GammaStm` `createFast()` Creates a GammaStm implementation optimized for speed.
`GammaTxnRefFactory` `getDefaultRefFactory()` Returns the default `TxnRefFactory` that can be used for easy and cheap access to a reference factory instead of setting one up through the `TxnRefFactoryBuilder`.
`TxnCollectionsFactory` `getDefaultTxnCollectionFactory()` Gets the default `TxnCollectionsFactory`.
`GammaTxnExecutor` `getDefaultTxnExecutor()` Returns the default `TxnExecutor` that is useful for testing/experimentation purposes.
`GlobalConflictCounter` `getGlobalConflictCounter()`
`GammaTxnRefFactoryBuilder` `getTxRefFactoryBuilder()` Gets the `TxnRefFactoryBuilder`.
`GammaTxn` `newDefaultTxn()` Starts a default Txn that is useful for testing/experimentation purposes.
`GammaOrElseBlock` `newOrElseBlock()` Creates an OrElseBlock.
`GammaTxnFactoryBuilder` `newTxnFactoryBuilder()` Gets the `TxnFactoryBuilder` that needs to be used to execute a `Txn` created by this Stm.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### 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 org.multiverse.stms.gamma.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 the `GlobalStmInstance`.

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 the `Stm.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 interface `Stm`
Returns:
  the new default Txn.

#### getDefaultTxnExecutor

    public final GammaTxnExecutor getDefaultTxnExecutor()

Description copied from interface: `Stm`
Returns the default `TxnExecutor` 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 the `Stm.newTxnFactoryBuilder()` for something more configurable.

Transactions used in this Block are not speculative.

Specified by:
  `getDefaultTxnExecutor` in interface `Stm`
Returns:
  the default TxnExecutor.

#### newOrElseBlock

    public final GammaOrElseBlock newOrElseBlock()

Description copied from interface: `Stm`
Creates an OrElseBlock.

Specified by:
  `newOrElseBlock` in interface `Stm`
Returns:
  the created OrElseBlock.

#### getGlobalConflictCounter

    public final GlobalConflictCounter getGlobalConflictCounter()

#### getDefaultRefFactory

    public final GammaTxnRefFactory getDefaultRefFactory()

Description copied from interface: `Stm`
Returns the default `TxnRefFactory` that can be used for easy and cheap access to a reference factory instead of setting one up through the `TxnRefFactoryBuilder`.

Specified by:
  `getDefaultRefFactory` in interface `Stm`
Returns:
  the default TxnRefFactory.

#### newTxnFactoryBuilder

    public final GammaTxnFactoryBuilder newTxnFactoryBuilder()

Description copied from interface: `Stm`
Gets the `TxnFactoryBuilder` that needs to be used to execute a `Txn` created by this Stm. See the `TxnFactoryBuilder` 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 interface `Stm`
Returns:
  the TxnFactoryBuilder that is used to execute transactions on this Stm.

#### getDefaultTxnCollectionFactory

    public final TxnCollectionsFactory getDefaultTxnCollectionFactory()

Description copied from interface: `Stm`
Gets the default `TxnCollectionsFactory`.

Specified by:
  `getDefaultTxnCollectionFactory` in interface `Stm`
Returns:
  the default `TxnCollectionsFactory`.

#### getTxRefFactoryBuilder

    public final GammaTxnRefFactoryBuilder getTxRefFactoryBuilder()

Description copied from interface: `Stm`
Gets the `TxnRefFactoryBuilder`.

Specified by:
  `getTxRefFactoryBuilder` in interface `Stm`
Returns:
  the TxnRefFactoryBuilder.