Open Journal Systems  3.3.0
Guzzle\Plugin\Backoff\CurlBackoffStrategy Class Reference
Inheritance diagram for Guzzle\Plugin\Backoff\CurlBackoffStrategy:
Guzzle\Plugin\Backoff\AbstractErrorCodeBackoffStrategy Guzzle\Plugin\Backoff\AbstractBackoffStrategy Guzzle\Plugin\Backoff\BackoffStrategyInterface

Protected Member Functions

 getDelay ($retries, RequestInterface $request, Response $response=null, HttpException $e=null)
 

Static Protected Attributes

static $defaultErrorCodes
 
- Static Protected Attributes inherited from Guzzle\Plugin\Backoff\AbstractErrorCodeBackoffStrategy
static $defaultErrorCodes = array()
 

Additional Inherited Members

- Public Member Functions inherited from Guzzle\Plugin\Backoff\AbstractErrorCodeBackoffStrategy
 __construct (array $codes=null, BackoffStrategyInterface $next=null)
 
 makesDecision ()
 
- Public Member Functions inherited from Guzzle\Plugin\Backoff\AbstractBackoffStrategy
 getBackoffPeriod ( $retries, RequestInterface $request, Response $response=null, HttpException $e=null)
 
 getNext ()
 
 setNext (AbstractBackoffStrategy $next)
 
- Static Public Member Functions inherited from Guzzle\Plugin\Backoff\AbstractErrorCodeBackoffStrategy
static getDefaultFailureCodes ()
 
- Protected Attributes inherited from Guzzle\Plugin\Backoff\AbstractErrorCodeBackoffStrategy
 $errorCodes
 
- Protected Attributes inherited from Guzzle\Plugin\Backoff\AbstractBackoffStrategy
 $next
 

Detailed Description

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

Definition at line 13 of file CurlBackoffStrategy.php.

Member Function Documentation

◆ getDelay()

Guzzle\Plugin\Backoff\CurlBackoffStrategy::getDelay (   $retries,
RequestInterface  $request,
Response  $response = null,
HttpException  $e = null 
)
protected

Implement the concrete strategy

Parameters
int$retriesNumber of retries of the request
RequestInterface$requestRequest that was sent
Response$responseResponse that was received. Note that there may not be a response
HttpException$eException that was encountered if any
Returns
bool|int|null Returns false to not retry or the number of seconds to delay between retries. Return true or null to defer to the next strategy if available, and if not, return 0.

Reimplemented from Guzzle\Plugin\Backoff\AbstractBackoffStrategy.

Definition at line 22 of file CurlBackoffStrategy.php.

Field Documentation

◆ $defaultErrorCodes

Guzzle\Plugin\Backoff\CurlBackoffStrategy::$defaultErrorCodes
staticprotected
Initial value:
= array(
CURLE_COULDNT_RESOLVE_HOST, CURLE_COULDNT_CONNECT, CURLE_PARTIAL_FILE, CURLE_WRITE_ERROR, CURLE_READ_ERROR,
CURLE_OPERATION_TIMEOUTED, CURLE_SSL_CONNECT_ERROR, CURLE_HTTP_PORT_FAILED, CURLE_GOT_NOTHING,
CURLE_SEND_ERROR, CURLE_RECV_ERROR
)

Definition at line 16 of file CurlBackoffStrategy.php.


The documentation for this class was generated from the following file: