Class RetryConfig

All Implemented Interfaces:
Serializable

public class RetryConfig extends BasicConfig
Retry scheduler configuration.

This class provides type-safe access to retry backoff configuration settings used by the RetryScheduler for determining wait times between message relay attempts.

See Also:
  • Field Details

    • DEFAULT_TOTAL_RETRIES

      public static final int DEFAULT_TOTAL_RETRIES
      Default total number of retries.
      See Also:
    • DEFAULT_FIRST_WAIT_MINUTES

      public static final int DEFAULT_FIRST_WAIT_MINUTES
      Default initial wait time in minutes.
      See Also:
    • DEFAULT_GROWTH_FACTOR

      public static final double DEFAULT_GROWTH_FACTOR
      Default growth factor for geometric progression.
      See Also:
  • Constructor Details

    • RetryConfig

      public RetryConfig(Map map)
      Constructs a new RetryConfig instance with given map.
      Parameters:
      map - Configuration map.
  • Method Details

    • getTotalRetries

      public int getTotalRetries()
      Gets the total number of retries before giving up.
      Returns:
      Total retries.
    • getFirstWaitMinutes

      public int getFirstWaitMinutes()
      Gets the initial wait time in minutes for the first retry.
      Returns:
      First wait time in minutes.
    • getGrowthFactor

      public double getGrowthFactor()
      Gets the growth factor for geometric progression backoff.

      Each retry wait time is calculated as: wait_time = firstWaitMinutes * (growthFactor ^ retryCount)

      Returns:
      Growth factor.