A strategy to compute a backoff.
A strategy that always returns the same backoff.
A strategy to calculate an exponential backoff.
A Failurewall implementing the retry pattern.
A Failurewall implementing the retry pattern. Calls wrapped in RetryFailurewall can be retried if it fails.
RetryFailurewall is recommended for resources which may become temporarily unavailable.
Whether the call should be retried or not.
The call should not be retried.
The call should not be retried. This should be used when the operation is successful or the error is not transient.
- business logic error - the resource that user requests is not found - a service is under maintenance
The call should be retried.
The call should be retried. This should be used when the error may be transient.
- a session is disconnected - a service is temporary unavailable
A strategy to calculate an exponential backoff.
The formula is as follows. The randomValue value is [1.0, 1.0 +
randomFactor
].minBackoff * (multiplier ^ (trialTimes - 1)) * randomValue
However,
nextDelay
returnsmaxBackoff
*randomFactor
if the calculated backoff exceedsmaxBackoff
.