Interface DCounter

  • All Superinterfaces:
    DType

    public interface DCounter
    extends DType
    A distributed type, similar to a DAtomicLong, but with higher throughput and less potential contention than DAtomicLong.
    • Method Detail

      • get

        long get()
        Get the current value.
        Returns:
        the current value
      • increment

        long increment​(long delta)
        Update the value. The returned value reflects the current, local value. Any updates, performed by other clients, will not be reflected in the returned value. Use get() to retrieve the most up-to-date value.
        Parameters:
        delta - the amount to update by - can be either positive or negative
        Returns:
        the current, local value