\Elastica\Cluster\HealthShard

Wraps status information for a shard.

Summary

Methods
Properties
Constants
__construct()
getShardNumber()
getStatus()
isPrimaryActive()
isActive()
isRelocating()
isInitialized()
isUnassigned()
No public properties found
No constants found
No protected methods found
$_shardNumber
$_data
N/A
No private methods found
No private properties found
N/A

Properties

$_shardNumber

$_shardNumber : integer

Type

integer — The shard index/number.

$_data

$_data : array

Type

array — The shard health data.

Methods

__construct()

__construct(integer  $shardNumber, array  $data) 

Parameters

integer $shardNumber

The shard index/number.

array $data

The shard health data.

getShardNumber()

getShardNumber() : integer

Gets the index/number of this shard.

Returns

integer

getStatus()

getStatus() : string

Gets the status of this shard.

Returns

string —

green, yellow or red.

isPrimaryActive()

isPrimaryActive() : boolean

Is the primary active?

Returns

boolean

isActive()

isActive() : boolean

Is this shard active?

Returns

boolean

isRelocating()

isRelocating() : boolean

Is this shard relocating?

Returns

boolean

isInitialized()

isInitialized() : boolean

Is this shard initialized?

Returns

boolean

isUnassigned()

isUnassigned() : boolean

Is this shard unassigned?

Returns

boolean