Class FullJitterBackoff

    • Constructor Detail

      • FullJitterBackoff

        public FullJitterBackoff()
    • Method Detail

      • calculateFullJitterBackoff

        public long calculateFullJitterBackoff​(long baseMillis,
                                               long maxMillis,
                                               double power,
                                               int attempt)
        Calculates the sleep time for full jitter based on the given parameters.
        Parameters:
        baseMillis - the base backoff time in milliseconds
        maxMillis - the maximum backoff time in milliseconds
        power - the power constant for exponential backoff
        attempt - the attempt number
        Returns:
        the time to wait before trying again