Package alluxio.retry

Class ExponentialBackoffRetry

  • All Implemented Interfaces:
    RetryPolicy

    @NotThreadSafe
    public class ExponentialBackoffRetry
    extends SleepingRetry
    Each retry will cause a sleep to happen. This sleep will grow over time exponentially so each sleep gets much larger than the last. To make sure that this growth does not grow out of control, a max sleep is used as a bounding.
    • Constructor Summary

      Constructors 
      Constructor Description
      ExponentialBackoffRetry​(int baseSleepTimeMs, int maxSleepMs, int maxRetries)
      Constructs a new retry facility which sleeps for an exponentially increasing amount of time between retries.
    • Constructor Detail

      • ExponentialBackoffRetry

        public ExponentialBackoffRetry​(int baseSleepTimeMs,
                                       int maxSleepMs,
                                       int maxRetries)
        Constructs a new retry facility which sleeps for an exponentially increasing amount of time between retries.
        Parameters:
        baseSleepTimeMs - the sleep in milliseconds to begin with
        maxSleepMs - the max sleep in milliseconds as a bounding
        maxRetries - the max count of retries