Package org.kiwiproject.retry
Class SimpleRetryer.SimpleRetryerBuilder
java.lang.Object
org.kiwiproject.retry.SimpleRetryer.SimpleRetryerBuilder
- Enclosing class:
- SimpleRetryer
-
Method Summary
Modifier and TypeMethodDescriptionbuild()commonType(String commonType) The common type/description to include in log messages for each attempt.environment(KiwiEnvironment environment) TheKiwiEnvironmentto use when sleeping between retry attempts.logLevelForSubsequentAttempts(org.slf4j.event.Level logLevelForSubsequentAttempts) The SLF4J log level to use when logging retry attempts.maxAttempts(int maxAttempts) The maximum number of attempts before giving up.retryDelayTime(long retryDelayTime) The time to sleep between retry attempts.retryDelayUnit(TimeUnit retryDelayUnit) The time unit for the time to sleep between retry attempts.toString()
-
Method Details
-
environment
TheKiwiEnvironmentto use when sleeping between retry attempts.- Returns:
this.
-
maxAttempts
The maximum number of attempts before giving up.- Returns:
this.
-
retryDelayTime
The time to sleep between retry attempts.- Returns:
this.
-
retryDelayUnit
The time unit for the time to sleep between retry attempts.- Returns:
this.
-
commonType
The common type/description to include in log messages for each attempt.- Returns:
this.
-
logLevelForSubsequentAttempts
public SimpleRetryer.SimpleRetryerBuilder logLevelForSubsequentAttempts(org.slf4j.event.Level logLevelForSubsequentAttempts) The SLF4J log level to use when logging retry attempts. The first attempt is always logged at TRACE level.- Returns:
this.
-
build
-
toString
-