\ElasticaNode

Elastica cluster node object.

Summary

Methods
Properties
Constants
__construct()
getId()
setId()
getName()
getClient()
getStats()
getInfo()
refresh()
shutdown()
No public properties found
No constants found
No protected methods found
$_client
$_id
$_name
$_stats
$_info
N/A
No private methods found
No private properties found
N/A

Properties

$_id

$_id : string

Type

string — Unique node id

$_name

$_name : string

Node name.

Type

string — Node name

$_stats

$_stats : \Elastica\Node\Stats|null

Node stats.

Type

\Elastica\Node\Stats|null — Node Stats

$_info

$_info : \Elastica\Node\Info|null

Node info.

Type

\Elastica\Node\Info|null — Node info

Methods

__construct()

__construct(string  $id, \Elastica\Client  $client) 

Create a new node object.

Parameters

string $id

Node id or name

\Elastica\Client $client

Node object

getId()

getId() : string

Returns

string —

Unique node id. Can also be name if id not exists.

setId()

setId(string  $id) : $this

Parameters

string $id

Node id

Returns

$this —

Refreshed object

getName()

getName() : string

Get the name of the node.

Returns

string —

Node name

getClient()

getClient() : \Elastica\Client

Returns the current client object.

Returns

\Elastica\Client

Client

getStats()

getStats() : \Elastica\Node\Stats

Return stats object of the current node.

Returns

\Elastica\Node\Stats

Node stats

getInfo()

getInfo() : \Elastica\Node\Info

Return info object of the current node.

Returns

\Elastica\Node\Info

Node info object

refresh()

refresh() 

Refreshes all node information.

This should be called after updating a node to refresh all information

shutdown()

shutdown(string  $delay = '1s') : \Elastica\Response

Shuts this node down.

Parameters

string $delay

OPTIONAL Delay after which node is shut down (default = 1s)

Returns

\Elastica\Response