Uses of Interface
dev.failsafe.ExecutionContext
Packages that use ExecutionContext
Package
Description
APIs for performing failsafe executions.
Event listener types.
Functional interface types.
The Failsafe Service Provider Interface (SPI).
-
Uses of ExecutionContext in dev.failsafe
Subinterfaces of ExecutionContext in dev.failsafeModifier and TypeInterfaceDescriptioninterfaceAllows asynchronous executions to record their results or complete an execution.interfaceExecution<R>Tracks synchronous executions and handles failures according to one or morepolicies.Classes in dev.failsafe that implement ExecutionContextModifier and TypeClassDescription(package private) final classAsyncExecution and AsyncExecutionInternal implementation.(package private) classExecution and ExecutionInternal implementation.(package private) final classSyncExecution and SyncExecutionInternal implementation.Fields in dev.failsafe with type parameters of type ExecutionContextModifier and TypeFieldDescription(package private) final BiConsumer<ExecutionResult<R>, ExecutionContext<R>> FailsafeExecutor.completionHandler -
Uses of ExecutionContext in dev.failsafe.event
Fields in dev.failsafe.event declared as ExecutionContextConstructors in dev.failsafe.event with parameters of type ExecutionContextModifierConstructorDescriptionExecutionAttemptedEvent(R result, Throwable exception, ExecutionContext<R> context) ExecutionCompletedEvent(R result, Throwable exception, ExecutionContext<R> context) (package private)ExecutionEvent(ExecutionContext<?> context) ExecutionScheduledEvent(R result, Throwable exception, Duration delay, ExecutionContext<R> context) -
Uses of ExecutionContext in dev.failsafe.function
Methods in dev.failsafe.function with parameters of type ExecutionContextModifier and TypeMethodDescriptionContextualSupplier.get(ExecutionContext<R> context) voidContextualRunnable.run(ExecutionContext<R> context) -
Uses of ExecutionContext in dev.failsafe.internal
Methods in dev.failsafe.internal with parameters of type ExecutionContextModifier and TypeMethodDescriptionprivate longRetryPolicyExecutor.adjustForBackoff(ExecutionContext<R> context, long delayNanos) protected RFallbackImpl.apply(R result, Throwable exception, ExecutionContext<R> context) Returns the applied fallback result.protected CompletableFuture<R> FallbackImpl.applyStage(R result, Throwable exception, ExecutionContext<R> context) Returns a future applied fallback result.(package private) voidCircuitState.checkThreshold(ExecutionContext<R> context) (package private) voidClosedState.checkThreshold(ExecutionContext<R> context) Checks to see if the executions and failure thresholds have been exceeded, opening the circuit if so.(package private) voidHalfOpenState.checkThreshold(ExecutionContext<R> context) Checks to determine if a threshold has been met and the circuit should be opened or closed.voidEventHandler.handle(ExecutionResult<R> result, ExecutionContext<R> context) 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.protected voidCircuitBreakerImpl.open(ExecutionContext<R> context) Opens the circuit breaker and considers thecontextwhen computing the delay before the circuit breaker will transition to half open.protected voidCircuitBreakerImpl.recordExecutionFailure(ExecutionContext<R> context) Records an execution failure.voidCircuitState.recordFailure(ExecutionContext<R> context) protected voidCircuitBreakerImpl.transitionTo(CircuitBreaker.State newState, EventListener<CircuitBreakerStateChangedEvent> listener, ExecutionContext<R> context) Transitions to thenewStateif not already in that state and calls any associated event listener. -
Uses of ExecutionContext in dev.failsafe.spi
Subinterfaces of ExecutionContext in dev.failsafe.spiModifier and TypeInterfaceDescriptioninterfaceInternal async execution APIs.interfaceInternal execution APIs.interfaceInternal execution APIs.Fields in dev.failsafe.spi with type parameters of type ExecutionContextModifier and TypeFieldDescriptionprivate final BiConsumer<ExecutionResult<R>, ExecutionContext<R>> FailsafeFuture.completionHandlerMethods in dev.failsafe.spi with parameters of type ExecutionContextModifier and TypeMethodDescriptiondefault DurationDelayablePolicy.computeDelay(ExecutionContext<R> context) Returns a computed delay for theresultandcontextelsenullif no delay function is configured or the computed delay is invalid.private voidPolicyExecutor.handleFailure(ExecutionResult<R> result, ExecutionContext<R> context) private voidPolicyExecutor.handleSuccess(ExecutionResult<R> result, ExecutionContext<R> context) 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.Constructor parameters in dev.failsafe.spi with type arguments of type ExecutionContextModifierConstructorDescriptionFailsafeFuture(BiConsumer<ExecutionResult<R>, ExecutionContext<R>> completionHandler)