Package org.kiwiproject.retry
Class SimpleRetryerConfig
java.lang.Object
org.kiwiproject.retry.SimpleRetryerConfig
Configuration class that can be used to configure
SimpleRetryer instances. This is
intended for usage with external configurations, e.g. a YAML configuration file, that will
be validated once instantiated. You can construct SimpleRetryer instances directly
from this instance using newRetryer().
When constructing programmatically, prefer creating directly via SimpleRetryer.builder().
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.slf4j.event.LevelintlongConstruct a new instance using the values in this configuration.voidsetCommonType(String commonType) voidsetLogLevelForSubsequentAttempts(org.slf4j.event.Level logLevelForSubsequentAttempts) voidsetMaxAttempts(int maxAttempts) voidsetRetryDelayTime(long retryDelayTime) voidsetRetryDelayUnit(TimeUnit retryDelayUnit)
-
Constructor Details
-
SimpleRetryerConfig
public SimpleRetryerConfig()
-
-
Method Details
-
newRetryer
Construct a new instance using the values in this configuration.- Returns:
- a new retryer instance
-
getMaxAttempts
public int getMaxAttempts() -
getRetryDelayTime
public long getRetryDelayTime() -
getRetryDelayUnit
-
getCommonType
-
getLogLevelForSubsequentAttempts
public org.slf4j.event.Level getLogLevelForSubsequentAttempts() -
setMaxAttempts
public void setMaxAttempts(int maxAttempts) -
setRetryDelayTime
public void setRetryDelayTime(long retryDelayTime) -
setRetryDelayUnit
-
setCommonType
-
setLogLevelForSubsequentAttempts
public void setLogLevelForSubsequentAttempts(org.slf4j.event.Level logLevelForSubsequentAttempts)
-