Uses of Interface
dev.failsafe.ExecutionContext
-
Packages that use ExecutionContext Package Description dev.failsafe APIs for performing failsafe executions.dev.failsafe.event Event listener types.dev.failsafe.function Functional interface types.dev.failsafe.internal dev.failsafe.spi The Failsafe Service Provider Interface (SPI). -
-
Uses of ExecutionContext in dev.failsafe
Subinterfaces of ExecutionContext in dev.failsafe Modifier and Type Interface Description interfaceAsyncExecution<R>Allows 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 ExecutionContext Modifier and Type Class Description (package private) classAsyncExecutionImpl<R>AsyncExecution and AsyncExecutionInternal implementation.(package private) classExecutionImpl<R>Execution and ExecutionInternal implementation.(package private) classSyncExecutionImpl<R>SyncExecution and SyncExecutionInternal implementation.Fields in dev.failsafe with type parameters of type ExecutionContext Modifier and Type Field Description (package private) java.util.function.BiConsumer<ExecutionResult<R>,ExecutionContext<R>>FailsafeExecutor. completionHandler -
Uses of ExecutionContext in dev.failsafe.event
Fields in dev.failsafe.event declared as ExecutionContext Modifier and Type Field Description private ExecutionContext<?>ExecutionEvent. contextConstructors in dev.failsafe.event with parameters of type ExecutionContext Constructor Description ExecutionAttemptedEvent(R result, java.lang.Throwable exception, ExecutionContext<R> context)ExecutionCompletedEvent(R result, java.lang.Throwable exception, ExecutionContext<R> context)ExecutionEvent(ExecutionContext<?> context)ExecutionScheduledEvent(R result, java.lang.Throwable exception, java.time.Duration delay, ExecutionContext<R> context) -
Uses of ExecutionContext in dev.failsafe.function
Methods in dev.failsafe.function with parameters of type ExecutionContext Modifier and Type Method Description TContextualSupplier. 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 ExecutionContext Modifier and Type Method Description private longRetryPolicyExecutor. adjustForBackoff(ExecutionContext<R> context, long delayNanos)protected RFallbackImpl. apply(R result, java.lang.Throwable exception, ExecutionContext<R> context)Returns the applied fallback result.protected java.util.concurrent.CompletableFuture<R>FallbackImpl. applyStage(R result, java.lang.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)ExecutionResult<R>RetryPolicyExecutor. onFailure(ExecutionContext<R> context, ExecutionResult<R> result)java.util.concurrent.CompletableFuture<ExecutionResult<R>>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.spi Modifier and Type Interface Description interfaceAsyncExecutionInternal<R>Internal async execution APIs.interfaceExecutionInternal<R>Internal execution APIs.interfaceSyncExecutionInternal<R>Internal execution APIs.Fields in dev.failsafe.spi with type parameters of type ExecutionContext Modifier and Type Field Description private java.util.function.BiConsumer<ExecutionResult<R>,ExecutionContext<R>>FailsafeFuture. completionHandlerMethods in dev.failsafe.spi with parameters of type ExecutionContext Modifier and Type Method Description default java.time.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 java.util.concurrent.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 ExecutionContext Constructor Description FailsafeFuture(java.util.function.BiConsumer<ExecutionResult<R>,ExecutionContext<R>> completionHandler)
-