com.hazelcast.core

## Interface AsyncAtomicReference<E>

- All Superinterfaces:
    DistributedObject, IAtomicReference<E>
  All Known Implementing Classes:
    AtomicReferenceProxy

  Deprecated.

      @Beta
       @Deprecated
      public interface AsyncAtomicReference<E>
      extends IAtomicReference<E>

  A `IAtomicReference` that exposes its operations using a `ICompletableFuture` so it can be used in the reactive programming model approach. Instead of this interface, use the equivalent async methods in the public `IAtomicReference` interface. This interface has been deprecated and will be removed in a future version.
  Since:
    3.2

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `ICompletableFuture<Void>` | `asyncAlter(IFunction<E,E> function)` Deprecated. Alters the currently stored reference by applying a function on it.
    `ICompletableFuture<E>` | `asyncAlterAndGet(IFunction<E,E> function)` Deprecated. Alters the currently stored reference by applying a function on it and gets the result.
    `<R> ICompletableFuture<R>` | `asyncApply(IFunction<E,R> function)` Deprecated. Applies a function on the value, the actual stored value will not change.
    `ICompletableFuture<Void>` | `asyncClear()` Deprecated. Clears the current stored reference.
    `ICompletableFuture<Boolean>` | `asyncCompareAndSet(E expect, E update)` Deprecated. Atomically sets the value to the given updated value only if the current value `==` the expected value.
    `ICompletableFuture<Boolean>` | `asyncContains(E value)` Deprecated. Checks if the reference contains the value.
    `ICompletableFuture<E>` | `asyncGet()` Deprecated. Gets the current value.
    `ICompletableFuture<E>` | `asyncGetAndAlter(IFunction<E,E> function)` Deprecated. Alters the currently stored reference by applying a function on it on and gets the old value.
    `ICompletableFuture<E>` | `asyncGetAndSet(E newValue)` Deprecated. Gets the value and sets the new value.
    `ICompletableFuture<Boolean>` | `asyncIsNull()` Deprecated. Checks if the stored reference is null.
    `ICompletableFuture<Void>` | `asyncSet(E newValue)` Deprecated. Atomically sets the given value.
    `ICompletableFuture<E>` | `asyncSetAndGet(E update)` Deprecated. will be removed from Hazelcast 3.4 since it doesn't really serve a purpose.

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

      `alter, alterAndGet, alterAndGetAsync, alterAsync, apply, applyAsync, clear, clearAsync, compareAndSet, compareAndSetAsync, contains, containsAsync, get, getAndAlter, getAndAlterAsync, getAndSet, getAndSetAsync, getAsync, isNull, isNullAsync, set, setAndGet, setAsync`

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

      `destroy, getName, getPartitionKey, getServiceName`

- - ### Method Detail

    - #### asyncCompareAndSet

          ICompletableFuture<Boolean> asyncCompareAndSet(E expect,
                                                         E 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.

    - #### asyncGet

          ICompletableFuture<E> asyncGet()

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

    - #### asyncSet

          ICompletableFuture<Void> asyncSet(E newValue)

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

    - #### asyncGetAndSet

          ICompletableFuture<E> asyncGetAndSet(E newValue)

      Deprecated.
      Gets the value and sets the new value.
      Parameters:
        `newValue` - the new value.
      Returns:
        the old value.

    - #### asyncSetAndGet

          ICompletableFuture<E> asyncSetAndGet(E update)

      Deprecated. will be removed from Hazelcast 3.4 since it doesn't really serve a purpose.
      Sets and gets the value.
      Parameters:
        `update` - the new value
      Returns:
        the new value

    - #### asyncIsNull

          ICompletableFuture<Boolean> asyncIsNull()

      Deprecated.
      Checks if the stored reference is null.
      Returns:
        true if null, false otherwise.

    - #### asyncClear

          ICompletableFuture<Void> asyncClear()

      Deprecated.
      Clears the current stored reference.

    - #### asyncContains

          ICompletableFuture<Boolean> asyncContains(E value)

      Deprecated.
      Checks if the reference contains the value.
      Parameters:
        `value` - the value to check (is allowed to be null).
      Returns:
        true if the value is found, false otherwise.

    - #### asyncAlter

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

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

    - #### asyncAlterAndGet

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

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

    - #### asyncGetAndAlter

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

      Deprecated.
      Alters the currently stored reference 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.

    - #### asyncApply

          <R> ICompletableFuture<R> asyncApply(IFunction<E,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.

Copyright © 2018. All rights reserved.