ExponentialBackoff
A RetryPolicy that retries every failure with exponentially growing, capped and jittered delays.
Constructors
Types
Fluent builder for ExponentialBackoff, provided primarily for Java callers. Any property left unset falls back to the same default as the constructor.
Properties
Functions
Returns initialDelay in whole milliseconds. Java cannot read initialDelay (mangled).
Returns the delay before the next attempt once failedAttempts attempts have failed, and is called only after shouldRetry returned true. A zero or negative delay retries at once, and Duration.INFINITE waits until the retrying coroutine is canceled.
Returns whether to retry once failedAttempts attempts (at least 1) have failed, the last with failure.
Returns a Builder initialized with this instance's properties, primarily for Java callers. Prefer it over copy from Java: copy takes every property positionally, so its signature changes whenever a property is added.