Uses of Interface
io.vavr.concurrent.Future
Packages that use Future
Package
Description
Beside
API
the io.vavr package contains core types like (Checked)Functions and Tuples.This package contains basic building blocks for creating fast, asynchronous, non-blocking parallel code.
-
Uses of Future in io.vavr
Modifier and TypeFieldDescriptionAPI.For1Future.ts1
API.For2Future.ts1
API.For3Future.ts1
API.For4Future.ts1
API.For5Future.ts1
API.For6Future.ts1
API.For7Future.ts1
API.For8Future.ts1
API.For2Future.ts2
API.For3Future.ts2
API.For4Future.ts2
API.For5Future.ts2
API.For6Future.ts2
API.For7Future.ts2
API.For8Future.ts2
API.For3Future.ts3
API.For4Future.ts3
API.For5Future.ts3
API.For6Future.ts3
API.For7Future.ts3
API.For8Future.ts3
API.For4Future.ts4
API.For5Future.ts4
API.For6Future.ts4
API.For7Future.ts4
API.For8Future.ts4
API.For5Future.ts5
API.For6Future.ts5
API.For7Future.ts5
API.For8Future.ts5
API.For6Future.ts6
API.For7Future.ts6
API.For8Future.ts6
API.For7Future.ts7
API.For8Future.ts7
API.For8Future.ts8
Modifier and TypeMethodDescriptionstatic <T> Future
<T> API.Future
(CheckedFunction0<? extends T> computation) Alias forof(CheckedFunction0)
static <T> Future
<T> API.Future
(Executor executorService, CheckedFunction0<? extends T> computation) Alias forof(Executor, CheckedFunction0)
static <T> Future
<T> Alias forsuccessful(Executor, Object)
static <T> Future
<T> API.Future
(T result) Alias forsuccessful(Object)
API.For1Future.yield()
A shortcut foryield(Function.identity())
.<R> Future
<R> Yields a result for elements of the cross product of the underlying Future.<R> Future
<R> API.For2Future.yield
(BiFunction<? super T1, ? super T2, ? extends R> f) Yields a result for elements of the cross product of the underlying Futures.<R> Future
<R> Yields a result for elements of the cross product of the underlying Futures.<R> Future
<R> Yields a result for elements of the cross product of the underlying Futures.<R> Future
<R> API.For5Future.yield
(Function5<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? extends R> f) Yields a result for elements of the cross product of the underlying Futures.<R> Future
<R> API.For6Future.yield
(Function6<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? extends R> f) Yields a result for elements of the cross product of the underlying Futures.<R> Future
<R> API.For7Future.yield
(Function7<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? super T7, ? extends R> f) Yields a result for elements of the cross product of the underlying Futures.<R> Future
<R> API.For8Future.yield
(Function8<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? super T6, ? super T7, ? super T8, ? extends R> f) Yields a result for elements of the cross product of the underlying Futures.Modifier and TypeMethodDescriptionstatic <T,
_1 extends Option<Try<T>>>
API.Match.Pattern1<Future<T>, _1> Patterns.$Future
(API.Match.Pattern<_1, ?> p1) Modifier and TypeMethodDescriptionstatic <T1> API.For1Future
<T1> Creates aFor
-comprehension of one Future.static <T1,
T2> API.For2Future <T1, T2> Creates aFor
-comprehension of two Futures.static <T1,
T2, T3>
API.For3Future<T1, T2, T3> Creates aFor
-comprehension of three Futures.static <T1,
T2, T3, T4>
API.For4Future<T1, T2, T3, T4> Creates aFor
-comprehension of 4 Futures.static <T1,
T2, T3, T4, T5>
API.For5Future<T1, T2, T3, T4, T5> Creates aFor
-comprehension of 5 Futures.static <T1,
T2, T3, T4, T5, T6>
API.For6Future<T1, T2, T3, T4, T5, T6> API.For
(Future<T1> ts1, Future<T2> ts2, Future<T3> ts3, Future<T4> ts4, Future<T5> ts5, Future<T6> ts6) Creates aFor
-comprehension of 6 Futures.static <T1,
T2, T3, T4, T5, T6, T7>
API.For7Future<T1, T2, T3, T4, T5, T6, T7> API.For
(Future<T1> ts1, Future<T2> ts2, Future<T3> ts3, Future<T4> ts4, Future<T5> ts5, Future<T6> ts6, Future<T7> ts7) Creates aFor
-comprehension of 7 Futures.static <T1,
T2, T3, T4, T5, T6, T7, T8>
API.For8Future<T1, T2, T3, T4, T5, T6, T7, T8> API.For
(Future<T1> ts1, Future<T2> ts2, Future<T3> ts3, Future<T4> ts4, Future<T5> ts5, Future<T6> ts6, Future<T7> ts7, Future<T8> ts8) Creates aFor
-comprehension of 8 Futures.ModifierConstructorDescriptionprivate
For1Future
(Future<T1> ts1) private
For2Future
(Future<T1> ts1, Future<T2> ts2) private
private
private
private
For6Future
(Future<T1> ts1, Future<T2> ts2, Future<T3> ts3, Future<T4> ts4, Future<T5> ts5, Future<T6> ts6) private
For7Future
(Future<T1> ts1, Future<T2> ts2, Future<T3> ts3, Future<T4> ts4, Future<T5> ts5, Future<T6> ts6, Future<T7> ts7) private
For8Future
(Future<T1> ts1, Future<T2> ts2, Future<T3> ts3, Future<T4> ts4, Future<T5> ts5, Future<T6> ts6, Future<T7> ts7, Future<T8> ts8) -
Uses of Future in io.vavr.concurrent
Classes in io.vavr.concurrent that implement FutureModifier and TypeClassDescription(package private) final class
FutureImpl<T>
INTERNAL API - This class is subject to change.Methods in io.vavr.concurrent that return FutureModifier and TypeMethodDescriptionSupport for chaining of callbacks that are guaranteed to be executed in a specific order.Future.await()
Blocks the current Thread until this Future completed or returns immediately if this Future is already completed.Blocks the current Thread until this Future completed or returns immediately if this Future is already completed.FutureImpl.await()
default <R> Future
<R> Future.collect
(PartialFunction<? super T, ? extends R> partialFunction) Collects value that is in the domain of the givenpartialFunction
by mapping the value to typeR
.Future.failed()
A projection that inverses the result of this Future.static <T> Future
<T> static <T> Future
<T> Future.fallbackTo
(Future<? extends T> that) Returns a Future that returns the result of this Future, if it is a success.Shortcut forfilterTry(predicate::test
.Future.filterTry
(CheckedPredicate<? super T> predicate) Filters the result of thisFuture
by callingTry.filterTry(CheckedPredicate)
.Returns aFuture
that eventually succeeds with the first result of the givenFuture
s which matches the givenpredicate
.Future.find
(Executor executor, Iterable<? extends Future<? extends T>> futures, Predicate<? super T> predicate) Returns aFuture
that eventually succeeds with the first result of the givenFuture
s which matches the givenpredicate
.static <T> Future
<T> Future.firstCompletedOf
(Iterable<? extends Future<? extends T>> futures) Returns a newFuture
that will contain the result of the first of the given futures that is completed, backed by theDEFAULT_EXECUTOR
.static <T> Future
<T> Future.firstCompletedOf
(Executor executor, Iterable<? extends Future<? extends T>> futures) Returns a newFuture
that will contain the result of the first of the given futures that is completed, backed by the givenExecutor
.default <U> Future
<U> default <U> Future
<U> Future.flatMapTry
(CheckedFunction1<? super T, ? extends Future<? extends U>> mapper) static <T,
U> Future <U> Future.fold
(Iterable<? extends Future<? extends T>> futures, U zero, BiFunction<? super U, ? super T, ? extends U> f) Returns a Future which contains the result of the fold of the given future values.static <T,
U> Future <U> Future.fold
(Executor executor, Iterable<? extends Future<? extends T>> futures, U zero, BiFunction<? super U, ? super T, ? extends U> f) Returns a Future which contains the result of the fold of the given future values.static <T> Future
<T> Future.fromCompletableFuture
(CompletableFuture<T> future) static <T> Future
<T> Future.fromCompletableFuture
(Executor executor, CompletableFuture<T> future) static <T> Future
<T> Future.fromJavaFuture
(Executor executor, Future<T> future) Creates aFuture
with the given java.util.concurrent.Future, backed by givenExecutor
static <T> Future
<T> Future.fromJavaFuture
(Future<T> future) Creates aFuture
with the given java.util.concurrent.Future, backed by theDEFAULT_EXECUTOR
static <T> Future
<T> static <T> Future
<T> Promise.future()
Returns the underlyingFuture
of thisPromise
.PromiseImpl.future()
default <U> Future
<U> default <U> Future
<U> Future.mapTry
(CheckedFunction1<? super T, ? extends U> mapper) static <T> Future
<T> Narrows a widenedFuture<? extends T>
toFuture<T>
by performing a type-safe cast.static <T> Future
<T> Future.of
(CheckedFunction0<? extends T> computation) Starts an asynchronous computation, backed by theDEFAULT_EXECUTOR
.static <T> Future
<T> Future.of
(Executor executor, CheckedFunction0<? extends T> computation) Starts an asynchronous computation, backed by the givenExecutor
.static <T> Future
<T> Future.ofCallable
(Callable<? extends T> computation) Deprecated.Will be removed.static <T> Future
<T> Future.ofCallable
(Executor executor, Callable<? extends T> computation) Deprecated.Will be removed.static <T> Future
<T> Future.ofSupplier
(Executor executor, Supplier<? extends T> computation) Deprecated.Will be removed.static <T> Future
<T> Future.ofSupplier
(Supplier<? extends T> computation) Deprecated.Will be removed.Future.onComplete
(Consumer<? super Try<T>> action) Performs the action once the Future is complete.FutureImpl.onComplete
(Consumer<? super Try<T>> action) Performs the action once the Future is complete and the result is aTry.Failure
.Performs the action once the Future is complete and the result is aTry.Success
.Handles a failure of this Future by returning another result.Future.recoverWith
(Function<? super Throwable, ? extends Future<? extends T>> f) Handles a failure of this Future by returning the result of another Future.static <T> Future
<T> Future.reduce
(Iterable<? extends Future<? extends T>> futures, BiFunction<? super T, ? super T, ? extends T> f) Returns a Future which contains the reduce result of the given future values.static <T> Future
<T> Future.reduce
(Executor executor, Iterable<? extends Future<? extends T>> futures, BiFunction<? super T, ? super T, ? extends T> f) Returns a Future which contains the reduce result of the given future values.Future.run
(CheckedRunnable unit) Runs an asynchronous computation, backed by theDEFAULT_EXECUTOR
.static <T> Future
<T> Deprecated.Experimental APIFuture.run
(Executor executor, CheckedRunnable unit) Starts an asynchronous computation, backed by the givenExecutor
.static <T> Future
<T> Deprecated.Experimental APIFuture.runRunnable
(Runnable computation) Deprecated.Will be removed.Future.runRunnable
(Executor executor, Runnable computation) Deprecated.Will be removed.Reduces manyFuture
s into a singleFuture
by transforming anIterable<Future<? extends T>>
into aFuture<Seq<T>>
.Reduces manyFuture
s into a singleFuture
by transforming anIterable<Future<? extends T>>
into aFuture<Seq<T>>
.static <T> Future
<T> Future.successful
(Executor executor, T result) Creates a succeededFuture
, backed by the givenExecutor
.static <T> Future
<T> Future.successful
(T result) Creates a succeededFuture
, backed by theDEFAULT_EXECUTOR
.default <U> Future
<U> Future.transformValue
(Function<? super Try<T>, ? extends Try<? extends U>> f) Transforms the value of thisFuture
, whether it is a success or a failure.Future.traverse
(Iterable<? extends T> values, Function<? super T, ? extends Future<? extends U>> mapper) Maps the values of an iterable in parallel to a sequence of mapped values into a singleFuture
by transforming anIterable<? extends T>
into aFuture<Seq<U>>
.Future.traverse
(Executor executor, Iterable<? extends T> values, Function<? super T, ? extends Future<? extends U>> mapper) Maps the values of an iterable in parallel to a sequence of mapped values into a singleFuture
by transforming anIterable<? extends T>
into aFuture<Seq<U>>
.Returns a tuple of this and that Future result.default <U,
R> Future <R> Future.zipWith
(Future<? extends U> that, BiFunction<? super T, ? super U, ? extends R> combinator) Returns a this and that Future result combined using a given combinator function.Methods in io.vavr.concurrent with parameters of type FutureModifier and TypeMethodDescriptionPromise.completeWith
(Future<? extends T> other) Completes thisPromise
with the givenFuture
, once thatFuture
is completed.Future.fallbackTo
(Future<? extends T> that) Returns a Future that returns the result of this Future, if it is a success.static <T> Future
<T> Narrows a widenedFuture<? extends T>
toFuture<T>
by performing a type-safe cast.Promise.tryCompleteWith
(Future<? extends T> other) Attempts to complete thisPromise
with the specifiedFuture
, once thatFuture
is completed.Returns a tuple of this and that Future result.default <U,
R> Future <R> Future.zipWith
(Future<? extends U> that, BiFunction<? super T, ? super U, ? extends R> combinator) Returns a this and that Future result combined using a given combinator function.Method parameters in io.vavr.concurrent with type arguments of type FutureModifier and TypeMethodDescriptionReturns aFuture
that eventually succeeds with the first result of the givenFuture
s which matches the givenpredicate
.Future.find
(Executor executor, Iterable<? extends Future<? extends T>> futures, Predicate<? super T> predicate) Returns aFuture
that eventually succeeds with the first result of the givenFuture
s which matches the givenpredicate
.static <T> Future
<T> Future.firstCompletedOf
(Iterable<? extends Future<? extends T>> futures) Returns a newFuture
that will contain the result of the first of the given futures that is completed, backed by theDEFAULT_EXECUTOR
.static <T> Future
<T> Future.firstCompletedOf
(Executor executor, Iterable<? extends Future<? extends T>> futures) Returns a newFuture
that will contain the result of the first of the given futures that is completed, backed by the givenExecutor
.default <U> Future
<U> default <U> Future
<U> Future.flatMapTry
(CheckedFunction1<? super T, ? extends Future<? extends U>> mapper) static <T,
U> Future <U> Future.fold
(Iterable<? extends Future<? extends T>> futures, U zero, BiFunction<? super U, ? super T, ? extends U> f) Returns a Future which contains the result of the fold of the given future values.static <T,
U> Future <U> Future.fold
(Executor executor, Iterable<? extends Future<? extends T>> futures, U zero, BiFunction<? super U, ? super T, ? extends U> f) Returns a Future which contains the result of the fold of the given future values.Future.recoverWith
(Function<? super Throwable, ? extends Future<? extends T>> f) Handles a failure of this Future by returning the result of another Future.static <T> Future
<T> Future.reduce
(Iterable<? extends Future<? extends T>> futures, BiFunction<? super T, ? super T, ? extends T> f) Returns a Future which contains the reduce result of the given future values.static <T> Future
<T> Future.reduce
(Executor executor, Iterable<? extends Future<? extends T>> futures, BiFunction<? super T, ? super T, ? extends T> f) Returns a Future which contains the reduce result of the given future values.Reduces manyFuture
s into a singleFuture
by transforming anIterable<Future<? extends T>>
into aFuture<Seq<T>>
.Reduces manyFuture
s into a singleFuture
by transforming anIterable<Future<? extends T>>
into aFuture<Seq<T>>
.default <U> U
Transforms thisFuture
.Future.traverse
(Iterable<? extends T> values, Function<? super T, ? extends Future<? extends U>> mapper) Maps the values of an iterable in parallel to a sequence of mapped values into a singleFuture
by transforming anIterable<? extends T>
into aFuture<Seq<U>>
.Future.traverse
(Executor executor, Iterable<? extends T> values, Function<? super T, ? extends Future<? extends U>> mapper) Maps the values of an iterable in parallel to a sequence of mapped values into a singleFuture
by transforming anIterable<? extends T>
into aFuture<Seq<U>>
.