Interface DelayStrategy

All Known Implementing Classes:
ConstantDelay, DecorrelatedJitterDelay, EqualJitterDelay, FullJitterDelay

public interface DelayStrategy
Strategy interface for calculating delay durations between retry attempts.
Author:
Nikita Koksharov
  • Method Summary

    Modifier and Type
    Method
    Description
    calcDelay(int attempt)
    Calculates the delay duration to wait before the next retry attempt.
  • Method Details

    • calcDelay

      Duration calcDelay(int attempt)
      Calculates the delay duration to wait before the next retry attempt.
      Parameters:
      attempt - the zero-based retry attempt number (0 = first retry)
      Returns:
      the duration to wait before the next retry attempt