Class SimpleRetryerConfig

java.lang.Object
org.kiwiproject.retry.SimpleRetryerConfig

public class SimpleRetryerConfig extends Object
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 Details

    • SimpleRetryerConfig

      public SimpleRetryerConfig()
  • Method Details

    • newRetryer

      public SimpleRetryer 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

      public TimeUnit getRetryDelayUnit()
    • getCommonType

      public String getCommonType()
    • getLogLevelForSubsequentAttempts

      public org.slf4j.event.Level getLogLevelForSubsequentAttempts()
    • setMaxAttempts

      public void setMaxAttempts(int maxAttempts)
    • setRetryDelayTime

      public void setRetryDelayTime(long retryDelayTime)
    • setRetryDelayUnit

      public void setRetryDelayUnit(TimeUnit retryDelayUnit)
    • setCommonType

      public void setCommonType(String commonType)
    • setLogLevelForSubsequentAttempts

      public void setLogLevelForSubsequentAttempts(org.slf4j.event.Level logLevelForSubsequentAttempts)