org.apache.ignite.internal.client.thin

## Class IgniteClientFutureImpl<T>

- java.lang.Object
- - org.apache.ignite.internal.client.thin.IgniteClientFutureImpl<T>

Type Parameters:
  `T` - Result type.

All Implemented Interfaces:
  CompletionStage<T>, Future<T>, IgniteClientFuture<T>

    public class IgniteClientFutureImpl<T>
    extends Object
    implements IgniteClientFuture<T>

Ignite thin client future - a wrapper around `CompletableFuture`.

### Constructor Summary

Constructors
Constructor and Description
`IgniteClientFutureImpl(CompletableFuture<T> fut, Function<Boolean,Boolean> onCancel)` Ctor.
`IgniteClientFutureImpl(CompletionStage<T> fut)` Ctor.

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`CompletableFuture<Void>` `acceptEither(CompletionStage<? extends T> completionStage, Consumer<? super T> consumer)`
`CompletableFuture<Void>` `acceptEitherAsync(CompletionStage<? extends T> completionStage, Consumer<? super T> consumer)`
`CompletableFuture<Void>` `acceptEitherAsync(CompletionStage<? extends T> completionStage, Consumer<? super T> consumer, Executor executor)`
`<U> CompletableFuture<U>` `applyToEither(CompletionStage<? extends T> completionStage, Function<? super T,U> function)`
`<U> CompletableFuture<U>` `applyToEitherAsync(CompletionStage<? extends T> completionStage, Function<? super T,U> function)`
`<U> CompletableFuture<U>` `applyToEitherAsync(CompletionStage<? extends T> completionStage, Function<? super T,U> function, Executor executor)`
`boolean` `cancel(boolean mayInterruptIfRunning)`
`static <T> IgniteClientFutureImpl<T>` `completedFuture(T res)` Gets a completed future with the given result.
`CompletableFuture<T>` `exceptionally(Function<Throwable,? extends T> function)`
`T` `get()`
`T` `get(long l, TimeUnit timeUnit)`
`<U> CompletableFuture<U>` `handle(BiFunction<? super T,Throwable,? extends U> biFunction)`
`<U> CompletableFuture<U>` `handleAsync(BiFunction<? super T,Throwable,? extends U> biFunction)`
`<U> CompletableFuture<U>` `handleAsync(BiFunction<? super T,Throwable,? extends U> biFunction, Executor executor)`
`boolean` `isCancelled()`
`boolean` `isDone()`
`CompletableFuture<Void>` `runAfterBoth(CompletionStage<?> completionStage, Runnable runnable)`
`CompletableFuture<Void>` `runAfterBothAsync(CompletionStage<?> completionStage, Runnable runnable)`
`CompletableFuture<Void>` `runAfterBothAsync(CompletionStage<?> completionStage, Runnable runnable, Executor executor)`
`CompletableFuture<Void>` `runAfterEither(CompletionStage<?> completionStage, Runnable runnable)`
`CompletableFuture<Void>` `runAfterEitherAsync(CompletionStage<?> completionStage, Runnable runnable)`
`CompletableFuture<Void>` `runAfterEitherAsync(CompletionStage<?> completionStage, Runnable runnable, Executor executor)`
`CompletableFuture<Void>` `thenAccept(Consumer<? super T> consumer)`
`CompletableFuture<Void>` `thenAcceptAsync(Consumer<? super T> consumer)`
`CompletableFuture<Void>` `thenAcceptAsync(Consumer<? super T> consumer, Executor executor)`
`<U> CompletableFuture<Void>` `thenAcceptBoth(CompletionStage<? extends U> completionStage, BiConsumer<? super T,? super U> biConsumer)`
`<U> CompletableFuture<Void>` `thenAcceptBothAsync(CompletionStage<? extends U> completionStage, BiConsumer<? super T,? super U> biConsumer)`
`<U> CompletableFuture<Void>` `thenAcceptBothAsync(CompletionStage<? extends U> completionStage, BiConsumer<? super T,? super U> biConsumer, Executor executor)`
`<U> CompletableFuture<U>` `thenApply(Function<? super T,? extends U> function)`
`<U> CompletableFuture<U>` `thenApplyAsync(Function<? super T,? extends U> function)`
`<U> CompletableFuture<U>` `thenApplyAsync(Function<? super T,? extends U> function, Executor executor)`
`<U,V> CompletableFuture<V>` `thenCombine(CompletionStage<? extends U> completionStage, BiFunction<? super T,? super U,? extends V> biFunction)`
`<U,V> CompletableFuture<V>` `thenCombineAsync(CompletionStage<? extends U> completionStage, BiFunction<? super T,? super U,? extends V> biFunction)`
`<U,V> CompletableFuture<V>` `thenCombineAsync(CompletionStage<? extends U> completionStage, BiFunction<? super T,? super U,? extends V> biFunction, Executor executor)`
`<U> CompletableFuture<U>` `thenCompose(Function<? super T,? extends CompletionStage<U>> function)`
`<U> CompletableFuture<U>` `thenComposeAsync(Function<? super T,? extends CompletionStage<U>> function)`
`<U> CompletableFuture<U>` `thenComposeAsync(Function<? super T,? extends CompletionStage<U>> function, Executor executor)`
`CompletableFuture<Void>` `thenRun(Runnable runnable)`
`CompletableFuture<Void>` `thenRunAsync(Runnable runnable)`
`CompletableFuture<Void>` `thenRunAsync(Runnable runnable, Executor executor)`
`CompletableFuture<T>` `toCompletableFuture()`
`CompletableFuture<T>` `whenComplete(BiConsumer<? super T,? super Throwable> biConsumer)`
`CompletableFuture<T>` `whenCompleteAsync(BiConsumer<? super T,? super Throwable> biConsumer)`
`CompletableFuture<T>` `whenCompleteAsync(BiConsumer<? super T,? super Throwable> biConsumer, Executor executor)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### IgniteClientFutureImpl

    public IgniteClientFutureImpl(CompletableFuture<T> fut,
                                  Function<Boolean,Boolean> onCancel)

Ctor.

Parameters:
  `fut` - Future to wrap.

#### IgniteClientFutureImpl

    public IgniteClientFutureImpl(CompletionStage<T> fut)

Ctor.

Parameters:
  `fut` - Future to wrap.

### Method Detail

#### completedFuture

    public static <T> IgniteClientFutureImpl<T> completedFuture(T res)

Gets a completed future with the given result.

Type Parameters:
  `T` - Result type.
Parameters:
  `res` - Result to wrap in a future.
Returns:
  Completed future.

#### isDone

    public boolean isDone()

Specified by:
  `isDone` in interface `Future<T>`

#### get

    public T get()
          throws InterruptedException,
                 ExecutionException

Specified by:
  `get` in interface `Future<T>`
Throws:
  `InterruptedException`
  `ExecutionException`

#### get

    public T get(long l,
                 TimeUnit timeUnit)
          throws InterruptedException,
                 ExecutionException,
                 TimeoutException

Specified by:
  `get` in interface `Future<T>`
Throws:
  `InterruptedException`
  `ExecutionException`
  `TimeoutException`

#### thenApply

    public <U> CompletableFuture<U> thenApply(Function<? super T,? extends U> function)

Specified by:
  `thenApply` in interface `CompletionStage<T>`

#### thenApplyAsync

    public <U> CompletableFuture<U> thenApplyAsync(Function<? super T,? extends U> function)

Specified by:
  `thenApplyAsync` in interface `CompletionStage<T>`

#### thenApplyAsync

    public <U> CompletableFuture<U> thenApplyAsync(Function<? super T,? extends U> function,
                                                   Executor executor)

Specified by:
  `thenApplyAsync` in interface `CompletionStage<T>`

#### thenAccept

    public CompletableFuture<Void> thenAccept(Consumer<? super T> consumer)

Specified by:
  `thenAccept` in interface `CompletionStage<T>`

#### thenAcceptAsync

    public CompletableFuture<Void> thenAcceptAsync(Consumer<? super T> consumer)

Specified by:
  `thenAcceptAsync` in interface `CompletionStage<T>`

#### thenAcceptAsync

    public CompletableFuture<Void> thenAcceptAsync(Consumer<? super T> consumer,
                                                   Executor executor)

Specified by:
  `thenAcceptAsync` in interface `CompletionStage<T>`

#### thenRun

    public CompletableFuture<Void> thenRun(Runnable runnable)

Specified by:
  `thenRun` in interface `CompletionStage<T>`

#### thenRunAsync

    public CompletableFuture<Void> thenRunAsync(Runnable runnable)

Specified by:
  `thenRunAsync` in interface `CompletionStage<T>`

#### thenRunAsync

    public CompletableFuture<Void> thenRunAsync(Runnable runnable,
                                                Executor executor)

Specified by:
  `thenRunAsync` in interface `CompletionStage<T>`

#### thenCombine

    public <U,V> CompletableFuture<V> thenCombine(CompletionStage<? extends U> completionStage,
                                                  BiFunction<? super T,? super U,? extends V> biFunction)

Specified by:
  `thenCombine` in interface `CompletionStage<T>`

#### thenCombineAsync

    public <U,V> CompletableFuture<V> thenCombineAsync(CompletionStage<? extends U> completionStage,
                                                       BiFunction<? super T,? super U,? extends V> biFunction)

Specified by:
  `thenCombineAsync` in interface `CompletionStage<T>`

#### thenCombineAsync

    public <U,V> CompletableFuture<V> thenCombineAsync(CompletionStage<? extends U> completionStage,
                                                       BiFunction<? super T,? super U,? extends V> biFunction,
                                                       Executor executor)

Specified by:
  `thenCombineAsync` in interface `CompletionStage<T>`

#### thenAcceptBoth

    public <U> CompletableFuture<Void> thenAcceptBoth(CompletionStage<? extends U> completionStage,
                                                      BiConsumer<? super T,? super U> biConsumer)

Specified by:
  `thenAcceptBoth` in interface `CompletionStage<T>`

#### thenAcceptBothAsync

    public <U> CompletableFuture<Void> thenAcceptBothAsync(CompletionStage<? extends U> completionStage,
                                                           BiConsumer<? super T,? super U> biConsumer)

Specified by:
  `thenAcceptBothAsync` in interface `CompletionStage<T>`

#### thenAcceptBothAsync

    public <U> CompletableFuture<Void> thenAcceptBothAsync(CompletionStage<? extends U> completionStage,
                                                           BiConsumer<? super T,? super U> biConsumer,
                                                           Executor executor)

Specified by:
  `thenAcceptBothAsync` in interface `CompletionStage<T>`

#### runAfterBoth

    public CompletableFuture<Void> runAfterBoth(CompletionStage<?> completionStage,
                                                Runnable runnable)

Specified by:
  `runAfterBoth` in interface `CompletionStage<T>`

#### runAfterBothAsync

    public CompletableFuture<Void> runAfterBothAsync(CompletionStage<?> completionStage,
                                                     Runnable runnable)

Specified by:
  `runAfterBothAsync` in interface `CompletionStage<T>`

#### runAfterBothAsync

    public CompletableFuture<Void> runAfterBothAsync(CompletionStage<?> completionStage,
                                                     Runnable runnable,
                                                     Executor executor)

Specified by:
  `runAfterBothAsync` in interface `CompletionStage<T>`

#### applyToEither

    public <U> CompletableFuture<U> applyToEither(CompletionStage<? extends T> completionStage,
                                                  Function<? super T,U> function)

Specified by:
  `applyToEither` in interface `CompletionStage<T>`

#### applyToEitherAsync

    public <U> CompletableFuture<U> applyToEitherAsync(CompletionStage<? extends T> completionStage,
                                                       Function<? super T,U> function)

Specified by:
  `applyToEitherAsync` in interface `CompletionStage<T>`

#### applyToEitherAsync

    public <U> CompletableFuture<U> applyToEitherAsync(CompletionStage<? extends T> completionStage,
                                                       Function<? super T,U> function,
                                                       Executor executor)

Specified by:
  `applyToEitherAsync` in interface `CompletionStage<T>`

#### acceptEither

    public CompletableFuture<Void> acceptEither(CompletionStage<? extends T> completionStage,
                                                Consumer<? super T> consumer)

Specified by:
  `acceptEither` in interface `CompletionStage<T>`

#### acceptEitherAsync

    public CompletableFuture<Void> acceptEitherAsync(CompletionStage<? extends T> completionStage,
                                                     Consumer<? super T> consumer)

Specified by:
  `acceptEitherAsync` in interface `CompletionStage<T>`

#### acceptEitherAsync

    public CompletableFuture<Void> acceptEitherAsync(CompletionStage<? extends T> completionStage,
                                                     Consumer<? super T> consumer,
                                                     Executor executor)

Specified by:
  `acceptEitherAsync` in interface `CompletionStage<T>`

#### runAfterEither

    public CompletableFuture<Void> runAfterEither(CompletionStage<?> completionStage,
                                                  Runnable runnable)

Specified by:
  `runAfterEither` in interface `CompletionStage<T>`

#### runAfterEitherAsync

    public CompletableFuture<Void> runAfterEitherAsync(CompletionStage<?> completionStage,
                                                       Runnable runnable)

Specified by:
  `runAfterEitherAsync` in interface `CompletionStage<T>`

#### runAfterEitherAsync

    public CompletableFuture<Void> runAfterEitherAsync(CompletionStage<?> completionStage,
                                                       Runnable runnable,
                                                       Executor executor)

Specified by:
  `runAfterEitherAsync` in interface `CompletionStage<T>`

#### thenCompose

    public <U> CompletableFuture<U> thenCompose(Function<? super T,? extends CompletionStage<U>> function)

Specified by:
  `thenCompose` in interface `CompletionStage<T>`

#### thenComposeAsync

    public <U> CompletableFuture<U> thenComposeAsync(Function<? super T,? extends CompletionStage<U>> function)

Specified by:
  `thenComposeAsync` in interface `CompletionStage<T>`

#### thenComposeAsync

    public <U> CompletableFuture<U> thenComposeAsync(Function<? super T,? extends CompletionStage<U>> function,
                                                     Executor executor)

Specified by:
  `thenComposeAsync` in interface `CompletionStage<T>`

#### whenComplete

    public CompletableFuture<T> whenComplete(BiConsumer<? super T,? super Throwable> biConsumer)

Specified by:
  `whenComplete` in interface `CompletionStage<T>`

#### whenCompleteAsync

    public CompletableFuture<T> whenCompleteAsync(BiConsumer<? super T,? super Throwable> biConsumer)

Specified by:
  `whenCompleteAsync` in interface `CompletionStage<T>`

#### whenCompleteAsync

    public CompletableFuture<T> whenCompleteAsync(BiConsumer<? super T,? super Throwable> biConsumer,
                                                  Executor executor)

Specified by:
  `whenCompleteAsync` in interface `CompletionStage<T>`

#### handle

    public <U> CompletableFuture<U> handle(BiFunction<? super T,Throwable,? extends U> biFunction)

Specified by:
  `handle` in interface `CompletionStage<T>`

#### handleAsync

    public <U> CompletableFuture<U> handleAsync(BiFunction<? super T,Throwable,? extends U> biFunction)

Specified by:
  `handleAsync` in interface `CompletionStage<T>`

#### handleAsync

    public <U> CompletableFuture<U> handleAsync(BiFunction<? super T,Throwable,? extends U> biFunction,
                                                Executor executor)

Specified by:
  `handleAsync` in interface `CompletionStage<T>`

#### toCompletableFuture

    public CompletableFuture<T> toCompletableFuture()

Specified by:
  `toCompletableFuture` in interface `CompletionStage<T>`

#### exceptionally

    public CompletableFuture<T> exceptionally(Function<Throwable,? extends T> function)

Specified by:
  `exceptionally` in interface `CompletionStage<T>`

#### cancel

    public boolean cancel(boolean mayInterruptIfRunning)

Specified by:
  `cancel` in interface `Future<T>`

#### isCancelled

    public boolean isCancelled()

Specified by:
  `isCancelled` in interface `Future<T>`

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.11.1
Release Date | : December 20 2021