public class FastFuture<T>
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
FastFuture.OnComplete |
Constructor and Description |
---|
FastFuture() |
FastFuture(FinalPipeline pipeline,
java.util.function.Consumer<FastFuture<T>> doFinally) |
FastFuture(FinalPipeline pipeline,
int max) |
Modifier and Type | Method and Description |
---|---|
static <R> FastFuture<java.util.List<R>> |
allOf(java.lang.Runnable onComplete,
FastFuture... futures) |
static <R> FastFuture<java.util.List<R>> |
anyOf(FastFuture... futures) |
void |
await() |
void |
clearFast() |
static <T> FastFuture<T> |
completedFuture(T value) |
void |
essential(java.util.function.Consumer<FastFuture.OnComplete> fn)
Called at least once on complete
|
static <T> FastFuture<T> |
failedFuture(java.lang.Throwable t) |
static <T> FastFuture<T> |
fromCompletableFuture(java.util.concurrent.CompletableFuture<T> cf)
Internal conversion method to convert CompletableFutures to FastFuture.
|
T |
join()
Join which can be called exactly once!
|
void |
markComplete() |
void |
onComplete(java.util.function.Consumer<FastFuture.OnComplete> fn)
Called at least once on complete
|
FastFuture<T> |
populateFromCompletableFuture(java.util.concurrent.CompletableFuture<T> cf) |
void |
set(T result) |
java.util.concurrent.CompletableFuture<T> |
toCompletableFuture() |
static <R> FastFuture<java.util.List<R>> |
xOf(int x,
java.lang.Runnable onComplete,
FastFuture... futures) |
public FastFuture()
public FastFuture(FinalPipeline pipeline, java.util.function.Consumer<FastFuture<T>> doFinally)
public FastFuture(FinalPipeline pipeline, int max)
public void await()
public T join()
public void markComplete()
public static <T> FastFuture<T> completedFuture(T value)
public java.util.concurrent.CompletableFuture<T> toCompletableFuture()
public FastFuture<T> populateFromCompletableFuture(java.util.concurrent.CompletableFuture<T> cf)
public static <T> FastFuture<T> failedFuture(java.lang.Throwable t)
public static <T> FastFuture<T> fromCompletableFuture(java.util.concurrent.CompletableFuture<T> cf)
cf
- public static <R> FastFuture<java.util.List<R>> allOf(java.lang.Runnable onComplete, FastFuture... futures)
public static <R> FastFuture<java.util.List<R>> xOf(int x, java.lang.Runnable onComplete, FastFuture... futures)
public static <R> FastFuture<java.util.List<R>> anyOf(FastFuture... futures)
public void set(T result)
public void clearFast()
public void essential(java.util.function.Consumer<FastFuture.OnComplete> fn)
fn
- public void onComplete(java.util.function.Consumer<FastFuture.OnComplete> fn)
fn
-