Class AdaptiveDelay

java.lang.Object
com.couchbase.client.dcp.util.AdaptiveDelay

public class AdaptiveDelay extends Object
A stateful wrapper around a Delay. Manages the retry counter and automatically resets it to zero after a cooldown duration.
  • Constructor Details

    • AdaptiveDelay

      public AdaptiveDelay(Delay backoffStrategy, Duration cooldown)
  • Method Details

    • calculate

      public Duration calculate()
      Returns the next delay in the backoff sequence.

      If the cooldown duration has elapsed since the previous delay returned by this method, the backoff sequence is reset and this method returns a duration of zero.