Interface BackoffConfig


public interface BackoffConfig
An interface to define the Backoff configuration. The timer will generate a proper Configuration.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Gets the abort timer rule flag.
    The AbortTrigger that will abort the timer or otherwise signal that the backoff has reached the maximum delay and will no longer sleep.
    Gets Supplier that will return the number of milliseconds remaining in the timer.
  • Method Details

    • getSupplierOfTimeRemaining

      SupplierOfLong getSupplierOfTimeRemaining()
      Gets Supplier that will return the number of milliseconds remaining in the timer. Backoff will calculate delays until the result of this call reaches 0. For cases where a timer is not used this value should be the maximum delay.
      Returns:
      A supplier of the number of milliseconds until the timer expires.
    • getAbortTrigger

      AbortTrigger getAbortTrigger()
      The AbortTrigger that will abort the timer or otherwise signal that the backoff has reached the maximum delay and will no longer sleep.
      Returns:
      the AbortTrigger.
    • applyTimerRule

      boolean applyTimerRule()
      Gets the abort timer rule flag. If there is no timer that may expire and shorten the time for the delay then this value should be false otherwise if the delay time will exceed the maximum time remaining no delay is executed.
      Returns:
      The abort time rule flag.