| Modifier and Type | Method and Description |
|---|---|
<T> Promise<T> |
Executor.async(Callable<T> task)
Async method
|
Promise<Unit> |
Executor.async(Executor.RunnableWithError task)
Async method
|
| Modifier and Type | Method and Description |
|---|---|
static <T> Try<T> |
ExecutorHelper.await(Promise<T> promise,
java.time.Duration duration)
Await method
|
| Modifier and Type | Method and Description |
|---|---|
<T> Promise<T> |
ExecutorImpl.async(Callable<T> task) |
Promise<Unit> |
ExecutorImpl.async(Executor.RunnableWithError task) |
| Modifier and Type | Method and Description |
|---|---|
default <R> Promise<R> |
Promise.and(FunctionWithError<? super T,R> function)
Method used when a new computation must be done when the current one succeed.
|
static Promise<Unit> |
PromiseHelper.exists(Promise... promises) |
static <T> Promise<T> |
PromiseHelper.failure(Throwable t) |
<R> Promise<R> |
Promise.flatmap(java.util.function.Function<? super T,Promise<R>> function)
Method used to flatmap a function.
|
static Promise<Unit> |
PromiseHelper.forall(Promise... promises) |
static Promise<Unit> |
PromiseHelper.join(Promise... promises) |
<R> Promise<R> |
Promise.map(FunctionWithError<? super T,? extends R> function)
Method used to map a function.
|
Promise<T> |
Promise.onComplete(java.util.function.Consumer<Try<T>> consumer)
Callback called when the computation terminates
|
Promise<T> |
Promise.onFailure(java.util.function.Consumer<Throwable> consumer)
Method called when the computation fails
|
Promise<T> |
Promise.onSuccess(java.util.function.Consumer<T> consumer)
Method called when the computation succeed
|
static <T> Promise<T> |
PromiseHelper.success(T t) |
default <R> Promise<R> |
Promise.then(java.util.function.Function<? super T,Promise<R>> function)
Method used when a new asynchronous computation must be done when the current one succeed.
|
| Modifier and Type | Method and Description |
|---|---|
static <T> Applicative<Promise,T,Promise<T>> |
PromiseHelper.applicative(Promise<T> promise) |
static <T> Applicative<Promise,T,Promise<T>> |
PromiseHelper.applicative(Promise<T> promise) |
static <T> Functor<Promise,T,Promise<T>> |
PromiseHelper.functor(Promise<T> promise) |
static <T> Functor<Promise,T,Promise<T>> |
PromiseHelper.functor(Promise<T> promise) |
static <T> Monad<Promise,T,Promise<T>> |
PromiseHelper.monad(Promise<T> promise) |
static <T> Monad<Promise,T,Promise<T>> |
PromiseHelper.monad(Promise<T> promise) |
| Modifier and Type | Method and Description |
|---|---|
static <T> Applicative<Promise,T,Promise<T>> |
PromiseHelper.applicative(Promise<T> promise) |
static Promise<Unit> |
PromiseHelper.exists(Promise... promises) |
static Promise<Unit> |
PromiseHelper.forall(Promise... promises) |
static <T> Functor<Promise,T,Promise<T>> |
PromiseHelper.functor(Promise<T> promise) |
static Promise<Unit> |
PromiseHelper.join(Promise... promises) |
static <T> Monad<Promise,T,Promise<T>> |
PromiseHelper.monad(Promise<T> promise) |
| Modifier and Type | Method and Description |
|---|---|
<R> Promise<R> |
Promise.flatmap(java.util.function.Function<? super T,Promise<R>> function)
Method used to flatmap a function.
|
default <R> Promise<R> |
Promise.then(java.util.function.Function<? super T,Promise<R>> function)
Method used when a new asynchronous computation must be done when the current one succeed.
|
| Modifier and Type | Class and Description |
|---|---|
class |
PromisesSet |
class |
RunnablePromise<T> |
class |
SolvablePromise<T> |
class |
SolvedPromise<T> |
| Modifier and Type | Method and Description |
|---|---|
Promise<T> |
SolvablePromise.onComplete(java.util.function.Consumer<Try<T>> consumer) |
Promise<T> |
SolvablePromise.onFailure(java.util.function.Consumer<Throwable> consumer) |
Promise<T> |
SolvablePromise.onSuccess(java.util.function.Consumer<T> consumer) |
| Constructor and Description |
|---|
PromisesSet(PromisesSet.Strategy strategy,
Promise... promises) |
| Modifier and Type | Method and Description |
|---|---|
static <T> Promise<T> |
CompletableFutureHelper.promise(CompletableFuture<T> completableFuture) |
| Modifier and Type | Method and Description |
|---|---|
static <T> CompletableFuture<T> |
CompletableFutureHelper.completableFuture(Promise<T> promise) |
Copyright © 2020. All rights reserved.