MultiplierRetryStrategy implements RetryStrategyInterface
Table of Contents
Interfaces
Methods
- __construct() : mixed
- getMaxRetryCount() : int
- getWaitingTime() : int
Methods
__construct()
public
__construct([int $maxRetries = 3 ][, int $delayMilliseconds = 100 ][, float $multiplier = 2 ][, int $maxDelayMilliseconds = 0 ][, float $jitter = 0.1 ]) : mixed
Parameters
- $maxRetries : int = 3
-
The maximum number of times to retry
- $delayMilliseconds : int = 100
-
Milliseconds delay
- $multiplier : float = 2
-
Causes the delay to be higher before each retry: 1 second, 2 seconds, 4 seconds
- $maxDelayMilliseconds : int = 0
-
Maximum delay to allow (0 means no maximum)
- $jitter : float = 0.1
-
The value between 0 and 1.0 is the percentage of 'delay' that will be added/subtracted
getMaxRetryCount()
public
getMaxRetryCount() : int
Return values
intgetWaitingTime()
public
getWaitingTime([int $retry = 1 ]) : int
Parameters
- $retry : int = 1
-
Number of current retry
Tags
Return values
int —Delay in milliseconds