Package io.debezium.crdt
Class StateBasedGCounter
- java.lang.Object
-
- io.debezium.crdt.StateBasedGCounter
-
-
Field Summary
Fields Modifier and Type Field Description private long
adds
-
Constructor Summary
Constructors Modifier Constructor Description protected
StateBasedGCounter()
protected
StateBasedGCounter(long adds)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
get()
Get the current value.long
getAndIncrement()
Increment the counter and get the result.long
getIncrement()
Get the amount that the value incremented.GCounter
increment()
Increment the counter and get the result.long
incrementAndGet()
Increment the counter and get the result.GCounter
merge(Count other)
Merge the supplied counter into this counter.String
toString()
-
-
-
Method Detail
-
increment
public GCounter 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
public GCounter merge(Count other)
Description copied from interface:GCounter
Merge the supplied counter into this counter.
-
-