| Package | Description |
|---|---|
| org.smallibs.concurrent.asynchronous | |
| org.smallibs.concurrent.asynchronous.impl | |
| org.smallibs.concurrent.promise | |
| org.smallibs.concurrent.promise.impl |
| Modifier and Type | Method and Description |
|---|---|
<T> Promise<T> |
Executor.async(Callable<T> task)
Async method
|
| Modifier and Type | Method and Description |
|---|---|
<T> T |
Executor.await(Promise<T> promise)
Await method
|
<T> T |
Executor.await(Promise<T> promise,
long duration,
TimeUnit timeUnit)
Await method for a given duration
|
| Modifier and Type | Method and Description |
|---|---|
<T> Promise<T> |
ExecutorImpl.async(Callable<T> task) |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
ExecutorImpl.await(Promise<T> promise) |
<T> T |
ExecutorImpl.await(Promise<T> promise,
long duration,
TimeUnit timeUnit) |
| Modifier and Type | Method and Description |
|---|---|
default <R> Promise<R> |
Promise.and(FunctionWithError<? super T,R> function)
Method use when a new computation must be done when the current one succeed.
|
static <T> Promise<T> |
PromiseHelper.failure(Throwable t) |
<R> Promise<R> |
Promise.flatmap(java.util.function.Function<? super T,Promise<R>> function)
Method use to flatmap a function.
|
<R> Promise<R> |
Promise.map(FunctionWithError<? super T,R> function)
Method use to map a function.
|
static <T> Promise<T> |
PromiseHelper.success(T t) |
default <R> Promise<R> |
Promise.then(java.util.function.Function<? super T,Promise<R>> function)
Method use when a new asynchronous computation must be done when the current one succeed.
|
| Modifier and Type | Method and Description |
|---|---|
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> 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 use to flatmap a function.
|
default <R> Promise<R> |
Promise.then(java.util.function.Function<? super T,Promise<R>> function)
Method use when a new asynchronous computation must be done when the current one succeed.
|
| Modifier and Type | Class and Description |
|---|---|
class |
RunnablePromise<T> |
class |
SolvedPromise<T> |
Copyright © 2017. All rights reserved.