trait HasRetryPolicy

Properties

protected RetryPolicy|null $retryPolicy

The request retry policy.

Methods

retry(array|int $times, Closure|int $sleepMilliseconds = 0, callable|null $when = null, bool $throw = true)

Specify the number of times the request should be attempted.

retryPolicy()

Get the request retry policy.

defaultRetryPolicy()

Resolve the default retry policy.

Details

at line 23
HasRetryPolicy retry(array|int $times, Closure|int $sleepMilliseconds = 0, callable|null $when = null, bool $throw = true)

Specify the number of times the request should be attempted.

Parameters

array|int $times
Closure|int $sleepMilliseconds
callable|null $when
bool $throw

Return Value

HasRetryPolicy

at line 37
RetryPolicy|null retryPolicy()

Get the request retry policy.

Return Value

RetryPolicy|null

at line 45
protected RetryPolicy|null defaultRetryPolicy()

Resolve the default retry policy.

Return Value

RetryPolicy|null