Package io.debezium.crdt
Class StateBasedGCounter
java.lang.Object
io.debezium.crdt.StateBasedGCounter
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongget()Get the current value.longIncrement the counter and get the result.longGet the amount that the value incremented.Increment the counter and get the result.longIncrement 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:GCounterIncrement the counter and get the result. -
incrementAndGet
public long incrementAndGet()Description copied from interface:GCounterIncrement the counter and get the result.- Specified by:
incrementAndGetin interfaceGCounter- Returns:
- the current result after incrementing
-
getAndIncrement
public long getAndIncrement()Description copied from interface:GCounterIncrement the counter and get the result.- Specified by:
getAndIncrementin interfaceGCounter- Returns:
- the current result before incrementing
-
get
public long get()Description copied from interface:CountGet the current value. -
getIncrement
public long getIncrement()Description copied from interface:GCountGet the amount that the value incremented.- Specified by:
getIncrementin interfaceGCount- Returns:
- the incremented value
-
merge
Description copied from interface:GCounterMerge the supplied counter into this counter. -
toString
-