Package | Description |
---|---|
org.springframework.retry |
Infrastructure implementations of retry concerns.
|
org.springframework.retry.backoff |
Infrastructure implementations of retry backoff concerns.
|
org.springframework.retry.context |
Infrastructure implementations of retry context concerns.
|
org.springframework.retry.listener |
Infrastructure implementations of retry interceptor concerns.
|
org.springframework.retry.policy |
Infrastructure implementations of retry policy concerns.
|
org.springframework.retry.stats | |
org.springframework.retry.support |
Infrastructure implementations of retry support concerns.
|
Modifier and Type | Method and Description |
---|---|
RetryContext |
RetryContext.getParent()
Accessor for the parent context if retry blocks are nested.
|
RetryContext |
RetryPolicy.open(RetryContext parent)
Acquire resources needed for the retry operation.
|
Modifier and Type | Method and Description |
---|---|
boolean |
RetryPolicy.canRetry(RetryContext context) |
void |
RetryPolicy.close(RetryContext context) |
<T,E extends Throwable> |
RetryListener.close(RetryContext context,
RetryCallback<T,E> callback,
Throwable throwable)
Called after the final attempt (successful or not).
|
T |
RetryCallback.doWithRetry(RetryContext context)
Execute an operation with retry semantics.
|
<T,E extends Throwable> |
RetryListener.onError(RetryContext context,
RetryCallback<T,E> callback,
Throwable throwable)
Called after every unsuccessful attempt at a retry.
|
RetryContext |
RetryPolicy.open(RetryContext parent)
Acquire resources needed for the retry operation.
|
<T,E extends Throwable> |
RetryListener.open(RetryContext context,
RetryCallback<T,E> callback)
Called before the first attempt in a retry.
|
T |
RecoveryCallback.recover(RetryContext context) |
void |
RetryPolicy.registerThrowable(RetryContext context,
Throwable throwable)
Called once per retry attempt, after the callback fails.
|
Modifier and Type | Method and Description |
---|---|
BackOffContext |
StatelessBackOffPolicy.start(RetryContext status)
Returns '
null '. |
BackOffContext |
ExponentialRandomBackOffPolicy.start(RetryContext context)
Returns a new instance of
BackOffContext ,
seeded with this policies settings. |
BackOffContext |
ExponentialBackOffPolicy.start(RetryContext context)
Returns a new instance of
BackOffContext configured with the 'expSeed' and
'increment' values. |
BackOffContext |
BackOffPolicy.start(RetryContext context)
Start a new block of back off operations.
|
Modifier and Type | Class and Description |
---|---|
class |
RetryContextSupport |
Modifier and Type | Method and Description |
---|---|
RetryContext |
RetryContextSupport.getParent() |
Constructor and Description |
---|
RetryContextSupport(RetryContext parent) |
Modifier and Type | Method and Description |
---|---|
<T,E extends Throwable> |
RetryListenerSupport.close(RetryContext context,
RetryCallback<T,E> callback,
Throwable throwable) |
<T,E extends Throwable> |
RetryListenerSupport.onError(RetryContext context,
RetryCallback<T,E> callback,
Throwable throwable) |
<T,E extends Throwable> |
RetryListenerSupport.open(RetryContext context,
RetryCallback<T,E> callback) |
Modifier and Type | Method and Description |
---|---|
RetryContext |
SoftReferenceMapRetryContextCache.get(Object key) |
RetryContext |
MapRetryContextCache.get(Object key) |
RetryContext |
RetryContextCache.get(Object key) |
RetryContext |
TimeoutRetryPolicy.open(RetryContext parent) |
RetryContext |
CircuitBreakerRetryPolicy.open(RetryContext parent) |
RetryContext |
NeverRetryPolicy.open(RetryContext parent)
Return a context that can respond to early termination requests, but does
nothing else.
|
RetryContext |
ExceptionClassifierRetryPolicy.open(RetryContext parent)
Create an active context that proxies a retry policy by choosing a target
from the policy map.
|
RetryContext |
SimpleRetryPolicy.open(RetryContext parent)
Get a status object that can be used to track the current operation
according to this policy.
|
RetryContext |
CompositeRetryPolicy.open(RetryContext parent)
Creates a new context that copies the existing policies and keeps a list
of the contexts from each one.
|
Modifier and Type | Method and Description |
---|---|
boolean |
TimeoutRetryPolicy.canRetry(RetryContext context)
Only permits a retry if the timeout has not expired.
|
boolean |
AlwaysRetryPolicy.canRetry(RetryContext context)
Always returns true.
|
boolean |
CircuitBreakerRetryPolicy.canRetry(RetryContext context) |
boolean |
NeverRetryPolicy.canRetry(RetryContext context)
Returns false after the first exception.
|
boolean |
ExceptionClassifierRetryPolicy.canRetry(RetryContext context)
Delegate to the policy currently activated in the context.
|
boolean |
SimpleRetryPolicy.canRetry(RetryContext context)
Test for retryable operation based on the status.
|
boolean |
CompositeRetryPolicy.canRetry(RetryContext context)
Delegate to the policies that were in operation when the context was
created.
|
boolean |
ExpressionRetryPolicy.canRetry(RetryContext context) |
void |
TimeoutRetryPolicy.close(RetryContext context) |
void |
CircuitBreakerRetryPolicy.close(RetryContext context) |
void |
NeverRetryPolicy.close(RetryContext context)
Do nothing.
|
void |
ExceptionClassifierRetryPolicy.close(RetryContext context)
Delegate to the policy currently activated in the context.
|
void |
SimpleRetryPolicy.close(RetryContext status) |
void |
CompositeRetryPolicy.close(RetryContext context)
Delegate to the policies that were in operation when the context was
created.
|
RetryContext |
TimeoutRetryPolicy.open(RetryContext parent) |
RetryContext |
CircuitBreakerRetryPolicy.open(RetryContext parent) |
RetryContext |
NeverRetryPolicy.open(RetryContext parent)
Return a context that can respond to early termination requests, but does
nothing else.
|
RetryContext |
ExceptionClassifierRetryPolicy.open(RetryContext parent)
Create an active context that proxies a retry policy by choosing a target
from the policy map.
|
RetryContext |
SimpleRetryPolicy.open(RetryContext parent)
Get a status object that can be used to track the current operation
according to this policy.
|
RetryContext |
CompositeRetryPolicy.open(RetryContext parent)
Creates a new context that copies the existing policies and keeps a list
of the contexts from each one.
|
void |
SoftReferenceMapRetryContextCache.put(Object key,
RetryContext context) |
void |
MapRetryContextCache.put(Object key,
RetryContext context) |
void |
RetryContextCache.put(Object key,
RetryContext context) |
void |
TimeoutRetryPolicy.registerThrowable(RetryContext context,
Throwable throwable) |
void |
CircuitBreakerRetryPolicy.registerThrowable(RetryContext context,
Throwable throwable) |
void |
NeverRetryPolicy.registerThrowable(RetryContext context,
Throwable throwable)
Make the throwable available for downstream use through the context.
|
void |
ExceptionClassifierRetryPolicy.registerThrowable(RetryContext context,
Throwable throwable)
Delegate to the policy currently activated in the context.
|
void |
SimpleRetryPolicy.registerThrowable(RetryContext context,
Throwable throwable)
Update the status with another attempted retry and the latest exception.
|
void |
CompositeRetryPolicy.registerThrowable(RetryContext context,
Throwable throwable)
Delegate to the policies that were in operation when the context was
created.
|
Modifier and Type | Method and Description |
---|---|
<T,E extends Throwable> |
StatisticsListener.close(RetryContext context,
RetryCallback<T,E> callback,
Throwable throwable) |
<T,E extends Throwable> |
StatisticsListener.onError(RetryContext context,
RetryCallback<T,E> callback,
Throwable throwable) |
Modifier and Type | Method and Description |
---|---|
static RetryContext |
RetrySynchronizationManager.clear()
Clear the current context at the end of a batch - should only be used by
RetryOperations implementations. |
static RetryContext |
RetrySynchronizationManager.getContext()
Public accessor for the locally enclosing
RetryContext . |
protected RetryContext |
RetryTemplate.open(RetryPolicy retryPolicy,
RetryState state)
Delegate to the
RetryPolicy having checked in the cache for an existing
value if the state is not null. |
static RetryContext |
RetrySynchronizationManager.register(RetryContext context)
Method for registering a context - should only be used by
RetryOperations implementations to ensure that
RetrySynchronizationManager.getContext() always returns the correct value. |
Modifier and Type | Method and Description |
---|---|
protected boolean |
RetryTemplate.canRetry(RetryPolicy retryPolicy,
RetryContext context)
Decide whether to proceed with the ongoing retry attempt.
|
protected void |
RetryTemplate.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> T |
RetryTemplate.handleRetryExhausted(RecoveryCallback<T> recoveryCallback,
RetryContext context,
RetryState state)
Actions to take after final attempt has failed.
|
static RetryContext |
RetrySynchronizationManager.register(RetryContext context)
Method for registering a context - should only be used by
RetryOperations implementations to ensure that
RetrySynchronizationManager.getContext() always returns the correct value. |
protected void |
RetryTemplate.registerThrowable(RetryPolicy retryPolicy,
RetryState state,
RetryContext context,
Throwable e) |
protected <E extends Throwable> |
RetryTemplate.rethrow(RetryContext context,
String message) |
protected boolean |
RetryTemplate.shouldRethrow(RetryPolicy retryPolicy,
RetryContext context,
RetryState state)
Extension point for subclasses to decide on behaviour after catching an exception
in a
RetryCallback . |
Copyright © 2018 SpringSource. All rights reserved.