| 1 | <?php  | 
            ||
| 13 | class ElasticsearchPingCheck extends AbstractElasticsearchCheck  | 
            ||
| 14 | { | 
            ||
| 15 | const CHECK = 'elasticsearch-ping-check';  | 
            ||
| 16 | |||
| 17 | /**  | 
            ||
| 18 | * @var ElasticsearchClient  | 
            ||
| 19 | */  | 
            ||
| 20 | protected $client;  | 
            ||
| 21 | |||
| 22 | /**  | 
            ||
| 23 | * @var string  | 
            ||
| 24 | */  | 
            ||
| 25 | protected $index;  | 
            ||
| 26 | |||
| 27 | /**  | 
            ||
| 28 | * @param string $checkNode  | 
            ||
| 29 | * @param ElasticsearchClient $client  | 
            ||
| 30 | */  | 
            ||
| 31 | public function __construct($checkNode, ElasticsearchClient $client)  | 
            ||
| 36 | |||
| 37 | /**  | 
            ||
| 38 | * Check elasticsearch client ping.  | 
            ||
| 39 | *  | 
            ||
| 40 | * @throws ElasticsearchPingCheckException  | 
            ||
| 41 | * @throws Exception  | 
            ||
| 42 | */  | 
            ||
| 43 | public function performCheck()  | 
            ||
| 58 | |||
| 59 | /**  | 
            ||
| 60 | * @return ElasticsearchClient  | 
            ||
| 61 | */  | 
            ||
| 62 | public function getClient()  | 
            ||
| 66 | |||
| 67 | /**  | 
            ||
| 68 | * @param ElasticsearchClient $client  | 
            ||
| 69 | */  | 
            ||
| 70 | protected function setClient(ElasticsearchClient $client)  | 
            ||
| 74 | }  | 
            ||
| 75 |