| 1 | <?php |
||
| 20 | class LimitedRetryStrategy extends AbstractRetryStrategyChain |
||
| 21 | { |
||
| 22 | /** |
||
| 23 | * @var int |
||
| 24 | */ |
||
| 25 | private $limit; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @param int $limit |
||
| 29 | * @param RetryStrategyChainInterface|null $next |
||
| 30 | */ |
||
| 31 | 72 | public function __construct($limit = 3, RetryStrategyChainInterface $next = null) |
|
| 37 | |||
| 38 | /** |
||
| 39 | * @return int |
||
| 40 | */ |
||
| 41 | 36 | public function getLimit() |
|
| 45 | |||
| 46 | /** |
||
| 47 | * @param int $limit |
||
| 48 | */ |
||
| 49 | 72 | public function setLimit($limit) |
|
| 53 | |||
| 54 | /** |
||
| 55 | * {@inheritdoc} |
||
| 56 | */ |
||
| 57 | 18 | protected function doVerify(InternalRequestInterface $request) |
|
| 61 | } |
||
| 62 |