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

Public Member Functions

 __construct ($delay)
 
 makesDecision ()
 
- Public Member Functions inherited from Guzzle\Plugin\Backoff\AbstractBackoffStrategy
 getBackoffPeriod ( $retries, RequestInterface $request, Response $response=null, HttpException $e=null)
 
 getNext ()
 
 setNext (AbstractBackoffStrategy $next)
 

Protected Member Functions

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

Protected Attributes

 $delay
 
- Protected Attributes inherited from Guzzle\Plugin\Backoff\AbstractBackoffStrategy
 $next
 

Detailed Description

Will retry the request using the same amount of delay for each retry.

Warning: If no decision making strategies precede this strategy in the the chain, then all requests will be retried

Definition at line 14 of file ConstantBackoffStrategy.php.

Constructor & Destructor Documentation

◆ __construct()

Guzzle\Plugin\Backoff\ConstantBackoffStrategy::__construct (   $delay)
Parameters
int$delayAmount of time to delay between each additional backoff

Definition at line 23 of file ConstantBackoffStrategy.php.

References Guzzle\Plugin\Backoff\ConstantBackoffStrategy\$delay.

Member Function Documentation

◆ getDelay()

Guzzle\Plugin\Backoff\ConstantBackoffStrategy::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 33 of file ConstantBackoffStrategy.php.

References Guzzle\Plugin\Backoff\ConstantBackoffStrategy\$delay.

◆ makesDecision()

Guzzle\Plugin\Backoff\ConstantBackoffStrategy::makesDecision ( )

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
bool

Reimplemented from Guzzle\Plugin\Backoff\AbstractBackoffStrategy.

Definition at line 28 of file ConstantBackoffStrategy.php.

Field Documentation

◆ $delay

int Guzzle\Plugin\Backoff\ConstantBackoffStrategy::$delay
protected

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