shouldRetry

abstract fun shouldRetry(result: Result<Any?>, retryCount: Int, elapsedTime: Duration): Boolean

Called by RetryPolicy.retry, determines whether a retry should be performed based on the result of execution and the retryCount.

Return

true if the operation should be retried, false otherwise.

Since

1.0.0

Parameters

result

The Result of the execution.

retryCount

The number of times the operation has been retried.

elapsedTime

The time since the retry function was first called