Uses of Class
dev.failsafe.spi.ExecutionResult
Packages that use ExecutionResult
Package
Description
The Failsafe Service Provider Interface (SPI).
-
Uses of ExecutionResult in dev.failsafe.internal
Methods in dev.failsafe.internal that return ExecutionResultModifier and TypeMethodDescriptionprotected ExecutionResult<R> BulkheadExecutor.onFailure(ExecutionContext<R> context, ExecutionResult<R> result) protected ExecutionResult<R> CircuitBreakerExecutor.onFailure(ExecutionContext<R> context, ExecutionResult<R> result) RetryPolicyExecutor.onFailure(ExecutionContext<R> context, ExecutionResult<R> result) protected ExecutionResult<R> BulkheadExecutor.preExecute()protected ExecutionResult<R> CircuitBreakerExecutor.preExecute()protected ExecutionResult<R> RateLimiterExecutor.preExecute()Methods in dev.failsafe.internal that return types with arguments of type ExecutionResultModifier and TypeMethodDescriptionFallbackExecutor.apply(Function<SyncExecutionInternal<R>, ExecutionResult<R>> innerFn, Scheduler scheduler) Performs an execution by calling pre-execute else calling the supplier, applying a fallback if it fails, and calling post-execute.RetryPolicyExecutor.apply(Function<SyncExecutionInternal<R>, ExecutionResult<R>> innerFn, Scheduler scheduler) TimeoutExecutor.apply(Function<SyncExecutionInternal<R>, ExecutionResult<R>> innerFn, Scheduler scheduler) Schedules a separate timeout call that fails withTimeoutExceededExceptionif the policy's timeout is exceeded.FallbackExecutor.applyAsync(Function<AsyncExecutionInternal<R>, CompletableFuture<ExecutionResult<R>>> innerFn, Scheduler scheduler, FailsafeFuture<R> future) Performs an async execution by calling pre-execute else calling the supplier and doing a post-execute.RetryPolicyExecutor.applyAsync(Function<AsyncExecutionInternal<R>, CompletableFuture<ExecutionResult<R>>> innerFn, Scheduler scheduler, FailsafeFuture<R> future) TimeoutExecutor.applyAsync(Function<AsyncExecutionInternal<R>, CompletableFuture<ExecutionResult<R>>> innerFn, Scheduler scheduler, FailsafeFuture<R> future) Schedules a separate timeout call that blocks and fails withTimeoutExceededExceptionif the policy's timeout is exceeded.RetryPolicyExecutor.onFailureAsync(ExecutionContext<R> context, ExecutionResult<R> result, Scheduler scheduler, FailsafeFuture<R> future) Defaults async executions to not be complete untilsays they are.protected CompletableFuture<ExecutionResult<R>> BulkheadExecutor.preExecuteAsync(Scheduler scheduler, FailsafeFuture<R> future) protected CompletableFuture<ExecutionResult<R>> RateLimiterExecutor.preExecuteAsync(Scheduler scheduler, FailsafeFuture<R> future) Methods in dev.failsafe.internal with parameters of type ExecutionResultModifier and TypeMethodDescriptionvoidEventHandler.handle(ExecutionResult<R> result, ExecutionContext<R> context) booleanTimeoutExecutor.isFailure(ExecutionResult<R> result) protected ExecutionResult<R> BulkheadExecutor.onFailure(ExecutionContext<R> context, ExecutionResult<R> result) protected ExecutionResult<R> CircuitBreakerExecutor.onFailure(ExecutionContext<R> context, ExecutionResult<R> result) RetryPolicyExecutor.onFailure(ExecutionContext<R> context, ExecutionResult<R> result) RetryPolicyExecutor.onFailureAsync(ExecutionContext<R> context, ExecutionResult<R> result, Scheduler scheduler, FailsafeFuture<R> future) Defaults async executions to not be complete untilsays they are.voidBulkheadExecutor.onSuccess(ExecutionResult<R> result) voidCircuitBreakerExecutor.onSuccess(ExecutionResult<R> result) Method parameters in dev.failsafe.internal with type arguments of type ExecutionResultModifier and TypeMethodDescriptionFallbackExecutor.apply(Function<SyncExecutionInternal<R>, ExecutionResult<R>> innerFn, Scheduler scheduler) Performs an execution by calling pre-execute else calling the supplier, applying a fallback if it fails, and calling post-execute.RetryPolicyExecutor.apply(Function<SyncExecutionInternal<R>, ExecutionResult<R>> innerFn, Scheduler scheduler) TimeoutExecutor.apply(Function<SyncExecutionInternal<R>, ExecutionResult<R>> innerFn, Scheduler scheduler) Schedules a separate timeout call that fails withTimeoutExceededExceptionif the policy's timeout is exceeded.FallbackExecutor.applyAsync(Function<AsyncExecutionInternal<R>, CompletableFuture<ExecutionResult<R>>> innerFn, Scheduler scheduler, FailsafeFuture<R> future) Performs an async execution by calling pre-execute else calling the supplier and doing a post-execute.RetryPolicyExecutor.applyAsync(Function<AsyncExecutionInternal<R>, CompletableFuture<ExecutionResult<R>>> innerFn, Scheduler scheduler, FailsafeFuture<R> future) TimeoutExecutor.applyAsync(Function<AsyncExecutionInternal<R>, CompletableFuture<ExecutionResult<R>>> innerFn, Scheduler scheduler, FailsafeFuture<R> future) Schedules a separate timeout call that blocks and fails withTimeoutExceededExceptionif the policy's timeout is exceeded.RetryPolicyExecutor.handleAsync(AsyncExecutionInternal<R> execution, Function<AsyncExecutionInternal<R>, CompletableFuture<ExecutionResult<R>>> innerFn, Scheduler scheduler, FailsafeFuture<R> future, CompletableFuture<ExecutionResult<R>> promise, AtomicReference<ExecutionResult<R>> previousResultRef) RetryPolicyExecutor.handleAsync(AsyncExecutionInternal<R> execution, Function<AsyncExecutionInternal<R>, CompletableFuture<ExecutionResult<R>>> innerFn, Scheduler scheduler, FailsafeFuture<R> future, CompletableFuture<ExecutionResult<R>> promise, AtomicReference<ExecutionResult<R>> previousResultRef) RetryPolicyExecutor.handleAsync(AsyncExecutionInternal<R> execution, Function<AsyncExecutionInternal<R>, CompletableFuture<ExecutionResult<R>>> innerFn, Scheduler scheduler, FailsafeFuture<R> future, CompletableFuture<ExecutionResult<R>> promise, AtomicReference<ExecutionResult<R>> previousResultRef) -
Uses of ExecutionResult in dev.failsafe.spi
Methods in dev.failsafe.spi that return ExecutionResultModifier and TypeMethodDescriptionstatic <R> ExecutionResult<R> Returns an ExecutionResult with theexceptionset,completetrue andsuccessfalse.ExecutionInternal.getResult()Returns the recorded result for an execution attempt.static <R> ExecutionResult<R> ExecutionResult.none()Returns an execution that was completed with a non-result.protected ExecutionResult<R> PolicyExecutor.onFailure(ExecutionContext<R> context, ExecutionResult<R> result) Performs post-execution handling for aresultthat is considered a failure according toPolicyExecutor.isFailure(ExecutionResult), possibly creating a new result, else returning the originalresult.PolicyExecutor.postExecute(ExecutionInternal<R> execution, ExecutionResult<R> result) Performs synchronous post-execution handling for aresult.protected ExecutionResult<R> PolicyExecutor.preExecute()Called before execution to return an alternative result or exception such as if execution is not allowed or needed.static <R> ExecutionResult<R> ExecutionResult.success(R result) Returns an ExecutionResult with theresultset,completetrue andsuccesstrue.ExecutionResult.with(long delayNanos, boolean complete, boolean success) Returns a copy of the ExecutionResult with thedelayNanos,completeandsuccessvalues.ExecutionResult.withDelay(long delayNanos) Returns a copy of the ExecutionResult with thedelayNanosvalue.ExecutionResult.withException()Returns a copy of the ExecutionResult with success value of {code false}.ExecutionResult.withNonResult()Returns a copy of the ExecutionResult with a non-result, and complete and success set to true.ExecutionResult.withNotComplete()Returns a copy of the ExecutionResult withcompleteset to false, else this if nothing has changed.ExecutionResult.withResult(R result) Returns a copy of the ExecutionResult with theresultvalue, and complete and success set to true.ExecutionResult.withSuccess()Returns a copy of the ExecutionResult with thecompleteandsuccessvalues oftrue.Methods in dev.failsafe.spi that return types with arguments of type ExecutionResultModifier and TypeMethodDescriptionPolicyExecutor.apply(Function<SyncExecutionInternal<R>, ExecutionResult<R>> innerFn, Scheduler scheduler) Performs an execution by calling pre-execute else calling the supplier and doing a post-execute.PolicyExecutor.applyAsync(Function<AsyncExecutionInternal<R>, CompletableFuture<ExecutionResult<R>>> innerFn, Scheduler scheduler, FailsafeFuture<R> future) Performs an async execution by calling pre-execute else calling the supplier and doing a post-execute.static <R> CompletableFuture<ExecutionResult<R>> ExecutionResult.nullFuture()Returns a CompletableFuture that is completed withnull.protected CompletableFuture<ExecutionResult<R>> PolicyExecutor.onFailureAsync(ExecutionContext<R> context, ExecutionResult<R> result, Scheduler scheduler, FailsafeFuture<R> future) Performs potentially asynchrononus post-execution handling for a failedresult, possibly creating a new result, else returning the originalresult.protected CompletableFuture<ExecutionResult<R>> PolicyExecutor.postExecuteAsync(AsyncExecutionInternal<R> execution, ExecutionResult<R> result, Scheduler scheduler, FailsafeFuture<R> future) Performs potentially asynchronous post-execution handling for aresult.protected CompletableFuture<ExecutionResult<R>> PolicyExecutor.preExecuteAsync(Scheduler scheduler, FailsafeFuture<R> future) Called before an async execution to return an alternative result or exception such as if execution is not allowed or needed.Methods in dev.failsafe.spi with parameters of type ExecutionResultModifier and TypeMethodDescriptionvoidFailsafeFuture.cancelDependencies(PolicyExecutor<R> cancellingPolicyExecutor, boolean mayInterrupt, ExecutionResult<R> cancelResult) Applies anycancel functionswith thecancelResultfor PolicyExecutors whose policyIndex is invalid input: '<' the policyIndex of thecancellingPolicyExecutor.booleanFailsafeFuture.completeResult(ExecutionResult<R> result) Completes the execution with theresultand calls the completion handler.protected booleanPolicyExecutor.isFailure(ExecutionResult<R> result) Returns whether theresultis a success according to the policy.protected ExecutionResult<R> PolicyExecutor.onFailure(ExecutionContext<R> context, ExecutionResult<R> result) Performs post-execution handling for aresultthat is considered a failure according toPolicyExecutor.isFailure(ExecutionResult), possibly creating a new result, else returning the originalresult.protected CompletableFuture<ExecutionResult<R>> PolicyExecutor.onFailureAsync(ExecutionContext<R> context, ExecutionResult<R> result, Scheduler scheduler, FailsafeFuture<R> future) Performs potentially asynchrononus post-execution handling for a failedresult, possibly creating a new result, else returning the originalresult.protected voidPolicyExecutor.onSuccess(ExecutionResult<R> result) Performs post-execution handling for aresultthat is considered a success according toPolicyExecutor.isFailure(ExecutionResult).PolicyExecutor.postExecute(ExecutionInternal<R> execution, ExecutionResult<R> result) Performs synchronous post-execution handling for aresult.protected CompletableFuture<ExecutionResult<R>> PolicyExecutor.postExecuteAsync(AsyncExecutionInternal<R> execution, ExecutionResult<R> result, Scheduler scheduler, FailsafeFuture<R> future) Performs potentially asynchronous post-execution handling for aresult.voidExecutionInternal.record(ExecutionResult<R> result) Records theresultif the execution has beenpre-executedand a result has not already been recorded.Method parameters in dev.failsafe.spi with type arguments of type ExecutionResultModifier and TypeMethodDescriptionPolicyExecutor.apply(Function<SyncExecutionInternal<R>, ExecutionResult<R>> innerFn, Scheduler scheduler) Performs an execution by calling pre-execute else calling the supplier and doing a post-execute.PolicyExecutor.applyAsync(Function<AsyncExecutionInternal<R>, CompletableFuture<ExecutionResult<R>>> innerFn, Scheduler scheduler, FailsafeFuture<R> future) Performs an async execution by calling pre-execute else calling the supplier and doing a post-execute.voidFailsafeFuture.setCancelFn(int policyIndex, BiConsumer<Boolean, ExecutionResult<R>> cancelFn) Sets acancelFnto be called when a PolicyExecutorcancels dependencieswith a policyIndex > the givenpolicyIndex, or when this future iscancelled.voidFailsafeFuture.setCancelFn(PolicyExecutor<R> policyExecutor, BiConsumer<Boolean, ExecutionResult<R>> cancelFn) Sets acancelFnto be called when a PolicyExecutorcancels dependencieswith a policyIndex > the policyIndex of the givenpolicyExecutor, or when this future iscancelled.Constructor parameters in dev.failsafe.spi with type arguments of type ExecutionResultModifierConstructorDescriptionFailsafeFuture(BiConsumer<ExecutionResult<R>, ExecutionContext<R>> completionHandler)