Uses of Interface
org.springframework.retry.RetryContext
Packages that use RetryContext
Package
Description
Infrastructure implementations of retry concerns.
Infrastructure implementations of retry backoff concerns.
Infrastructure implementations of retry context concerns.
Infrastructure implementations of retry interceptor concerns.
Infrastructure implementations of retry policy concerns.
Infrastructure implementations of retry support concerns.
-
Uses of RetryContext in org.springframework.retry
Methods in org.springframework.retry that return RetryContextModifier and TypeMethodDescriptionRetryContext.getParent()Accessor for the parent context if retry blocks are nested.RetryPolicy.open(RetryContext parent) Acquire resources needed for the retry operation.Methods in org.springframework.retry with parameters of type RetryContextModifier and TypeMethodDescriptionbooleanRetryPolicy.canRetry(RetryContext context) default <T,E extends Throwable>
voidRetryListener.close(RetryContext context, RetryCallback<T, E> callback, Throwable throwable) Called after the final attempt (successful or not).voidRetryPolicy.close(RetryContext context) RetryCallback.doWithRetry(RetryContext context) Execute an operation with retry semantics.default <T,E extends Throwable>
voidRetryListener.onError(RetryContext context, RetryCallback<T, E> callback, Throwable throwable) Called after every unsuccessful attempt at a retry.default <T,E extends Throwable>
voidRetryListener.onSuccess(RetryContext context, RetryCallback<T, E> callback, T result) Called after a successful attempt; allow the listener to throw a new exception to cause a retry (according to the retry policy), based on the result returned by theRetryCallback.doWithRetry(RetryContext)default <T,E extends Throwable>
booleanRetryListener.open(RetryContext context, RetryCallback<T, E> callback) Called before the first attempt in a retry.RetryPolicy.open(RetryContext parent) Acquire resources needed for the retry operation.RecoveryCallback.recover(RetryContext context) voidRetryPolicy.registerThrowable(RetryContext context, Throwable throwable) Called once per retry attempt, after the callback fails. -
Uses of RetryContext in org.springframework.retry.backoff
Methods in org.springframework.retry.backoff with parameters of type RetryContextModifier and TypeMethodDescriptionBackOffPolicy.start(RetryContext context) Start a new block of back off operations.ExponentialBackOffPolicy.start(RetryContext context) Returns a new instance ofBackOffContextwith the configured properties.ExponentialRandomBackOffPolicy.start(RetryContext context) Returns a new instance ofBackOffContext, seeded with this policies settings.StatelessBackOffPolicy.start(RetryContext status) Returns 'null'. -
Uses of RetryContext in org.springframework.retry.context
Classes in org.springframework.retry.context that implement RetryContextMethods in org.springframework.retry.context that return RetryContextConstructors in org.springframework.retry.context with parameters of type RetryContext -
Uses of RetryContext in org.springframework.retry.listener
Methods in org.springframework.retry.listener with parameters of type RetryContextModifier and TypeMethodDescription<T,E extends Throwable>
voidMethodInvocationRetryListenerSupport.close(RetryContext context, RetryCallback<T, E> callback, Throwable throwable) <T,E extends Throwable>
voidRetryListenerSupport.close(RetryContext context, RetryCallback<T, E> callback, Throwable throwable) Deprecated, for removal: This API element is subject to removal in a future version.protected <T,E extends Throwable>
voidMethodInvocationRetryListenerSupport.doClose(RetryContext context, MethodInvocationRetryCallback<T, E> callback, Throwable throwable) Called after the final attempt (successful or not).protected <T,E extends Throwable>
voidMethodInvocationRetryListenerSupport.doOnError(RetryContext context, MethodInvocationRetryCallback<T, E> callback, Throwable throwable) Called after every unsuccessful attempt at a retry.protected <T,E extends Throwable>
voidMethodInvocationRetryListenerSupport.doOnSuccess(RetryContext context, MethodInvocationRetryCallback<T, E> callback, T result) Called after a successful attempt; allow the listener to throw a new exception to cause a retry (according to the retry policy), based on the result returned by theRetryCallback.doWithRetry(RetryContext)protected <T,E extends Throwable>
booleanMethodInvocationRetryListenerSupport.doOpen(RetryContext context, MethodInvocationRetryCallback<T, E> callback) Called before the first attempt in a retry.<T,E extends Throwable>
voidMethodInvocationRetryListenerSupport.onError(RetryContext context, RetryCallback<T, E> callback, Throwable throwable) <T,E extends Throwable>
voidRetryListenerSupport.onError(RetryContext context, RetryCallback<T, E> callback, Throwable throwable) Deprecated, for removal: This API element is subject to removal in a future version.<T,E extends Throwable>
voidMethodInvocationRetryListenerSupport.onSuccess(RetryContext context, RetryCallback<T, E> callback, T result) <T,E extends Throwable>
booleanMethodInvocationRetryListenerSupport.open(RetryContext context, RetryCallback<T, E> callback) <T,E extends Throwable>
booleanRetryListenerSupport.open(RetryContext context, RetryCallback<T, E> callback) Deprecated, for removal: This API element is subject to removal in a future version. -
Uses of RetryContext in org.springframework.retry.policy
Methods in org.springframework.retry.policy that return RetryContextModifier and TypeMethodDescriptionBinaryExceptionClassifierRetryPolicy.open(RetryContext parent) CircuitBreakerRetryPolicy.open(RetryContext parent) CompositeRetryPolicy.open(RetryContext parent) Creates a new context that copies the existing policies and keeps a list of the contexts from each one.ExceptionClassifierRetryPolicy.open(RetryContext parent) Create an active context that proxies a retry policy by choosing a target from the policy map.MaxAttemptsRetryPolicy.open(RetryContext parent) Get a status object that can be used to track the current operation according to this policy.NeverRetryPolicy.open(RetryContext parent) Return a context that can respond to early termination requests, but does nothing else.PredicateRetryPolicy.open(RetryContext parent) SimpleRetryPolicy.open(RetryContext parent) Get a status object that can be used to track the current operation according to this policy.TimeoutRetryPolicy.open(RetryContext parent) Methods in org.springframework.retry.policy with parameters of type RetryContextModifier and TypeMethodDescriptionbooleanAlwaysRetryPolicy.canRetry(RetryContext context) Always returns true.booleanBinaryExceptionClassifierRetryPolicy.canRetry(RetryContext context) booleanCircuitBreakerRetryPolicy.canRetry(RetryContext context) booleanCompositeRetryPolicy.canRetry(RetryContext context) Delegate to the policies that were in operation when the context was created.booleanExceptionClassifierRetryPolicy.canRetry(RetryContext context) Delegate to the policy currently activated in the context.booleanExpressionRetryPolicy.canRetry(RetryContext context) booleanMaxAttemptsRetryPolicy.canRetry(RetryContext context) Test for retryable operation based on the status.booleanNeverRetryPolicy.canRetry(RetryContext context) Returns false after the first exception.booleanPredicateRetryPolicy.canRetry(RetryContext context) booleanSimpleRetryPolicy.canRetry(RetryContext context) Test for retryable operation based on the status.booleanTimeoutRetryPolicy.canRetry(RetryContext context) Only permits a retry if the timeout has not expired.voidBinaryExceptionClassifierRetryPolicy.close(RetryContext status) voidCircuitBreakerRetryPolicy.close(RetryContext context) voidCompositeRetryPolicy.close(RetryContext context) Delegate to the policies that were in operation when the context was created.voidExceptionClassifierRetryPolicy.close(RetryContext context) Delegate to the policy currently activated in the context.voidMaxAttemptsRetryPolicy.close(RetryContext status) voidNeverRetryPolicy.close(RetryContext context) Do nothing.voidPredicateRetryPolicy.close(RetryContext status) voidSimpleRetryPolicy.close(RetryContext status) voidTimeoutRetryPolicy.close(RetryContext context) BinaryExceptionClassifierRetryPolicy.open(RetryContext parent) CircuitBreakerRetryPolicy.open(RetryContext parent) CompositeRetryPolicy.open(RetryContext parent) Creates a new context that copies the existing policies and keeps a list of the contexts from each one.ExceptionClassifierRetryPolicy.open(RetryContext parent) Create an active context that proxies a retry policy by choosing a target from the policy map.MaxAttemptsRetryPolicy.open(RetryContext parent) Get a status object that can be used to track the current operation according to this policy.NeverRetryPolicy.open(RetryContext parent) Return a context that can respond to early termination requests, but does nothing else.PredicateRetryPolicy.open(RetryContext parent) SimpleRetryPolicy.open(RetryContext parent) Get a status object that can be used to track the current operation according to this policy.TimeoutRetryPolicy.open(RetryContext parent) voidMapRetryContextCache.put(Object key, RetryContext context) voidRetryContextCache.put(Object key, RetryContext context) voidSoftReferenceMapRetryContextCache.put(Object key, RetryContext context) voidBinaryExceptionClassifierRetryPolicy.registerThrowable(RetryContext context, Throwable throwable) voidCircuitBreakerRetryPolicy.registerThrowable(RetryContext context, Throwable throwable) voidCompositeRetryPolicy.registerThrowable(RetryContext context, Throwable throwable) Delegate to the policies that were in operation when the context was created.voidExceptionClassifierRetryPolicy.registerThrowable(RetryContext context, Throwable throwable) Delegate to the policy currently activated in the context.voidMaxAttemptsRetryPolicy.registerThrowable(RetryContext context, Throwable throwable) Update the status with another attempted retry and the latest exception.voidNeverRetryPolicy.registerThrowable(RetryContext context, Throwable throwable) Make the throwable available for downstream use through the context.voidPredicateRetryPolicy.registerThrowable(RetryContext context, Throwable throwable) voidSimpleRetryPolicy.registerThrowable(RetryContext context, Throwable throwable) Update the status with another attempted retry and the latest exception.voidTimeoutRetryPolicy.registerThrowable(RetryContext context, Throwable throwable) -
Uses of RetryContext in org.springframework.retry.stats
Methods in org.springframework.retry.stats with parameters of type RetryContextModifier and TypeMethodDescription<T,E extends Throwable>
voidStatisticsListener.close(RetryContext context, RetryCallback<T, E> callback, Throwable throwable) <T,E extends Throwable>
voidStatisticsListener.onError(RetryContext context, RetryCallback<T, E> callback, Throwable throwable) -
Uses of RetryContext in org.springframework.retry.support
Methods in org.springframework.retry.support that return RetryContextModifier and TypeMethodDescriptionstatic RetryContextRetrySynchronizationManager.clear()Clear the current context at the end of a batch - should only be used byRetryOperationsimplementations.static RetryContextRetrySynchronizationManager.getContext()Public accessor for the locally enclosingRetryContext.protected RetryContextRetryTemplate.open(RetryPolicy retryPolicy, RetryState state) Delegate to theRetryPolicyhaving checked in the cache for an existing value if the state is not null.static RetryContextRetrySynchronizationManager.register(RetryContext context) Method for registering a context - should only be used byRetryOperationsimplementations to ensure thatRetrySynchronizationManager.getContext()always returns the correct value.Methods in org.springframework.retry.support with parameters of type RetryContextModifier and TypeMethodDescriptionprotected booleanRetryTemplate.canRetry(RetryPolicy retryPolicy, RetryContext context) Decide whether to proceed with the ongoing retry attempt.<T,E extends Throwable>
voidMetricsRetryListener.close(RetryContext context, RetryCallback<T, E> callback, Throwable throwable) protected voidRetryTemplate.close(RetryPolicy retryPolicy, RetryContext context, RetryState state, boolean succeeded) Clean up the cache if necessary and close the context provided (if the flag indicates that processing was successful).protected <T> TRetryTemplate.handleRetryExhausted(RecoveryCallback<T> recoveryCallback, RetryContext context, RetryState state) Actions to take after final attempt has failed.<T,E extends Throwable>
booleanMetricsRetryListener.open(RetryContext context, RetryCallback<T, E> callback) static RetryContextRetrySynchronizationManager.register(RetryContext context) Method for registering a context - should only be used byRetryOperationsimplementations to ensure thatRetrySynchronizationManager.getContext()always returns the correct value.protected voidRetryTemplate.registerThrowable(RetryPolicy retryPolicy, RetryState state, RetryContext context, Throwable e) protected <E extends Throwable>
voidRetryTemplate.rethrow(RetryContext context, String message, boolean wrap) protected booleanRetryTemplate.shouldRethrow(RetryPolicy retryPolicy, RetryContext context, RetryState state) Extension point for subclasses to decide on behaviour after catching an exception in aRetryCallback.Method parameters in org.springframework.retry.support with type arguments of type RetryContextModifier and TypeMethodDescriptionvoidMetricsRetryListener.setCustomTagsProvider(Function<RetryContext, Iterable<io.micrometer.core.instrument.Tag>> customTagsProvider) Supply aFunctionto build additional tags for all the timers based on theRetryContext.