Interface RLongAdder

All Superinterfaces:
RDestroyable, RExpirable, RExpirableAsync, RObject, RObjectAsync
All Known Implementing Classes:
RedissonLongAdder

public interface RLongAdder extends RExpirable, RDestroyable
Distributed implementation of LongAdder

Internal state maintained on client side.

Author:
Nikita Koksharov
  • Method Details

    • add

      void add(long x)
      Adds value
      Parameters:
      x - - value
    • increment

      void increment()
      Increments value
    • decrement

      void decrement()
      Decrements value
    • sum

      long sum()
      Accumulates sum across all RLongAdder instances
      Returns:
      accumulated sum
    • reset

      void reset()
      Resets value across all RLongAdder instances
    • sumAsync

      RFuture<Long> sumAsync()
      Accumulates sum across all RLongAdder instances
      Returns:
      accumulated sum
    • sumAsync

      RFuture<Long> sumAsync(long timeout, TimeUnit timeUnit)
      Accumulates sum across all RLongAdder instances within defined timeout.
      Parameters:
      timeout - for accumulation
      timeUnit - for timeout
      Returns:
      accumulated sum
    • resetAsync

      RFuture<Void> resetAsync()
      Resets value across all RLongAdder instances
      Returns:
      void
    • resetAsync

      RFuture<Void> resetAsync(long timeout, TimeUnit timeUnit)
      Resets value across all RLongAdder instances within defined timeout.
      Parameters:
      timeout - for reset
      timeUnit - for timeout
      Returns:
      void