parent
8b9e620084
commit
d74b863ae7
|
@ -20,6 +20,9 @@ package org.springframework.core.retry;
|
||||||
* Strategy interface to define a retry execution created for a given
|
* Strategy interface to define a retry execution created for a given
|
||||||
* {@link RetryPolicy}.
|
* {@link RetryPolicy}.
|
||||||
*
|
*
|
||||||
|
* <p>A {@code RetryExecution} is effectively an executable instance of a given
|
||||||
|
* {@code RetryPolicy}.
|
||||||
|
*
|
||||||
* <p>Implementations may be stateful but do not need to be thread-safe.
|
* <p>Implementations may be stateful but do not need to be thread-safe.
|
||||||
*
|
*
|
||||||
* @author Mahmoud Ben Hassine
|
* @author Mahmoud Ben Hassine
|
||||||
|
|
|
@ -66,6 +66,7 @@ public class RetryTemplate implements RetryOperations {
|
||||||
protected RetryListener retryListener = new RetryListener() {
|
protected RetryListener retryListener = new RetryListener() {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new {@code RetryTemplate} with maximum 3 retry attempts and a
|
* Create a new {@code RetryTemplate} with maximum 3 retry attempts and a
|
||||||
* fixed backoff of 1 second.
|
* fixed backoff of 1 second.
|
||||||
|
@ -95,6 +96,7 @@ public class RetryTemplate implements RetryOperations {
|
||||||
this.backOffPolicy = backOffPolicy;
|
this.backOffPolicy = backOffPolicy;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the {@link RetryPolicy} to use.
|
* Set the {@link RetryPolicy} to use.
|
||||||
* <p>Defaults to {@code new MaxRetryAttemptsPolicy()}.
|
* <p>Defaults to {@code new MaxRetryAttemptsPolicy()}.
|
||||||
|
@ -108,7 +110,7 @@ public class RetryTemplate implements RetryOperations {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the {@link BackOff} policy to use.
|
* Set the {@link BackOff} policy to use.
|
||||||
* <p>Defaults to {@code new FixedBackOff(1000, Long.MAX_VALUE))}.
|
* <p>Defaults to {@code new FixedBackOff(Duration.ofSeconds(1))}.
|
||||||
* @param backOffPolicy the backoff policy to use
|
* @param backOffPolicy the backoff policy to use
|
||||||
* @see FixedBackOff
|
* @see FixedBackOff
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/**
|
/**
|
||||||
* Support package for the core retry functionality containing common retry policies.
|
* Support package for the core retry functionality.
|
||||||
*/
|
*/
|
||||||
@NullMarked
|
@NullMarked
|
||||||
package org.springframework.core.retry.support;
|
package org.springframework.core.retry.support;
|
||||||
|
|
Loading…
Reference in New Issue