| Package | Description |
|---|---|
| io.vavr.concurrent |
This package contains basic building blocks for creating fast, asynchronous, non-blocking parallel code.
|
| Modifier and Type | Method and Description |
|---|---|
default Promise<T> |
Promise.complete(Try<? extends T> value)
Completes this
Promise with the given value. |
default Promise<T> |
Promise.completeWith(Future<? extends T> other)
Completes this
Promise with the given Future, once that Future is completed. |
static <T> Promise<T> |
Promise.failed(Executor executor,
Throwable exception)
Creates a failed
Promise, backed by the given Executor. |
static <T> Promise<T> |
Promise.failed(Throwable exception)
Creates a failed
Promise, backed by the Future.DEFAULT_EXECUTOR. |
default Promise<T> |
Promise.failure(Throwable exception)
Completes this
Promise with the given exception. |
static <T> Promise<T> |
Promise.fromTry(Executor executor,
Try<? extends T> result)
|
static <T> Promise<T> |
Promise.fromTry(Try<? extends T> result)
|
static <T> Promise<T> |
Promise.make()
Makes a
Promise that isn't fulfilled yet, backed by the Future.DEFAULT_EXECUTOR. |
static <T> Promise<T> |
Promise.make(Executor executor)
Makes a
Promise that isn't fulfilled yet, backed by the given Executor. |
static <T> Promise<T> |
Promise.narrow(Promise<? extends T> promise)
Narrows a widened
Promise<? extends T> to Promise<T>
by performing a type-safe cast. |
default Promise<T> |
Promise.success(T value)
Completes this
Promise with the given value. |
static <T> Promise<T> |
Promise.successful(Executor executor,
T result)
Creates a succeeded
Promise, backed by the given Executor. |
static <T> Promise<T> |
Promise.successful(T result)
Creates a succeeded
Promise, backed by the Future.DEFAULT_EXECUTOR. |
default Promise<T> |
Promise.tryCompleteWith(Future<? extends T> other)
Attempts to complete this
Promise with the specified Future, once that Future is completed. |
| Modifier and Type | Method and Description |
|---|---|
static <T> Promise<T> |
Promise.narrow(Promise<? extends T> promise)
Narrows a widened
Promise<? extends T> to Promise<T>
by performing a type-safe cast. |
Copyright © 2019. All Rights Reserved.