ExponentialBackoff
in package
implements
BackoffCalculator
Interfaces, Classes, Traits and Enums
Table of Contents
- $delayMicros : int
- $maxDelayMicros : int
- __construct() : mixed
- build() : ExponentialBackoff
- calculateBackoff() : float
- With default values, backoff, as retry attempts increase: 1.5ms, 3.5ms, 7.5ms, 15.5ms, 31.5ms, 63.5ms, 127.5ms, 255.5ms, 500ms
Properties
$delayMicros
private
int
$delayMicros
$maxDelayMicros
private
int
$maxDelayMicros
Methods
__construct()
public
__construct([int $delayMicros = 1 ][, int $maxDelayMicros = 500 ]) : mixed
Parameters
- $delayMicros : int = 1
- $maxDelayMicros : int = 500
Return values
mixed —build()
public
static build(int $delayMicros, int $maxDelayMicros) : ExponentialBackoff
Parameters
- $delayMicros : int
- $maxDelayMicros : int
Return values
ExponentialBackoff —calculateBackoff()
With default values, backoff, as retry attempts increase: 1.5ms, 3.5ms, 7.5ms, 15.5ms, 31.5ms, 63.5ms, 127.5ms, 255.5ms, 500ms
public
calculateBackoff(ProtostellarRequest $request) : float
Parameters
- $request : ProtostellarRequest
Return values
float —Backoff in microseconds