com.hazelcast.core

## Interface AsyncAtomicLong

- All Superinterfaces:
    DistributedObject, IAtomicLong
  All Known Implementing Classes:
    AtomicLongProxy

  Deprecated.

      @Deprecated
      public interface AsyncAtomicLong
      extends IAtomicLong

  This interface is an `IAtomicLong` interface that exposes its operations using an `ICompletableFuture` interface so it can be used in the reactive programming model approach.
  Since:
    3.2

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `ICompletableFuture<Long>` | `asyncAddAndGet(long delta)` Deprecated. Atomically adds the given value to the current value.
    `ICompletableFuture<Void>` | `asyncAlter(IFunction<Long,Long> function)` Deprecated. Alters the currently stored value by applying a function on it.
    `ICompletableFuture<Long>` | `asyncAlterAndGet(IFunction<Long,Long> function)` Deprecated. Alters the currently stored value by applying a function on it and gets the result.
    `<R> ICompletableFuture<R>` | `asyncApply(IFunction<Long,R> function)` Deprecated. Applies a function on the value, the actual stored value will not change.
    `ICompletableFuture<Boolean>` | `asyncCompareAndSet(long expect, long update)` Deprecated. Atomically sets the value to the given updated value only if the current value `==` the expected value.
    `ICompletableFuture<Long>` | `asyncDecrementAndGet()` Deprecated. Atomically decrements the current value by one.
    `ICompletableFuture<Long>` | `asyncGet()` Deprecated. Gets the current value.
    `ICompletableFuture<Long>` | `asyncGetAndAdd(long delta)` Deprecated. Atomically adds the given value to the current value.
    `ICompletableFuture<Long>` | `asyncGetAndAlter(IFunction<Long,Long> function)` Deprecated. Alters the currently stored value by applying a function on it on and gets the old value.
    `ICompletableFuture<Long>` | `asyncGetAndIncrement()` Deprecated. Atomically increments the current value by one.
    `ICompletableFuture<Long>` | `asyncGetAndSet(long newValue)` Deprecated. Atomically sets the given value and returns the old value.
    `ICompletableFuture<Long>` | `asyncIncrementAndGet()` Deprecated. Atomically increments the current value by one.
    `ICompletableFuture<Void>` | `asyncSet(long newValue)` Deprecated. Atomically sets the given value.

    - ### Methods inherited from interface com.hazelcast.core.IAtomicLong

      `addAndGet, addAndGetAsync, alter, alterAndGet, alterAndGetAsync, alterAsync, apply, applyAsync, compareAndSet, compareAndSetAsync, decrementAndGet, decrementAndGetAsync, get, getAndAdd, getAndAddAsync, getAndAlter, getAndAlterAsync, getAndIncrement, getAndIncrementAsync, getAndSet, getAndSetAsync, getAsync, getName, incrementAndGet, incrementAndGetAsync, set, setAsync`

    - ### Methods inherited from interface com.hazelcast.core.DistributedObject

      `destroy, getPartitionKey, getServiceName`

- - ### Method Detail

    - #### asyncAddAndGet

          ICompletableFuture<Long> asyncAddAndGet(long delta)

      Deprecated.
      Atomically adds the given value to the current value.
      Parameters:
        `delta` - the value to add
      Returns:
        the updated value

    - #### asyncCompareAndSet

          ICompletableFuture<Boolean> asyncCompareAndSet(long expect,
                                                         long update)

      Deprecated.
      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.

    - #### asyncDecrementAndGet

          ICompletableFuture<Long> asyncDecrementAndGet()

      Deprecated.
      Atomically decrements the current value by one.
      Returns:
        the updated value

    - #### asyncGet

          ICompletableFuture<Long> asyncGet()

      Deprecated.
      Gets the current value.
      Returns:
        the current value

    - #### asyncGetAndAdd

          ICompletableFuture<Long> asyncGetAndAdd(long delta)

      Deprecated.
      Atomically adds the given value to the current value.
      Parameters:
        `delta` - the value to add
      Returns:
        the old value before the add

    - #### asyncGetAndSet

          ICompletableFuture<Long> asyncGetAndSet(long newValue)

      Deprecated.
      Atomically sets the given value and returns the old value.
      Parameters:
        `newValue` - the new value
      Returns:
        the old value

    - #### asyncIncrementAndGet

          ICompletableFuture<Long> asyncIncrementAndGet()

      Deprecated.
      Atomically increments the current value by one.
      Returns:
        the updated value

    - #### asyncGetAndIncrement

          ICompletableFuture<Long> asyncGetAndIncrement()

      Deprecated.
      Atomically increments the current value by one.
      Returns:
        the old value

    - #### asyncSet

          ICompletableFuture<Void> asyncSet(long newValue)

      Deprecated.
      Atomically sets the given value.
      Parameters:
        `newValue` - the new value

    - #### asyncAlter

          ICompletableFuture<Void> asyncAlter(IFunction<Long,Long> function)

      Deprecated.
      Alters the currently stored value by applying a function on it.
      Parameters:
        `function` - the function
      Throws:
        `IllegalArgumentException` - if function is null.
      Since:
        3.2

    - #### asyncAlterAndGet

          ICompletableFuture<Long> asyncAlterAndGet(IFunction<Long,Long> function)

      Deprecated.
      Alters the currently stored value by applying a function on it and gets the result.
      Parameters:
        `function` - the function
      Returns:
        the new value.
      Throws:
        `IllegalArgumentException` - if function is null.
      Since:
        3.2

    - #### asyncGetAndAlter

          ICompletableFuture<Long> asyncGetAndAlter(IFunction<Long,Long> function)

      Deprecated.
      Alters the currently stored value by applying a function on it on and gets the old value.
      Parameters:
        `function` - the function
      Returns:
        the old value
      Throws:
        `IllegalArgumentException` - if function is null.
      Since:
        3.2

    - #### asyncApply

          <R> ICompletableFuture<R> asyncApply(IFunction<Long,R> function)

      Deprecated.
      Applies a function on the value, the actual stored value will not change.
      Parameters:
        `function` - the function
      Returns:
        the result of the function application
      Throws:
        `IllegalArgumentException` - if function is null.
      Since:
        3.2

Copyright © 2020. All rights reserved.