BaseMillisRetryPolicy
Java-friendly base for implementing a RetryPolicy. Java cannot return the Duration that nextRetryDelay needs, so a Java subclass implements shouldRetry and nextRetryDelayMillis instead. Like any RetryPolicy, it must be thread-safe and return quickly.
Functions
Link copied to clipboard
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.
Link copied to clipboard
Returns whether to retry once failedAttempts attempts (at least 1) have failed, the last with failure.