| Package | Description |
|---|---|
| org.springframework.retry.support |
Infrastructure implementations of retry support concerns.
|
| Modifier and Type | Method and Description |
|---|---|
static RetryTemplateBuilder |
RetryTemplate.builder()
Main entry point to configure RetryTemplate using fluent API.
|
RetryTemplateBuilder |
RetryTemplateBuilder.customBackoff(BackOffPolicy backOffPolicy)
You can provide your own
BackOffPolicy via this method. |
RetryTemplateBuilder |
RetryTemplateBuilder.customPolicy(RetryPolicy policy)
If flexibility of this builder is not enough for you, you can provide your own
RetryPolicy via this method. |
RetryTemplateBuilder |
RetryTemplateBuilder.exponentialBackoff(long initialInterval,
double multiplier,
long maxInterval)
Use exponential backoff policy.
|
RetryTemplateBuilder |
RetryTemplateBuilder.exponentialBackoff(long initialInterval,
double multiplier,
long maxInterval,
boolean withRandom)
Use exponential backoff policy.
|
RetryTemplateBuilder |
RetryTemplateBuilder.fixedBackoff(long interval)
Perform each retry after fixed amount of time.
|
RetryTemplateBuilder |
RetryTemplateBuilder.infiniteRetry()
Allows infinite retry, do not limit attempts by number or time.
|
RetryTemplateBuilder |
RetryTemplateBuilder.maxAttempts(int maxAttempts)
Limits maximum number of attempts to provided value.
|
RetryTemplateBuilder |
RetryTemplateBuilder.noBackoff()
Do not pause between attempts, retry immediately.
|
RetryTemplateBuilder |
RetryTemplateBuilder.notRetryOn(Class<? extends Throwable> throwable)
Add a throwable to the black list of retryable exceptions.
|
RetryTemplateBuilder |
RetryTemplateBuilder.notRetryOn(List<Class<? extends Throwable>> throwables)
Add all throwables to the black list of retryable exceptions.
|
RetryTemplateBuilder |
RetryTemplateBuilder.retryOn(Class<? extends Throwable> throwable)
Add a throwable to the while list of retryable exceptions.
|
RetryTemplateBuilder |
RetryTemplateBuilder.retryOn(List<Class<? extends Throwable>> throwables)
Add all throwables to the while list of retryable exceptions.
|
RetryTemplateBuilder |
RetryTemplateBuilder.traversingCauses()
Suppose throwing a
new MyLogicException(new IOException()). |
RetryTemplateBuilder |
RetryTemplateBuilder.uniformRandomBackoff(long minInterval,
long maxInterval)
Use
UniformRandomBackOffPolicy, see it's doc for details. |
RetryTemplateBuilder |
RetryTemplateBuilder.withinMillis(long timeout)
Allows retry if there is no more than
timeout millis since first attempt. |
RetryTemplateBuilder |
RetryTemplateBuilder.withListener(RetryListener listener)
Appends provided
listener to RetryTemplate's listener list. |
RetryTemplateBuilder |
RetryTemplateBuilder.withListeners(List<RetryListener> listeners)
Appends all provided
listeners to RetryTemplate's listener list. |
Copyright © 2022 SpringSource. All rights reserved.