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 TypeInterfaceDescriptioninterface
Allows asynchronous executions to record their results or complete an execution.interface
Execution<R>
Tracks synchronous executions and handles failures according to one or morepolicies
.Classes in dev.failsafe that implement ExecutionContextModifier and TypeClassDescription(package private) final class
AsyncExecution and AsyncExecutionInternal implementation.(package private) class
Execution and ExecutionInternal implementation.(package private) final class
SyncExecution 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) void
ContextualRunnable.run
(ExecutionContext<R> context) -
Uses of ExecutionContext in dev.failsafe.internal
Methods in dev.failsafe.internal with parameters of type ExecutionContextModifier and TypeMethodDescriptionprivate long
RetryPolicyExecutor.adjustForBackoff
(ExecutionContext<R> context, long delayNanos) protected R
FallbackImpl.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) void
CircuitState.checkThreshold
(ExecutionContext<R> context) (package private) void
ClosedState.checkThreshold
(ExecutionContext<R> context) Checks to see if the executions and failure thresholds have been exceeded, opening the circuit if so.(package private) void
HalfOpenState.checkThreshold
(ExecutionContext<R> context) Checks to determine if a threshold has been met and the circuit should be opened or closed.void
EventHandler.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 void
CircuitBreakerImpl.open
(ExecutionContext<R> context) Opens the circuit breaker and considers thecontext
when computing the delay before the circuit breaker will transition to half open.protected void
CircuitBreakerImpl.recordExecutionFailure
(ExecutionContext<R> context) Records an execution failure.void
CircuitState.recordFailure
(ExecutionContext<R> context) protected void
CircuitBreakerImpl.transitionTo
(CircuitBreaker.State newState, EventListener<CircuitBreakerStateChangedEvent> listener, ExecutionContext<R> context) Transitions to thenewState
if 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 TypeInterfaceDescriptioninterface
Internal async execution APIs.interface
Internal execution APIs.interface
Internal execution APIs.Fields in dev.failsafe.spi with type parameters of type ExecutionContextModifier and TypeFieldDescriptionprivate final BiConsumer
<ExecutionResult<R>, ExecutionContext<R>> FailsafeFuture.completionHandler
Methods in dev.failsafe.spi with parameters of type ExecutionContextModifier and TypeMethodDescriptiondefault Duration
DelayablePolicy.computeDelay
(ExecutionContext<R> context) Returns a computed delay for theresult
andcontext
elsenull
if no delay function is configured or the computed delay is invalid.private void
PolicyExecutor.handleFailure
(ExecutionResult<R> result, ExecutionContext<R> context) private void
PolicyExecutor.handleSuccess
(ExecutionResult<R> result, ExecutionContext<R> context) protected ExecutionResult
<R> PolicyExecutor.onFailure
(ExecutionContext<R> context, ExecutionResult<R> result) Performs post-execution handling for aresult
that 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)