Package ratpack.exec.util.retry
Interface AttemptRetryPolicyBuilder
-
public interface AttemptRetryPolicyBuilder
Builds anAttemptRetryPolicy
.- Since:
- 1.7
- See Also:
AttemptRetryPolicy.of(Action)
-
-
Field Summary
Fields Modifier and Type Field Description static Delay
DEFAULT_DELAY
By default, retries will wait 1 second between executions.static int
DEFAULT_MAX_ATTEMPTS
By 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 AttemptRetryPolicy
build()
Builds anAttemptRetryPolicy
.AttemptRetryPolicyBuilder
delay(Delay delay)
The delay strategy.AttemptRetryPolicyBuilder
maxAttempts(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
-
-