Open Journal Systems  3.3.0
Guzzle\Plugin\Backoff\BackoffStrategyInterface Interface Reference
Inheritance diagram for Guzzle\Plugin\Backoff\BackoffStrategyInterface:
Guzzle\Plugin\Backoff\AbstractBackoffStrategy Guzzle\Plugin\Backoff\AbstractErrorCodeBackoffStrategy Guzzle\Plugin\Backoff\CallbackBackoffStrategy Guzzle\Plugin\Backoff\ConstantBackoffStrategy Guzzle\Plugin\Backoff\ExponentialBackoffStrategy Guzzle\Plugin\Backoff\LinearBackoffStrategy Guzzle\Plugin\Backoff\TruncatedBackoffStrategy Guzzle\Plugin\Backoff\CurlBackoffStrategy Guzzle\Plugin\Backoff\HttpBackoffStrategy Guzzle\Plugin\Backoff\ReasonPhraseBackoffStrategy

Public Member Functions

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

Detailed Description

Strategy to determine if a request should be retried and how long to delay between retries

Definition at line 12 of file BackoffStrategyInterface.php.

Member Function Documentation

◆ getBackoffPeriod()

Guzzle\Plugin\Backoff\BackoffStrategyInterface::getBackoffPeriod (   $retries,
RequestInterface  $request,
Response  $response = null,
HttpException  $e = null 
)

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

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 Returns false to not retry or the number of seconds to delay between retries

Implemented in Guzzle\Plugin\Backoff\AbstractBackoffStrategy.


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