|
Open Journal Systems
3.3.0
|
Public Member Functions | |
| __construct ($callback, $decision, 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) | |
Protected Member Functions | |
| getDelay ($retries, RequestInterface $request, Response $response=null, HttpException $e=null) | |
Protected Attributes | |
| $callback | |
| $decision | |
Protected Attributes inherited from Guzzle\Plugin\Backoff\AbstractBackoffStrategy | |
| $next | |
Strategy that will invoke a closure to determine whether or not to retry with a delay
Definition at line 13 of file CallbackBackoffStrategy.php.
| Guzzle\Plugin\Backoff\CallbackBackoffStrategy::__construct | ( | $callback, | |
| $decision, | |||
| BackoffStrategyInterface | $next = null |
||
| ) |
| \Closure | array | mixed | $callback | Callable method to invoke |
| bool | $decision | Set to true if this strategy makes a backoff decision |
| BackoffStrategyInterface | $next | The optional next strategy |
| InvalidArgumentException |
Definition at line 34 of file CallbackBackoffStrategy.php.
References Guzzle\Plugin\Backoff\CallbackBackoffStrategy\$callback, Guzzle\Plugin\Backoff\CallbackBackoffStrategy\$decision, and Guzzle\Plugin\Backoff\AbstractBackoffStrategy\$next.
|
protected |
Implement the concrete strategy
| int | $retries | Number of retries of the request |
| RequestInterface | $request | Request that was sent |
| Response | $response | Response that was received. Note that there may not be a response |
| HttpException | $e | Exception that was encountered if any |
Reimplemented from Guzzle\Plugin\Backoff\AbstractBackoffStrategy.
Definition at line 49 of file CallbackBackoffStrategy.php.
| Guzzle\Plugin\Backoff\CallbackBackoffStrategy::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.
Reimplemented from Guzzle\Plugin\Backoff\AbstractBackoffStrategy.
Definition at line 44 of file CallbackBackoffStrategy.php.
References Guzzle\Plugin\Backoff\CallbackBackoffStrategy\$decision.
|
protected |
Callable method to invoke
Definition at line 19 of file CallbackBackoffStrategy.php.
Referenced by Guzzle\Plugin\Backoff\CallbackBackoffStrategy\__construct().
|
protected |
Whether or not this strategy makes a retry decision
Definition at line 25 of file CallbackBackoffStrategy.php.
Referenced by Guzzle\Plugin\Backoff\CallbackBackoffStrategy\__construct(), and Guzzle\Plugin\Backoff\CallbackBackoffStrategy\makesDecision().