PHP Class Elastica\Cluster\Health

Show file Open project: ruflin/elastica Class Usage Examples

Protected Properties

Property Type Description
$_client Client object.
$_data The cluster health data.

Public Methods

Method Description
__construct ( Client $client )
getActivePrimaryShards ( ) : integer Gets the number of active primary shards.
getActiveShards ( ) : integer Gets the number of active shards.
getClusterName ( ) : string Gets the name of the cluster.
getData ( ) : array Gets the health data.
getIndices ( ) : Index[] Gets the status of the indices.
getInitializingShards ( ) : integer Gets the number of initializing shards.
getNumberOfDataNodes ( ) : integer Gets the number of data nodes in the cluster.
getNumberOfNodes ( ) : integer Gets the number of nodes in the cluster.
getRelocatingShards ( ) : integer Gets the number of relocating shards.
getStatus ( ) : string Gets the status of the cluster.
getTimedOut ( ) : boolean TODO determine the purpose of this.
getUnassignedShards ( ) : integer Gets the number of unassigned shards.
refresh ( ) Refreshes the health data for the cluster.

Protected Methods

Method Description
_retrieveHealthData ( ) : array Retrieves the health data from the cluster.

Method Details

__construct() public method

public __construct ( Client $client )
$client Elastica\Client The Elastica client.

_retrieveHealthData() protected method

Retrieves the health data from the cluster.
protected _retrieveHealthData ( ) : array
return array

getActivePrimaryShards() public method

Gets the number of active primary shards.
public getActivePrimaryShards ( ) : integer
return integer

getActiveShards() public method

Gets the number of active shards.
public getActiveShards ( ) : integer
return integer

getClusterName() public method

Gets the name of the cluster.
public getClusterName ( ) : string
return string

getData() public method

Gets the health data.
public getData ( ) : array
return array

getIndices() public method

Gets the status of the indices.
public getIndices ( ) : Index[]
return Elastica\Cluster\Health\Index[]

getInitializingShards() public method

Gets the number of initializing shards.
public getInitializingShards ( ) : integer
return integer

getNumberOfDataNodes() public method

Gets the number of data nodes in the cluster.
public getNumberOfDataNodes ( ) : integer
return integer

getNumberOfNodes() public method

Gets the number of nodes in the cluster.
public getNumberOfNodes ( ) : integer
return integer

getRelocatingShards() public method

Gets the number of relocating shards.
public getRelocatingShards ( ) : integer
return integer

getStatus() public method

Gets the status of the cluster.
public getStatus ( ) : string
return string green, yellow or red.

getTimedOut() public method

TODO determine the purpose of this.
public getTimedOut ( ) : boolean
return boolean

getUnassignedShards() public method

Gets the number of unassigned shards.
public getUnassignedShards ( ) : integer
return integer

refresh() public method

Refreshes the health data for the cluster.
public refresh ( )

Property Details

$_client protected property

Client object.
protected $_client

$_data protected property

The cluster health data.
protected $_data