Class GammaTxnPool

java.lang.Object
org.multiverse.stms.gamma.transactions.GammaTxnPool
All Implemented Interfaces:
MultiverseConstants, GammaConstants

public final class GammaTxnPool extends Object implements GammaConstants
A pool for pooling GammaTxns.
  • Field Details

    • ENABLED

      private static final boolean ENABLED
    • enabled

      private final boolean enabled
    • poolFatMono

      private final FatMonoGammaTxn[] poolFatMono
    • poolFatMonoIndex

      private int poolFatMonoIndex
    • poolFatFixedLength

      private final FatFixedLengthGammaTxn[] poolFatFixedLength
    • poolFatFixedLengthIndex

      private int poolFatFixedLengthIndex
    • poolLeanMono

      private final LeanMonoGammaTxn[] poolLeanMono
    • poolLeanMonoIndex

      private int poolLeanMonoIndex
    • poolLeanFixedLength

      private final LeanFixedLengthGammaTxn[] poolLeanFixedLength
    • poolLeanFixedLengthIndex

      private int poolLeanFixedLengthIndex
    • poolFatVariableLength

      private final FatVariableLengthGammaTxn[] poolFatVariableLength
    • poolFatVariableLengthIndex

      private int poolFatVariableLengthIndex
  • Constructor Details

    • GammaTxnPool

      public GammaTxnPool()
  • Method Details

    • takeFatMono

      public FatMonoGammaTxn takeFatMono()
      Takes a FatMonoGammaTxn from the pool.
      Returns:
      the taken FatMonoGammaTxn or null of none available.
    • takeFatFixedLength

      public FatFixedLengthGammaTxn takeFatFixedLength()
      Takes a FatArrayGammaTxn from the pool.
      Returns:
      the taken FatArrayGammaTxn or null of none available.
    • takeLeanMono

      public LeanMonoGammaTxn takeLeanMono()
      Takes a FatMonoGammaTxn from the pool.
      Returns:
      the taken FatMonoGammaTxn or null of none available.
    • takeLeanFixedLength

      public LeanFixedLengthGammaTxn takeLeanFixedLength()
      Takes a FatArrayGammaTxn from the pool.
      Returns:
      the taken FatArrayGammaTxn or null of none available.
    • takeMap

      public FatVariableLengthGammaTxn takeMap()
      Takes a FatArrayTreeGammaTxn from the pool.
      Returns:
      the taken FatArrayTreeGammaTxn or null of none available.
    • put

      public void put(GammaTxn tx)
      Puts a GammaTxn in the pool.
      Parameters:
      tx - the GammaTxn to put in the pool.
      Throws:
      NullPointerException - if tx is null.