| 1 | <?php |
||
| 5 | final class ServiceOptions |
||
| 6 | { |
||
| 7 | /** @var int */ |
||
| 8 | private $attemptsThreshold; |
||
| 9 | |||
| 10 | /** @var int */ |
||
| 11 | private $attemptsTtl; |
||
| 12 | |||
| 13 | /** @var int */ |
||
| 14 | private $failureTtl; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * ServiceOptions constructor. |
||
| 18 | * |
||
| 19 | * @param $attemptsThreshold |
||
| 20 | * @param $attemptsTtl |
||
| 21 | * @param $failureTtl |
||
| 22 | */ |
||
| 23 | private function __construct(int $attemptsThreshold, int $attemptsTtl, int $failureTtl) |
||
| 29 | |||
| 30 | public static function createFromOptions($attemptsThreshold, $attemptsTtl, $failureTtl) : ServiceOptions |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @return int |
||
| 37 | */ |
||
| 38 | public function getAttemptsThreshold(): int |
||
| 42 | |||
| 43 | /** |
||
| 44 | * @return int |
||
| 45 | */ |
||
| 46 | public function getAttemptsTtl(): int |
||
| 50 | |||
| 51 | /** |
||
| 52 | * @return int |
||
| 53 | */ |
||
| 54 | public function getFailureTtl(): int |
||
| 58 | } |
||
| 59 |