\Elastica\NodeInfo

Elastica cluster node object.

Summary

Methods
Properties
Constants
__construct()
get()
getPort()
getIp()
getPlugins()
hasPlugin()
getData()
getNode()
getId()
getName()
getResponse()
refresh()
No public properties found
No constants found
No protected methods found
$_response
$_data
$_node
$_params
$_id
N/A
No private methods found
No private properties found
N/A

Properties

$_response

$_response : \Elastica\Response

Response.

Type

\Elastica\Response — Response object

$_data

$_data : array

Stats data.

Type

array — stats data

$_node

$_node : \Elastica\Node

Node.

Type

\Elastica\Node — Node object

$_params

$_params : array

Query parameters.

Type

array

$_id

$_id : string

Unique node id.

Type

string

Methods

__construct()

__construct(\Elastica\Node  $node, array  $params = array()) 

Create new info object for node.

Parameters

\Elastica\Node $node

Node object

array $params

List of params to return. Can be: settings, os, process, jvm, thread_pool, network, transport, http

get()

get() : mixed

Returns the entry in the data array based on the params.

Several params possible.

Example 1: get('os', 'mem', 'total') returns total memory of the system the node is running on Example 2: get('os', 'mem') returns an array with all mem infos

Returns

mixed —

Data array entry or null if not found

getPort()

getPort() : string

Return port of the node.

Returns

string —

Returns Node port

getIp()

getIp() : string

Return IP of the node.

Returns

string —

Returns Node ip address

getPlugins()

getPlugins() : array

Return data regarding plugins installed on this node.

Returns

array —

plugin data

hasPlugin()

hasPlugin(string  $name) : boolean

Check if the given plugin is installed on this node.

Parameters

string $name

plugin name

Returns

boolean —

true if the plugin is installed, false otherwise

getData()

getData() : array

Return all info data.

Returns

array —

Data array

getNode()

getNode() : \Elastica\Node

Return node object.

Returns

\Elastica\Node

Node object

getId()

getId() : string

Returns

string —

Unique node id

getName()

getName() : string

Returns

string —

Node name

getResponse()

getResponse() : \Elastica\Response

Returns response object.

Returns

\Elastica\Response

Response object

refresh()

refresh(array  $params = array()) : \Elastica\Response

Reloads all nodes information. Has to be called if informations changed.

Parameters

array $params

Params to return (default none). Possible options: settings, os, process, jvm, thread_pool, network, transport, http, plugin

Returns

\Elastica\Response

Response object