Class LinearDelay

java.lang.Object
com.couchbase.client.core.time.Delay
com.couchbase.client.core.time.LinearDelay

public class LinearDelay
extends Delay
Delay which increases linearly for every attempt.
Since:
1.1.0
Author:
Michael Nitschinger
  • Method Details

    • calculate

      public long calculate​(long attempt)
      Description copied from class: Delay
      Calculate a specific delay based on the attempt passed in. This method is to be implemented by the child implementations and depending on the params that were set during construction time.
      Specified by:
      calculate in class Delay
      Parameters:
      attempt - the attempt to calculate the delay from.
      Returns:
      the calculate delay.
    • toString

      public String toString()
      Overrides:
      toString in class Object