|
| __construct (int $maxRetries=5, int $retryInterval=5000, int $maxRetryDelay=125000, int $exponentialBase=2, int $maxRetryTime=180000, int $jitterInterval=0, array $options=[]) |
|
| retry ($callable, $attempts=0) |
|
| isRetryable (ApiException $e) |
|
| getBackoffTime (int $attempt) |
|
Exponential random write retry.
◆ __construct()
InfluxDB2\WriteRetry::__construct |
( |
int | $maxRetries = 5, |
|
|
int | $retryInterval = 5000, |
|
|
int | $maxRetryDelay = 125000, |
|
|
int | $exponentialBase = 2, |
|
|
int | $maxRetryTime = 180000, |
|
|
int | $jitterInterval = 0, |
|
|
array | $options = [] ) |
WriteRetry constructor.
- Parameters
-
int | $maxRetries | max number of retries when write fails |
int | $retryInterval | number of milliseconds to retry unsuccessful write, The retry interval is used when the InfluxDB server does not specify "Retry-After" header. |
int | $maxRetryDelay | maximum delay when retrying write in milliseconds |
int | $exponentialBase | the base for the exponential retry delay, the next delay is computed using random exponential backoff as a random value within the interval retryInterval * exponentialBase^(attempts-1) and retryInterval * exponentialBase^(attempts) . Example for retryInterval=5000, exponentialBase=2, maxRetryDelay=125000, total=5 Retry delays are random distributed values within the ranges of [5000-10000, 10000-20000, 20000-40000, 40000-80000, 80000-125000] |
int | $maxRetryTime | maximum total time when retrying write in milliseconds |
int | $jitterInterval | the number of milliseconds before the data is written increased by a random amount |
array | $options | Client options with logFile. |
◆ retry()
InfluxDB2\WriteRetry::retry |
( |
| $callable, |
|
|
| $attempts = 0 ) |
The documentation for this class was generated from the following file:
- src/InfluxDB2/WriteRetry.php