Package dev.failsafe
Interface RetryPolicy<R>
- Type Parameters:
R
- result type
- All Superinterfaces:
Policy<R>
- All Known Implementing Classes:
RetryPolicyImpl
A policy that defines when retries should be performed. See
RetryPolicyBuilder
for configuration options.
This class is threadsafe.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic <R> RetryPolicyBuilder
<R> builder()
Creates a RetryPolicyBuilder that by default will build a RetryPolicy that allows 3 execution attempts max with no delay, unless configured otherwise.static <R> RetryPolicyBuilder
<R> builder
(RetryPolicyConfig<R> config) Creates a new RetryPolicyBuilder that will be based on theconfig
.Returns theRetryPolicyConfig
that the RetryPolicy was built with.static <R> RetryPolicy
<R> Creates a RetryPolicy that allows 3 execution attempts max with no delay.Methods inherited from interface dev.failsafe.Policy
toExecutor
-
Method Details
-
builder
Creates a RetryPolicyBuilder that by default will build a RetryPolicy that allows 3 execution attempts max with no delay, unless configured otherwise.- See Also:
-
builder
Creates a new RetryPolicyBuilder that will be based on theconfig
. -
ofDefaults
Creates a RetryPolicy that allows 3 execution attempts max with no delay. To configure additional options on a RetryPolicy, usebuilder()
instead.- See Also:
-
getConfig
RetryPolicyConfig<R> getConfig()Returns theRetryPolicyConfig
that the RetryPolicy was built with.
-