Class ExponentialBackoffRetryOptions


  • public class ExponentialBackoffRetryOptions
    extends java.lang.Object
    Configuration options for the exponential backoff retry strategy for http requests
    • Constructor Detail

      • ExponentialBackoffRetryOptions

        public ExponentialBackoffRetryOptions()
        Default constructor
    • Method Detail

      • withEventLoopGroup

        public ExponentialBackoffRetryOptions withEventLoopGroup​(EventLoopGroup eventLoopGroup)
        Configure the event loop group to use to schedule the backoff/retry tasks
        Parameters:
        eventLoopGroup - event loop group to use
        Returns:
        this options object
      • getEventLoopGroup

        public EventLoopGroup getEventLoopGroup()
        Returns:
        The event loop group currently configured to do backoff/retry
      • withMaxRetries

        public ExponentialBackoffRetryOptions withMaxRetries​(long maxRetries)
        Configure the maximum number of retries to make while using a strategy sourced from these options
        Parameters:
        maxRetries - maximum number of retries
        Returns:
        this options object
      • getMaxRetries

        public long getMaxRetries()
        Returns:
        the maximum number of retries to make while using a strategy sourced from these options
      • withBackoffScaleFactorMS

        public ExponentialBackoffRetryOptions withBackoffScaleFactorMS​(long backoffScaleFactorMS)
        Configures the initial (base) unscaled backoff interval in milliseconds
        Parameters:
        backoffScaleFactorMS - the initial (base) unscaled backoff interval in milliseconds
        Returns:
        this options object
      • getBackoffScaleFactorMS

        public long getBackoffScaleFactorMS()
        Returns:
        the initial (base) unscaled backoff interval in milliseconds while using a strategy sourced from these options
      • getJitterMode

        public ExponentialBackoffRetryOptions.JitterMode getJitterMode()
        Returns:
        the type of jitter to apply to the backoff interval calculations while using a strategy sourced from these options