RetryPolicy
final class RetryPolicy
Properties
| FatalRequestException|RequestException): int | $delay | The delay resolver. |
|
| null|FatalRequestException|PendingRequest): bool | $when | The retry condition. |
Methods
__construct(array|int $times = 1, Closure|int $sleepMilliseconds = 0, callable|null $when = null, bool $throw = true)
Create a retry policy.
int
maximumAttempts()
Get the maximum number of attempts.
int
delayFor(int $attempt, FatalRequestException|RequestException $exception)
Resolve the delay before the next attempt.
Details
at line 36
__construct(array|int $times = 1, Closure|int $sleepMilliseconds = 0, callable|null $when = null, bool $throw = true)
Create a retry policy.
at line 65
int
maximumAttempts()
Get the maximum number of attempts.
at line 73
int
delayFor(int $attempt, FatalRequestException|RequestException $exception)
Resolve the delay before the next attempt.