Uses of Interface
dev.failsafe.event.EventListener
-
Packages that use EventListener Package Description dev.failsafe APIs for performing failsafe executions.dev.failsafe.internal -
-
Uses of EventListener in dev.failsafe
Methods in dev.failsafe that return EventListener Modifier and Type Method Description EventListener<ExecutionCompletedEvent<R>>
RetryPolicyConfig. getAbortListener()
Returns the abort event listener.EventListener<CircuitBreakerStateChangedEvent>
CircuitBreakerConfig. getCloseListener()
Returns the close event listener.EventListener<ExecutionAttemptedEvent<R>>
FallbackConfig. getFailedAttemptListener()
Returns the failed attempt event listener.EventListener<ExecutionAttemptedEvent<R>>
RetryPolicyConfig. getFailedAttemptListener()
Returns the failed attempt event listener.EventListener<ExecutionCompletedEvent<R>>
PolicyConfig. getFailureListener()
Returns the failure listener.EventListener<CircuitBreakerStateChangedEvent>
CircuitBreakerConfig. getHalfOpenListener()
Returns the half-open event listener.EventListener<CircuitBreakerStateChangedEvent>
CircuitBreakerConfig. getOpenListener()
Returns the open event listener.EventListener<ExecutionCompletedEvent<R>>
RetryPolicyConfig. getRetriesExceededListener()
Returns the retries exceeded event listener.EventListener<ExecutionAttemptedEvent<R>>
RetryPolicyConfig. getRetryListener()
Returns the retry event listener.EventListener<ExecutionScheduledEvent<R>>
RetryPolicyConfig. getRetryScheduledListener()
Returns the retry scheduled event listener.EventListener<ExecutionCompletedEvent<R>>
PolicyConfig. getSuccessListener()
Returns the success listener.Methods in dev.failsafe with parameters of type EventListener Modifier and Type Method Description RetryPolicyBuilder<R>
RetryPolicyBuilder. onAbort(EventListener<ExecutionCompletedEvent<R>> listener)
Registers thelistener
to be called when an execution is aborted.CircuitBreakerBuilder<R>
CircuitBreakerBuilder. onClose(EventListener<CircuitBreakerStateChangedEvent> listener)
Calls thelistener
when the circuit is closed.FailsafeExecutor<R>
FailsafeExecutor. onComplete(EventListener<ExecutionCompletedEvent<R>> listener)
Registers thelistener
to be called when an execution is complete.FallbackBuilder<R>
FallbackBuilder. onFailedAttempt(EventListener<ExecutionAttemptedEvent<R>> listener)
Registers thelistener
to be called when the last execution attempt prior to the fallback failed.RetryPolicyBuilder<R>
RetryPolicyBuilder. onFailedAttempt(EventListener<ExecutionAttemptedEvent<R>> listener)
Registers thelistener
to be called when an execution attempt fails.FailsafeExecutor<R>
FailsafeExecutor. onFailure(EventListener<ExecutionCompletedEvent<R>> listener)
Registers thelistener
to be called when an execution fails.S
PolicyBuilder. onFailure(EventListener<ExecutionCompletedEvent<R>> listener)
S
PolicyListeners. onFailure(EventListener<ExecutionCompletedEvent<R>> listener)
Registers thelistener
to be called when the policy fails to handle an execution.CircuitBreakerBuilder<R>
CircuitBreakerBuilder. onHalfOpen(EventListener<CircuitBreakerStateChangedEvent> listener)
Calls thelistener
when the circuit is half-opened.CircuitBreakerBuilder<R>
CircuitBreakerBuilder. onOpen(EventListener<CircuitBreakerStateChangedEvent> listener)
Calls thelistener
when the circuit is opened.RetryPolicyBuilder<R>
RetryPolicyBuilder. onRetriesExceeded(EventListener<ExecutionCompletedEvent<R>> listener)
Registers thelistener
to be called when an execution fails and themax retry attempts
ormax duration
are exceeded.RetryPolicyBuilder<R>
RetryPolicyBuilder. onRetry(EventListener<ExecutionAttemptedEvent<R>> listener)
Registers thelistener
to be called when a retry is about to be attempted.RetryPolicyBuilder<R>
RetryPolicyBuilder. onRetryScheduled(EventListener<ExecutionScheduledEvent<R>> listener)
Registers thelistener
to be called when a retry for an async call is about to be scheduled.FailsafeExecutor<R>
FailsafeExecutor. onSuccess(EventListener<ExecutionCompletedEvent<R>> listener)
Registers thelistener
to be called when an execution is successful.S
PolicyBuilder. onSuccess(EventListener<ExecutionCompletedEvent<R>> listener)
S
PolicyListeners. onSuccess(EventListener<ExecutionCompletedEvent<R>> listener)
Registers thelistener
to be called when the policy succeeds in handling an execution. -
Uses of EventListener in dev.failsafe.internal
Methods in dev.failsafe.internal with parameters of type EventListener Modifier and Type Method Description static <R> EventHandler<R>
EventHandler. ofExecutionAttempted(EventListener<ExecutionAttemptedEvent<R>> handler)
static <R> EventHandler<R>
EventHandler. ofExecutionCompleted(EventListener<ExecutionCompletedEvent<R>> handler)
static <R> EventHandler<R>
EventHandler. ofExecutionScheduled(EventListener<ExecutionScheduledEvent<R>> handler)
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.
-