Class MVStore.TxCounter
java.lang.Object
org.h2.mvstore.MVStore.TxCounter
- Enclosing class:
MVStore
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
FieldsModifier and TypeFieldDescriptionprivate intCounter of outstanding operation on this version of a storeprivate static final AtomicIntegerFieldUpdater<MVStore.TxCounter> final longVersion of a store, this TxCounter is related to -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
version
public final long versionVersion of a store, this TxCounter is related to -
counter
private volatile int counterCounter of outstanding operation on this version of a store -
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
-