Interface BackoffSupplier

All Known Implementing Classes:
ExponentialBackoff
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@Deprecated @FunctionalInterface public interface BackoffSupplier
Deprecated.
since 8.8 for removal in 8.9, replaced by BackoffSupplier
The JobWorker uses this interface to determine the retry delay after each failed request. After a successful request, or if no requests have been sent yet, the delay is reset to the job worker's polling interval (see JobWorkerBuilderStep1.JobWorkerBuilderStep3.pollInterval(Duration)).

The supplier is called after a failed request. The worker will then await the supplied delay before sending the next request.

  • Method Summary

    Modifier and Type
    Method
    Description
    Deprecated.
     
    long
    supplyRetryDelay(long currentRetryDelay)
    Deprecated.
    Returns the delay before the next retry.
  • Method Details

    • newBackoffBuilder

      static ExponentialBackoffBuilder newBackoffBuilder()
      Deprecated.
      Returns:
      a builder to configure and create a new exponential backoff ExponentialBackoff.
    • supplyRetryDelay

      long supplyRetryDelay(long currentRetryDelay)
      Deprecated.
      Returns the delay before the next retry. The delay should be specified in milliseconds.
      Parameters:
      currentRetryDelay - the last used retry delay
      Returns:
      the new retry delay