HumHub Documentation (unofficial)

AwsRetryStrategy extends GenericRetryStrategy
in package

Decides to retry the request when HTTP status codes belong to the given list of codes.

Tags
author

Jérémy Derussé jeremy@derusse.com

Table of Contents

Constants

DEFAULT_RETRY_STATUS_CODES  = [0, 423, 425, 429, 500, 502, 503, 504, 507, 510]
IDEMPOTENT_METHODS  = ['GET', 'HEAD', 'PUT', 'DELETE', 'OPTIONS', 'TRACE']

Properties

$awsErrorFactory  : AwsErrorFactoryInterface
$delayMs  : mixed
$jitter  : mixed
$maxDelayMs  : mixed
$multiplier  : mixed
$statusCodes  : mixed

Methods

__construct()  : mixed
getDelay()  : int
Returns the time to wait in milliseconds.
shouldRetry()  : bool|null
Returns whether the request should be retried.

Constants

DEFAULT_RETRY_STATUS_CODES

public mixed DEFAULT_RETRY_STATUS_CODES = [0, 423, 425, 429, 500, 502, 503, 504, 507, 510]

IDEMPOTENT_METHODS

public mixed IDEMPOTENT_METHODS = ['GET', 'HEAD', 'PUT', 'DELETE', 'OPTIONS', 'TRACE']

Properties

Methods

__construct()

public __construct([array<int, int|array<string|int, string>> $statusCodes = self::DEFAULT_RETRY_STATUS_CODES ][, int $delayMs = 1000 ][, float $multiplier = 2.0 ][, int $maxDelayMs = 0 ][, float $jitter = 0.1 ][, AwsErrorFactoryInterface|null $awsErrorFactory = null ]) : mixed
Parameters
$statusCodes : array<int, int|array<string|int, string>> = self::DEFAULT_RETRY_STATUS_CODES
$delayMs : int = 1000

Amount of time to delay (or the initial value when multiplier is used)

$multiplier : float = 2.0

Multiplier to apply to the delay each time a retry occurs

$maxDelayMs : int = 0

Maximum delay to allow (0 means no maximum)

$jitter : float = 0.1

Probability of randomness int delay (0 = none, 1 = 100% random)

$awsErrorFactory : AwsErrorFactoryInterface|null = null

        
On this page

Search results