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.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 Summary
Fields Modifier and Type Field Description private int
counter
Counter of outstanding operation on this version of a storeprivate static java.util.concurrent.atomic.AtomicIntegerFieldUpdater<MVStore.TxCounter>
counterUpdater
long
version
Version 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) int
decrementAndGet()
Decrement and get the counter values.(package private) int
get()
(package private) int
incrementAndGet()
Increment and get the counter value.java.lang.String
toString()
-
-
-
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:
toString
in classjava.lang.Object
-
-