Package io.debezium.crdt
Class StateBasedGCounter
java.lang.Object
io.debezium.crdt.StateBasedGCounter
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionlong
get()
Get the current value.long
Increment the counter and get the result.long
Get the amount that the value incremented.Increment the counter and get the result.long
Increment the counter and get the result.Merge the supplied counter into this counter.toString()
-
Field Details
-
adds
private long adds
-
-
Constructor Details
-
StateBasedGCounter
protected StateBasedGCounter() -
StateBasedGCounter
protected StateBasedGCounter(long adds)
-
-
Method Details
-
increment
Description copied from interface:GCounter
Increment the counter and get the result. -
incrementAndGet
public long incrementAndGet()Description copied from interface:GCounter
Increment the counter and get the result.- Specified by:
incrementAndGet
in interfaceGCounter
- Returns:
- the current result after incrementing
-
getAndIncrement
public long getAndIncrement()Description copied from interface:GCounter
Increment the counter and get the result.- Specified by:
getAndIncrement
in interfaceGCounter
- Returns:
- the current result before incrementing
-
get
public long get()Description copied from interface:Count
Get the current value. -
getIncrement
public long getIncrement()Description copied from interface:GCount
Get the amount that the value incremented.- Specified by:
getIncrement
in interfaceGCount
- Returns:
- the incremented value
-
merge
Description copied from interface:GCounter
Merge the supplied counter into this counter. -
toString
-