1 | <?php |
||
10 | class Service |
||
11 | { |
||
12 | protected $name; |
||
13 | |||
14 | protected $maxFailures; |
||
15 | |||
16 | protected $retryTimeout; |
||
17 | |||
18 | /** |
||
19 | * Service constructor. |
||
20 | * |
||
21 | * @param string $name Name of the service |
||
22 | * @param int $maxFailures Maximum numbers of allowed failures |
||
23 | * @param int $retryTimeout Timeout to retry the service |
||
24 | */ |
||
25 | 1 | public function __construct($name, $maxFailures = 20, $retryTimeout = 60) |
|
31 | |||
32 | /** |
||
33 | * @param string $name Name of the service |
||
34 | */ |
||
35 | 1 | protected function setName($name) |
|
43 | |||
44 | /** |
||
45 | * @return string |
||
46 | */ |
||
47 | 1 | public function getName() |
|
51 | |||
52 | /** |
||
53 | * @return int |
||
54 | */ |
||
55 | 1 | public function getMaxFailures() |
|
59 | |||
60 | /** |
||
61 | * @return int |
||
62 | */ |
||
63 | 1 | public function getRetryTimeout() |
|
67 | } |
||
68 |