\Guzzle\Plugin\BackoffCurlBackoffStrategy

Strategy used to retry when certain cURL error codes are encountered.

Summary

Methods
Properties
Constants
__construct()
getDefaultFailureCodes()
makesDecision()
setNext()
getNext()
getBackoffPeriod()
No public properties found
No constants found
getDelay()
$defaultErrorCodes
$errorCodes
$next
N/A
No private methods found
No private properties found
N/A

Properties

$defaultErrorCodes

$defaultErrorCodes : array

Type

array — Default cURL errors to retry

$errorCodes

$errorCodes : array

Type

array — Error codes that can be retried

Methods

__construct()

__construct(array  $codes = null, \Guzzle\Plugin\Backoff\BackoffStrategyInterface  $next = null) 

Parameters

array $codes

Array of codes that should be retried

\Guzzle\Plugin\Backoff\BackoffStrategyInterface $next

The optional next strategy

getDefaultFailureCodes()

getDefaultFailureCodes() : array

Get the default failure codes to retry

Returns

array

makesDecision()

makesDecision() : boolean

Check if the strategy does filtering and makes decisions on whether or not to retry.

Strategies that return false will never retry if all of the previous strategies in a chain defer on a backoff decision.

Returns

boolean

getBackoffPeriod()

getBackoffPeriod(integer  $retries, \Guzzle\Http\Message\RequestInterface  $request, \Guzzle\Http\Message\Response  $response = null, \Guzzle\Http\Exception\HttpException  $e = null) : boolean|integer

Get the amount of time to delay in seconds before retrying a request

Parameters

integer $retries

Number of retries of the request

\Guzzle\Http\Message\RequestInterface $request

Request that was sent

\Guzzle\Http\Message\Response $response

Response that was received. Note that there may not be a response

\Guzzle\Http\Exception\HttpException $e

Exception that was encountered if any

Returns

boolean|integer —

Returns false to not retry or the number of seconds to delay between retries