public class PgxFuture<T>
extends <any>
CompletableFuture
Constructor and Description |
---|
PgxFuture() |
Modifier and Type | Method and Description |
---|---|
static <T> PgxFuture<Void> |
allOf(List<PgxFuture<T>> promises) |
boolean |
cancel() |
PgxFuture<T> |
cancelOn(PgxFuture promise)
If given promise completes exceptionally because it was canceled,
cancel() gets called on this promise as well. |
static <T> PgxFuture<T> |
completedFuture(T arg) |
static <T> PgxFuture<T> |
exceptionallyCompletedFuture(Throwable th) |
PgxFuture<Void> |
thenAccept(<any> block) |
<U> PgxFuture<U> |
thenApply(<any> fn) |
PgxFuture<T> |
thenComplete(PgxFuture<T> promise)
completes the given promise whenever this completes.
|
PgxFuture<T> |
thenComplete(PgxFuture<T> promise, Runnable cleanup)
completes the given promise whenever this completes.
|
<U> PgxFuture<U> |
thenCompose(<any> fn) |
public boolean cancel()
public PgxFuture<T> cancelOn(PgxFuture promise)
cancel()
gets called on this promise as well.promise
- If given promise completes exceptionally because it was canceled, cancel()
gets called on this promise as well. If given promise completes exceptionally (regardless of the causing exception) and this promise has started or is done, rollback()
gets called on this promise.public static <T> PgxFuture<T> completedFuture(T arg)
public static <T> PgxFuture<T> exceptionallyCompletedFuture(Throwable th)
public <U> PgxFuture<U> thenApply(<any> fn)
public PgxFuture<T> thenComplete(PgxFuture<T> promise)
promise
- the promisepublic PgxFuture<T> thenComplete(PgxFuture<T> promise, Runnable cleanup)
promise
-cleanup
- to be run upon completion (can be null)public <U> PgxFuture<U> thenCompose(<any> fn)
Copyright © 2015. All rights reserved.