Package dev.failsafe
Interface RetryPolicy<R>
-
- Type Parameters:
R- result type
- All Superinterfaces:
Policy<R>
- All Known Implementing Classes:
RetryPolicyImpl
public interface RetryPolicy<R> extends Policy<R>
A policy that defines when retries should be performed. SeeRetryPolicyBuilderfor configuration options.This class is threadsafe.
- See Also:
RetryPolicyConfig,RetryPolicyBuilder
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static <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.RetryPolicyConfig<R>getConfig()Returns theRetryPolicyConfigthat the RetryPolicy was built with.static <R> RetryPolicy<R>ofDefaults()Creates a RetryPolicy that allows 3 execution attempts max with no delay.-
Methods inherited from interface dev.failsafe.Policy
toExecutor
-
-
-
-
Method Detail
-
builder
static <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.- See Also:
ofDefaults()
-
builder
static <R> RetryPolicyBuilder<R> builder(RetryPolicyConfig<R> config)
Creates a new RetryPolicyBuilder that will be based on theconfig.
-
ofDefaults
static <R> RetryPolicy<R> ofDefaults()
Creates a RetryPolicy that allows 3 execution attempts max with no delay. To configure additional options on a RetryPolicy, usebuilder()instead.- See Also:
builder()
-
getConfig
RetryPolicyConfig<R> getConfig()
Returns theRetryPolicyConfigthat the RetryPolicy was built with.
-
-