T
- type of the future's valuepublic class FlinkCompletableFuture<T> extends FlinkFuture<T> implements CompletableFuture<T>
CompletableFuture
which is backed by Promise
.scalaFuture
Constructor and Description |
---|
FlinkCompletableFuture() |
Modifier and Type | Method and Description |
---|---|
boolean |
cancel(boolean mayInterruptIfRunning)
Tries to cancel the future's operation.
|
boolean |
complete(T value)
Completes the future with the given value.
|
static <T> FlinkCompletableFuture<T> |
completed(T value) |
static <T> FlinkCompletableFuture<T> |
completedExceptionally(Throwable t) |
boolean |
completeExceptionally(Throwable t)
Completes the future with the given exception.
|
exceptionally, exceptionallyAsync, get, get, getNow, getScalaFuture, handle, handleAsync, isDone, supplyAsync, thenAccept, thenAcceptAsync, thenApply, thenApplyAsync, thenCombine, thenCombineAsync, thenCompose, thenComposeAsync
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
exceptionally, exceptionallyAsync, get, get, getNow, handle, handleAsync, isDone, thenAccept, thenAcceptAsync, thenApply, thenApplyAsync, thenCombine, thenCombineAsync, thenCompose, thenComposeAsync
public boolean complete(T value)
CompletableFuture
complete
in interface CompletableFuture<T>
value
- to complete the future withpublic boolean completeExceptionally(Throwable t)
CompletableFuture
completeExceptionally
in interface CompletableFuture<T>
t
- the exception to complete the future withpublic boolean cancel(boolean mayInterruptIfRunning)
Future
public static <T> FlinkCompletableFuture<T> completed(T value)
public static <T> FlinkCompletableFuture<T> completedExceptionally(Throwable t)
Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.