Interface Counter

    • Method Detail

      • setValue

        long setValue​(long value)
        Sets the given value of the counter.
        Parameters:
        value - value to be assigned to the counter.
        Returns:
        Current value of the counter.
      • getValue

        long getValue()
        Gets the value of counter.
        Returns:
        Current value of the counter.
      • increment

        long increment()
        Increment the value of distributed counter by one.
        Returns:
        Current value of the counter.
      • decrement

        long decrement()
        Decrement the value of distributed counter by one.
        Returns:
        Current value of the counter.
      • incrementBy

        long incrementBy​(long value)
        Increment the value of distributed counter by the amount specified.
        Parameters:
        value - The value to increment by.
        Returns:
        Current value of the counter.
      • decrementBy

        long decrementBy​(long value)
        Decrement the value of distributed counter by the amount specified.
        Parameters:
        value - The value to decrement by.
        Returns:
        Current value of the counter.