backoffDelayMillis

fun backoffDelayMillis(retryAttempt: Int): Long

Computes the exponential backoff delay for a given retry attempt, capped at maxDelayMillis.

Return

The delay in milliseconds before the next retry.

Parameters

retryAttempt

The 1-based retry attempt number.

Throws

IllegalArgumentException

if retryAttempt is less than 1.