Uses of Interface
com.dianxin.tori.base.concurrent.FutureAction
Packages that use FutureAction
-
Uses of FutureAction in com.dianxin.tori.base.concurrent
Methods in com.dianxin.tori.base.concurrent that return FutureActionModifier and TypeMethodDescriptionstatic <T> FutureAction<T> Creates a new FutureAction from a givenCallabletask, but Executor is IO.static <T> FutureAction<T> Creates a new FutureAction from a givenCallabletask.default @NotNull FutureAction<T> FutureAction.addCheck(@NotNull BooleanSupplier checks) Appends a new check to the existing ones using a logical AND (invalid input: '&'invalid input: '&').default <U,O> @NotNull FutureAction <O> FutureAction.and(@NotNull FutureAction<U> other, @NotNull BiFunction<? super T, ? super U, ? extends O> accumulator) Combines the result of this action with another action using an accumulator function.static <E> @NotNull FutureAction<List<E>> FutureAction.collect(@NotNull FutureAction<? extends E>... actions) Sequences multiple actions to run sequentially (one after another).static <E> @NotNull FutureAction<List<E>> FutureAction.collectParallel(@NotNull FutureAction<? extends E>... actions) Dispatches multiple actions to run in parallel simultaneously.static <T> FutureAction<T> FutureAction.completed(T value) Creates a FutureAction that is already completed with the given value.@NotNull FutureAction<T> FutureAction.deadline(long timestamp) Sets an absolute Unix timestamp deadline for this action.default @NotNull FutureAction<T> Delays the execution or completion of this action by a specified duration.<U> @NotNull FutureAction<U> FutureAction.flatMap(@NotNull Function<? super T, ? extends FutureAction<U>> mapper) Chains another asynchronous action to run after this one completes successfully.static <T> FutureAction<T> FutureAction.fromCompletableFuture(@NotNull CompletableFuture<T> future, @Nullable Executor executor) Creates a new FutureAction from a givenCompletableFuture.<U> @NotNull FutureAction<U> Transforms the result of this action using the provided mapping function.FutureAction.onErrorFlatMap(@Nullable Predicate<? super Throwable> condition, @NotNull Function<? super Throwable, ? extends FutureAction<? extends T>> map) Conditionally handles an exception by returning an entirely new asynchronous fallback action.default FutureAction<T> FutureAction.onErrorMap(@NotNull Function<? super Throwable, ? extends T> map) Maps the exception thrown by this action into a default successful result.FutureAction.onErrorMap(@Nullable Predicate<? super Throwable> condition, @NotNull Function<? super Throwable, ? extends T> map) Conditionally maps the exception into a successful result.@NotNull FutureAction<T> FutureAction.onErrorReturn(T fallback) Directly returns a hardcoded fallback value if an exception occurs.@NotNull FutureAction<T> FutureAction.onExecutor(@NotNull Executor executor) Transfers the completion processing of this action to a specific executor.@NotNull FutureAction<T> Appends a failure callback without interrupting the chain.@NotNull FutureAction<T> Appends a success callback without interrupting the chain.@NotNull FutureAction<T> Recovers from an exception by providing a fallback value.default @NotNull FutureAction<T> FutureAction.retryIfError(int retries) Retries this action immediately up to the specified maximum attempts if an error occurs.default @NotNull FutureAction<T> FutureAction.retryIfError(int retries, @NotNull Duration delay) Retries this action with a fixed backoff delay between attempts if an error occurs.default @NotNull FutureAction<T> FutureAction.retryIfError(int retries, @NotNull Duration delay, @Nullable Runnable onRetry) Retries this action with a fixed backoff delay and an execution hook invoked prior to each retry.default @NotNull FutureAction<T> FutureAction.retryIfError(int retries, @NotNull Duration delay, @Nullable Runnable onRetry, @Nullable Predicate<? super Throwable> condition) Retries this action using a comprehensive set of shortcut configurations including backoff, lifecycle hook, and error filtering.@NotNull FutureAction<T> Retries this action based on a custom retry strategy defined by aRetrypolicy.@NotNull FutureAction<T> FutureAction.setChecks(@Nullable BooleanSupplier checks) Sets a condition (check) that must returntruebefore the action is executed.default @NotNull FutureAction<T> Sets a relative timeout for this action.default @NotNull FutureAction<List<T>> FutureAction.zip(@NotNull FutureAction<? extends T> first, @NotNull FutureAction<? extends T>... other) Zips the results of multiple actions together in parallel execution.Methods in com.dianxin.tori.base.concurrent with parameters of type FutureActionModifier and TypeMethodDescriptiondefault <U,O> @NotNull FutureAction <O> FutureAction.and(@NotNull FutureAction<U> other, @NotNull BiFunction<? super T, ? super U, ? extends O> accumulator) Combines the result of this action with another action using an accumulator function.static <E> @NotNull FutureAction<List<E>> FutureAction.collect(@NotNull FutureAction<? extends E>... actions) Sequences multiple actions to run sequentially (one after another).static <E> @NotNull FutureAction<List<E>> FutureAction.collectParallel(@NotNull FutureAction<? extends E>... actions) Dispatches multiple actions to run in parallel simultaneously.default @NotNull FutureAction<List<T>> FutureAction.zip(@NotNull FutureAction<? extends T> first, @NotNull FutureAction<? extends T>... other) Zips the results of multiple actions together in parallel execution.Method parameters in com.dianxin.tori.base.concurrent with type arguments of type FutureActionModifier and TypeMethodDescription<U> @NotNull FutureAction<U> FutureAction.flatMap(@NotNull Function<? super T, ? extends FutureAction<U>> mapper) Chains another asynchronous action to run after this one completes successfully.FutureAction.onErrorFlatMap(@Nullable Predicate<? super Throwable> condition, @NotNull Function<? super Throwable, ? extends FutureAction<? extends T>> map) Conditionally handles an exception by returning an entirely new asynchronous fallback action.