Package org.h2.mvstore
Class MVStore.TxCounter
- java.lang.Object
-
- org.h2.mvstore.MVStore.TxCounter
-
- Enclosing class:
- MVStore
public static final class MVStore.TxCounter extends java.lang.ObjectClass 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 Summary
Fields Modifier and Type Field Description private intcounterCounter of outstanding operation on this version of a storeprivate static java.util.concurrent.atomic.AtomicIntegerFieldUpdater<MVStore.TxCounter>counterUpdaterlongversionVersion of a store, this TxCounter is related to
-
Constructor Summary
Constructors Constructor Description TxCounter(long version)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) intdecrementAndGet()Decrement and get the counter values.(package private) intget()(package private) intincrementAndGet()Increment and get the counter value.java.lang.StringtoString()
-
-
-
Field Detail
-
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 java.util.concurrent.atomic.AtomicIntegerFieldUpdater<MVStore.TxCounter> counterUpdater
-
-
Method Detail
-
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 java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-