Package ratpack.exec.util.retry
Interface AttemptRetryPolicyBuilder
-
public interface AttemptRetryPolicyBuilderBuilds anAttemptRetryPolicy.- Since:
- 1.7
- See Also:
AttemptRetryPolicy.of(ratpack.func.Action)
-
-
Field Summary
Fields Modifier and Type Field Description static DelayDEFAULT_DELAYBy default, retries will wait 1 second between executions.static intDEFAULT_MAX_ATTEMPTSBy default, this retry policy will give up after the fifth retry attempt.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AttemptRetryPolicybuild()Builds anAttemptRetryPolicy.AttemptRetryPolicyBuilderdelay(Delay delay)The delay strategy.AttemptRetryPolicyBuildermaxAttempts(int maxAttempts)Maximum number of allowed retry attempts.
-
-
-
Field Detail
-
DEFAULT_DELAY
static final Delay DEFAULT_DELAY
By default, retries will wait 1 second between executions.
-
DEFAULT_MAX_ATTEMPTS
static final int DEFAULT_MAX_ATTEMPTS
By default, this retry policy will give up after the fifth retry attempt.- See Also:
- Constant Field Values
-
-
Method Detail
-
build
AttemptRetryPolicy build()
Builds anAttemptRetryPolicy.- Returns:
- a retry policy
-
delay
AttemptRetryPolicyBuilder delay(Delay delay)
The delay strategy.- Parameters:
delay- the delay strategy- Returns:
- this
-
maxAttempts
AttemptRetryPolicyBuilder maxAttempts(int maxAttempts)
Maximum number of allowed retry attempts.- Parameters:
maxAttempts- maximum number of allowed retry attempts- Returns:
- this
-
-