Class Backoff.Constant

java.lang.Object
org.apache.bookkeeper.common.util.Backoff.Constant
All Implemented Interfaces:
Backoff.Policy
Enclosing class:
Backoff

public static class Backoff.Constant extends Object implements Backoff.Policy
A constant backoff policy.
  • Method Details

    • of

      public static Backoff.Constant of(long ms)
      Create infinite constant backoff stream.

      It is the infinite version of of(long, long).

      Parameters:
      ms - constant backoff time in milliseconds.
      Returns:
      constant backoff policy.
    • toBackoffs

      public Stream<Long> toBackoffs()
      Description copied from interface: Backoff.Policy
      Convert the policy into a series of backoff values.
      Specified by:
      toBackoffs in interface Backoff.Policy
      Returns:
      a series of backoff values.
    • of

      public static Backoff.Constant of(long ms, long limit)
    • getMs

      public long getMs()
    • getLimit

      public long getLimit()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object