Package io.cloudstate.javasupport.crdt
Interface GCounter
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description longgetValue()Get the current value of the counter.longincrement(long by)Increment the counter.
-
-
-
Method Detail
-
getValue
long getValue()
Get the current value of the counter.- Returns:
- The current value of the counter.
-
increment
long increment(long by) throws java.lang.IllegalArgumentExceptionIncrement the counter.- Parameters:
by- The amount to increment the counter by.- Returns:
- The new value of the counter.
- Throws:
java.lang.IllegalArgumentException- Ifbyis negative.
-
-