Package io.debezium.crdt
Class StateBasedGCounter
- java.lang.Object
-
- io.debezium.crdt.StateBasedGCounter
-
-
Field Summary
Fields Modifier and Type Field Description private longadds
-
Constructor Summary
Constructors Modifier Constructor Description protectedStateBasedGCounter()protectedStateBasedGCounter(long adds)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longget()Get the current value.longgetAndIncrement()Increment the counter and get the result.longgetIncrement()Get the amount that the value incremented.GCounterincrement()Increment the counter and get the result.longincrementAndGet()Increment the counter and get the result.GCountermerge(Count other)Merge the supplied counter into this counter.StringtoString()
-
-
-
Method Detail
-
increment
public GCounter 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
public GCounter merge(Count other)
Description copied from interface:GCounterMerge the supplied counter into this counter.
-
-