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.ts1API.For2Future.ts1API.For3Future.ts1API.For4Future.ts1API.For5Future.ts1API.For6Future.ts1API.For7Future.ts1API.For8Future.ts1API.For2Future.ts2API.For3Future.ts2API.For4Future.ts2API.For5Future.ts2API.For6Future.ts2API.For7Future.ts2API.For8Future.ts2API.For3Future.ts3API.For4Future.ts3API.For5Future.ts3API.For6Future.ts3API.For7Future.ts3API.For8Future.ts3API.For4Future.ts4API.For5Future.ts4API.For6Future.ts4API.For7Future.ts4API.For8Future.ts4API.For5Future.ts5API.For6Future.ts5API.For7Future.ts5API.For8Future.ts5API.For6Future.ts6API.For7Future.ts6API.For8Future.ts6API.For7Future.ts7API.For8Future.ts7API.For8Future.ts8Modifier and TypeMethodDescriptionstatic <T> Future<T> API.Future(CheckedFunction0<? extends T> computation) Alias forFuture.of(CheckedFunction0)static <T> Future<T> API.Future(Executor executorService, CheckedFunction0<? extends T> computation) Alias forFuture.of(Executor, CheckedFunction0)static <T> Future<T> Alias forFuture.successful(Executor, Object)static <T> Future<T> API.Future(T result) Alias forFuture.successful(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.ModifierConstructorDescriptionprivateFor1Future(Future<T1> ts1) privateFor2Future(Future<T1> ts1, Future<T2> ts2) privateprivateprivateprivateFor6Future(Future<T1> ts1, Future<T2> ts2, Future<T3> ts3, Future<T4> ts4, Future<T5> ts5, Future<T6> ts6) privateFor7Future(Future<T1> ts1, Future<T2> ts2, Future<T3> ts3, Future<T4> ts4, Future<T5> ts5, Future<T6> ts6, Future<T7> ts7) privateFor8Future(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 classFutureImpl<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 givenpartialFunctionby 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 thisFutureby callingTry.filterTry(CheckedPredicate).Returns aFuturethat eventually succeeds with the first result of the givenFutures which matches the givenpredicate.Future.find(Executor executor, Iterable<? extends Future<? extends T>> futures, Predicate<? super T> predicate) Returns aFuturethat eventually succeeds with the first result of the givenFutures which matches the givenpredicate.static <T> Future<T> Future.firstCompletedOf(Iterable<? extends Future<? extends T>> futures) Returns a newFuturethat will contain the result of the first of the given futures that is completed, backed by theFuture.DEFAULT_EXECUTOR.static <T> Future<T> Future.firstCompletedOf(Executor executor, Iterable<? extends Future<? extends T>> futures) Returns a newFuturethat 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 aFuturewith the given java.util.concurrent.Future, backed by givenExecutorstatic <T> Future<T> Future.fromJavaFuture(Future<T> future) Creates aFuturewith the given java.util.concurrent.Future, backed by theFuture.DEFAULT_EXECUTORstatic <T> Future<T> static <T> Future<T> Promise.future()Returns the underlyingFutureof 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 theFuture.DEFAULT_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 theFuture.DEFAULT_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 manyFutures into a singleFutureby transforming anIterable<Future<? extends T>>into aFuture<Seq<T>>.Reduces manyFutures into a singleFutureby 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 theFuture.DEFAULT_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 singleFutureby 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 singleFutureby 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 thisPromisewith the givenFuture, once thatFutureis 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 thisPromisewith the specifiedFuture, once thatFutureis 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 aFuturethat eventually succeeds with the first result of the givenFutures which matches the givenpredicate.Future.find(Executor executor, Iterable<? extends Future<? extends T>> futures, Predicate<? super T> predicate) Returns aFuturethat eventually succeeds with the first result of the givenFutures which matches the givenpredicate.static <T> Future<T> Future.firstCompletedOf(Iterable<? extends Future<? extends T>> futures) Returns a newFuturethat will contain the result of the first of the given futures that is completed, backed by theFuture.DEFAULT_EXECUTOR.static <T> Future<T> Future.firstCompletedOf(Executor executor, Iterable<? extends Future<? extends T>> futures) Returns a newFuturethat 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 manyFutures into a singleFutureby transforming anIterable<Future<? extends T>>into aFuture<Seq<T>>.Reduces manyFutures into a singleFutureby transforming anIterable<Future<? extends T>>into aFuture<Seq<T>>.default <U> UTransforms 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 singleFutureby 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 singleFutureby transforming anIterable<? extends T>into aFuture<Seq<U>>.