Package io.debezium.crdt
Interface GCounter
- All Known Subinterfaces:
DeltaCounter
,PNCounter
- All Known Implementing Classes:
StateBasedGCounter
,StateBasedPNCounter
,StateBasedPNDeltaCounter
A simple grow-only counter that maintains a single changing value by tracking the positive changes to the value. It is
inspired by the conflict-free replicated data type (CRDT) G Counter.
-
Method Summary
Modifier and TypeMethodDescriptionlong
Increment the counter and get the result.Increment the counter and get the result.long
Increment the counter and get the result.Merge the supplied counter into this counter.Methods inherited from interface io.debezium.crdt.GCount
getIncrement
-
Method Details
-
increment
GCounter increment()Increment the counter and get the result.- Returns:
- this instance so methods can be chained together; never null
-
incrementAndGet
long incrementAndGet()Increment the counter and get the result.- Returns:
- the current result after incrementing
-
getAndIncrement
long getAndIncrement()Increment the counter and get the result.- Returns:
- the current result before incrementing
-
merge
Merge the supplied counter into this counter.- Parameters:
other
- the other counter to merge into this one; may be null- Returns:
- this counter so that methods can be chained
-