All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.cloudstate.javasupport.crdt.GCounter Maven / Gradle / Ivy

There is a newer version: 0.6.0
Show newest version
package io.cloudstate.javasupport.crdt;

/**
 * A Grow-only Counter.
 *
 * 

A Grow-only Counter can be incremented, but can't be decremented. */ public interface GCounter extends Crdt { /** * Get the current value of the counter. * * @return The current value of the counter. */ long getValue(); /** * Increment the counter. * * @param by The amount to increment the counter by. * @return The new value of the counter. * @throws IllegalArgumentException If by is negative. */ long increment(long by) throws IllegalArgumentException; }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy