Class MVStore.TxCounter

java.lang.Object
org.h2.mvstore.MVStore.TxCounter
Enclosing class:
MVStore

public static final class MVStore.TxCounter extends Object
Class TxCounter is a simple data structure to hold version of the store along with the counter of open transactions, which are still operating on this version.
  • Field Details

    • version

      public final long version
      Version of a store, this TxCounter is related to
    • counter

      private volatile int counter
      Counter of outstanding operation on this version of a store
    • counterUpdater

      private static final AtomicIntegerFieldUpdater<MVStore.TxCounter> counterUpdater
  • Constructor Details

    • TxCounter

      TxCounter(long version)
  • Method Details

    • get

      int get()
    • incrementAndGet

      int incrementAndGet()
      Increment and get the counter value.
      Returns:
      the new value
    • decrementAndGet

      int decrementAndGet()
      Decrement and get the counter values.
      Returns:
      the new value
    • toString

      public String toString()
      Overrides:
      toString in class Object