| Package | Description |
|---|---|
| org.smallibs.concurrent.execution | |
| org.smallibs.concurrent.promise | |
| org.smallibs.concurrent.promise.impl | |
| org.smallibs.data | |
| org.smallibs.util |
| 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 |
|---|---|
Promise<T> |
Promise.onComplete(java.util.function.Consumer<Try<T>> consumer)
Callback called when the computation terminates
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
SolvableFuture.solve(Try<T> response) |
boolean |
SolvablePromise.solve(Try<T> response) |
| Modifier and Type | Method and Description |
|---|---|
protected SolvableFuture<T> |
RunnablePromise.createFuture(java.util.function.Consumer<Try<T>> callbackOnComplete) |
protected SolvableFuture<T> |
SolvablePromise.createFuture(java.util.function.Consumer<Try<T>> callbackOnComplete) |
Promise<T> |
SolvablePromise.onComplete(java.util.function.Consumer<Try<T>> consumer) |
| Constructor and Description |
|---|
SolvedPromise(Try<T> value) |
| Constructor and Description |
|---|
SolvableFuture(java.util.function.Consumer<Try<T>> callbackOnComplete) |
| Modifier and Type | Class and Description |
|---|---|
static class |
Try.Failure<T>
Failure implementation
|
static class |
Try.Success<T>
Success implementation
|
| Modifier and Type | Method and Description |
|---|---|
static <T> Try<T> |
Try.failure(Throwable value) |
default Try<T> |
Try.filter(java.util.function.Predicate<? super T> predicate) |
<B> Try<B> |
Try.flatmap(java.util.function.Function<? super T,Try<B>> mapper) |
<B> Try<B> |
Try.Success.flatmap(java.util.function.Function<? super T,Try<B>> mapper) |
<B> Try<B> |
Try.Failure.flatmap(java.util.function.Function<? super T,Try<B>> mapper) |
default <B> Try<B> |
Try.map(java.util.function.Function<? super T,? extends B> mapper) |
Try<T> |
Try.onFailure(java.util.function.Consumer<? super Throwable> onFailure) |
Try<T> |
Try.Success.onFailure(java.util.function.Consumer<? super Throwable> onFailure) |
Try<T> |
Try.Failure.onFailure(java.util.function.Consumer<? super Throwable> onFailure) |
Try<T> |
Try.onSuccess(java.util.function.Consumer<? super T> onSuccess) |
Try<T> |
Try.Success.onSuccess(java.util.function.Consumer<? super T> onSuccess) |
Try<T> |
Try.Failure.onSuccess(java.util.function.Consumer<? super T> onSuccess) |
default Try<T> |
Try.self() |
static <T> Try<T> |
Try.success(T value) |
static <T> Try<T> |
MaybeHelper.toTry(Maybe<T> maybe) |
| Modifier and Type | Method and Description |
|---|---|
static <T> Monad<Try,T,Try<T>> |
TryHelper.monad(Try<T> aTry) |
static <T> Monad<Try,T,Try<T>> |
TryHelper.monad(Try<T> aTry) |
| Modifier and Type | Method and Description |
|---|---|
static <T> Monad<Try,T,Try<T>> |
TryHelper.monad(Try<T> aTry) |
static <T> Maybe<T> |
TryHelper.toMaybe(Try<T> aTry) |
| Modifier and Type | Method and Description |
|---|---|
default <R> R |
Try.apply(java.util.function.Function<HK<Try,T,Try<T>>,R> f) |
default <R> R |
Try.apply(java.util.function.Function<HK<Try,T,Try<T>>,R> f) |
<B> Try<B> |
Try.flatmap(java.util.function.Function<? super T,Try<B>> mapper) |
<B> Try<B> |
Try.Success.flatmap(java.util.function.Function<? super T,Try<B>> mapper) |
<B> Try<B> |
Try.Failure.flatmap(java.util.function.Function<? super T,Try<B>> mapper) |
| Modifier and Type | Method and Description |
|---|---|
static <T,R> java.util.function.Function<T,Try<R>> |
FunctionsHelper.toFunction(FunctionWithError<T,R> function) |
Copyright © 2020. All rights reserved.