Interface RAtomicLongAsync

    • Method Detail

      • compareAndSetAsync

        RFuture<Boolean> compareAndSetAsync(long expect,
                                            long update)
        Atomically sets the value to the given updated value only if the current value == the expected value.
        Parameters:
        expect - the expected value
        update - the new value
        Returns:
        true if successful; or false if the actual value was not equal to the expected value.
      • addAndGetAsync

        RFuture<Long> addAndGetAsync(long delta)
        Atomically adds the given value to the current value.
        Parameters:
        delta - the value to add
        Returns:
        the updated value
      • decrementAndGetAsync

        RFuture<Long> decrementAndGetAsync()
        Atomically decrements the current value by one.
        Returns:
        the updated value
      • getAsync

        RFuture<Long> getAsync()
        Returns current value.
        Returns:
        the current value
      • getAndDeleteAsync

        RFuture<Long> getAndDeleteAsync()
        Returns and deletes object
        Returns:
        the current value
      • getAndAddAsync

        RFuture<Long> getAndAddAsync(long delta)
        Atomically adds the given value to the current value.
        Parameters:
        delta - the value to add
        Returns:
        the old value before the add
      • getAndSetAsync

        RFuture<Long> getAndSetAsync(long newValue)
        Atomically sets the given value and returns the old value.
        Parameters:
        newValue - the new value
        Returns:
        the old value
      • incrementAndGetAsync

        RFuture<Long> incrementAndGetAsync()
        Atomically increments the current value by one.
        Returns:
        the updated value
      • getAndIncrementAsync

        RFuture<Long> getAndIncrementAsync()
        Atomically increments the current value by one.
        Returns:
        the old value
      • getAndDecrementAsync

        RFuture<Long> getAndDecrementAsync()
        Atomically decrements by one the current value.
        Returns:
        the previous value
      • setAsync

        RFuture<Void> setAsync(long newValue)
        Atomically sets the given value.
        Parameters:
        newValue - the new value
        Returns:
        void