Uses of Class
cloud.opencode.base.functional.async.Future
Packages that use Future
Package
Description
Async Utilities - Virtual Thread functional utilities
异步工具 - 虚拟线程函数式工具
-
Uses of Future in cloud.opencode.base.functional.async
Methods in cloud.opencode.base.functional.async that return FutureModifier and TypeMethodDescription<R> Future<R> Future.andThenVirtual(Function<? super T, ? extends R> action) Run action after completion on a virtual thread.static <T> Future<T> Create a failed Future with the given exception.Filter the value.static <T> Future<T> Future.firstCompleted(Future<T>... futures) Return the first completed future.<R> Future<R> FlatMap to another Future.<R> Future<R> Future.flatMapVirtual(Function<? super T, ? extends Future<R>> mapper) FlatMap on virtual thread.static <T> Future<T> Future.fromCallable(Callable<T> callable) Create a Future from a callable.static <T> Future<T> Future.fromCompletableFuture(CompletableFuture<T> cf) Create a Future from a CompletableFuture.<R> Future<R> Map the value to a new value.static <T> Future<T> Future.never()Create a Future that never completes.static <T> Future<T> Create a Future from a supplier (uses ForkJoinPool).static <T> Future<T> Create a Future from a supplier with custom executor.static <T> Future<T> Create a Future from a supplier using virtual threads.Future.onComplete(BiConsumer<? super T, ? super Throwable> action) Execute side effect on completion.Execute side effect on failure.Execute side effect on success.Provide a fallback Future on failure.Provide a fallback value on failure.Recover from specific exception type.Recover from any failure.Future.recoverWith(Function<? super Throwable, ? extends Future<T>> recovery) Recover with another Future.Combine a list of futures into a future of list.Combine a list of futures into a future of list.static <T> Future<T> Future.successful(T value) Create a successful Future with the given value.Apply a timeout to this Future.Apply a timeout with default value.Transform a collection into a future of list using a mapping function.static <A,B, R> Future <R> Future.zip(Future<A> futureA, Future<B> futureB, BiFunction<? super A, ? super B, ? extends R> zipper) Zip two futures into one.<U,R> Future <R> Future.zipWith(Future<U> other, BiFunction<? super T, ? super U, ? extends R> zipper) Zip this future with another.Methods in cloud.opencode.base.functional.async with parameters of type FutureModifier and TypeMethodDescriptionstatic <T> Future<T> Future.firstCompleted(Future<T>... futures) Return the first completed future.Provide a fallback Future on failure.Combine a list of futures into a future of list.static <A,B, R> Future <R> Future.zip(Future<A> futureA, Future<B> futureB, BiFunction<? super A, ? super B, ? extends R> zipper) Zip two futures into one.<U,R> Future <R> Future.zipWith(Future<U> other, BiFunction<? super T, ? super U, ? extends R> zipper) Zip this future with another.Method parameters in cloud.opencode.base.functional.async with type arguments of type FutureModifier and TypeMethodDescription<R> Future<R> FlatMap to another Future.<R> Future<R> Future.flatMapVirtual(Function<? super T, ? extends Future<R>> mapper) FlatMap on virtual thread.Future.recoverWith(Function<? super Throwable, ? extends Future<T>> recovery) Recover with another Future.Combine a list of futures into a future of list.Transform a collection into a future of list using a mapping function.