| 1 | <?php |
||
| 19 | abstract class AbstractRetryStrategyChain implements RetryStrategyChainInterface |
||
| 20 | { |
||
| 21 | /** |
||
| 22 | * @var RetryStrategyChainInterface |
||
| 23 | */ |
||
| 24 | private $next; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @param RetryStrategyChainInterface|null $next |
||
| 28 | */ |
||
| 29 | 378 | public function __construct(RetryStrategyChainInterface $next = null) |
|
| 33 | |||
| 34 | /** |
||
| 35 | * {@inheritdoc} |
||
| 36 | */ |
||
| 37 | 315 | public function hasNext() |
|
| 41 | |||
| 42 | /** |
||
| 43 | * {@inheritdoc} |
||
| 44 | */ |
||
| 45 | 144 | public function getNext() |
|
| 49 | |||
| 50 | /** |
||
| 51 | * {@inheritdoc} |
||
| 52 | */ |
||
| 53 | 378 | public function setNext(RetryStrategyChainInterface $next = null) |
|
| 57 | |||
| 58 | /** |
||
| 59 | * {@inheritdoc} |
||
| 60 | */ |
||
| 61 | 90 | public function verify(InternalRequestInterface $request) |
|
| 71 | |||
| 72 | /** |
||
| 73 | * {@inheritdoc} |
||
| 74 | */ |
||
| 75 | 99 | public function delay(InternalRequestInterface $request) |
|
| 85 | |||
| 86 | /** |
||
| 87 | * @param InternalRequestInterface $request |
||
| 88 | * |
||
| 89 | * @return bool |
||
| 90 | */ |
||
| 91 | 63 | protected function doVerify(InternalRequestInterface $request) |
|
| 95 | |||
| 96 | /** |
||
| 97 | * @param InternalRequestInterface $request |
||
| 98 | * |
||
| 99 | * @return int |
||
| 100 | */ |
||
| 101 | 45 | protected function doDelay(InternalRequestInterface $request) |
|
| 105 | } |
||
| 106 |