| 1 | <?php |
||
| 22 | class Retry implements RetryInterface |
||
| 23 | { |
||
| 24 | /** |
||
| 25 | * @var RetryStrategyInterface |
||
| 26 | */ |
||
| 27 | private $strategy; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @param RetryStrategyInterface|null $strategy |
||
| 31 | */ |
||
| 32 | 63 | public function __construct(RetryStrategyInterface $strategy = null) |
|
| 36 | |||
| 37 | /** |
||
| 38 | * {@inheritdoc} |
||
| 39 | */ |
||
| 40 | 27 | public function getStrategy() |
|
| 44 | |||
| 45 | /** |
||
| 46 | * {@inheritdoc} |
||
| 47 | */ |
||
| 48 | 63 | public function setStrategy(RetryStrategyInterface $strategy) |
|
| 52 | |||
| 53 | /** |
||
| 54 | * {@inheritdoc} |
||
| 55 | */ |
||
| 56 | 27 | public function retry(InternalRequestInterface $internalRequest, $wait = true) |
|
| 71 | } |
||
| 72 |