PHP Класс Elastica\Node\Info

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$_data Stats data.
$_id string Unique node id.
$_node Node.
$_params array Query parameters.
$_response Response.

Открытые методы

Метод Описание
__construct ( Node $node, array $params = [] ) Create new info object for node.
get ( ) : mixed Returns the entry in the data array based on the params.
getData ( ) : array Return all info data.
getId ( ) : string
getIp ( ) : string Return IP of the node.
getName ( ) : string
getNode ( ) : Node Return node object.
getPlugins ( ) : array Return data regarding plugins installed on this node.
getPort ( ) : string Return port of the node.
getResponse ( ) : Response Returns response object.
hasPlugin ( string $name ) : boolean Check if the given plugin is installed on this node.
refresh ( array $params = [] ) : Response Reloads all nodes information. Has to be called if informations changed.

Описание методов

__construct() публичный Метод

Create new info object for node.
public __construct ( Node $node, array $params = [] )
$node Elastica\Node Node object
$params array List of params to return. Can be: settings, os, process, jvm, thread_pool, network, transport, http

get() публичный Метод

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
public get ( ) : mixed
Результат mixed Data array entry or null if not found

getData() публичный Метод

Return all info data.
public getData ( ) : array
Результат array Data array

getId() публичный Метод

public getId ( ) : string
Результат string Unique node id

getIp() публичный Метод

Return IP of the node.
public getIp ( ) : string
Результат string Returns Node ip address

getName() публичный Метод

public getName ( ) : string
Результат string Node name

getNode() публичный Метод

Return node object.
public getNode ( ) : Node
Результат Elastica\Node Node object

getPlugins() публичный Метод

Return data regarding plugins installed on this node.
public getPlugins ( ) : array
Результат array plugin data

getPort() публичный Метод

Return port of the node.
public getPort ( ) : string
Результат string Returns Node port

getResponse() публичный Метод

Returns response object.
public getResponse ( ) : Response
Результат Elastica\Response Response object

hasPlugin() публичный Метод

Check if the given plugin is installed on this node.
public hasPlugin ( string $name ) : boolean
$name string plugin name
Результат boolean true if the plugin is installed, false otherwise

refresh() публичный Метод

Reloads all nodes information. Has to be called if informations changed.
public refresh ( array $params = [] ) : Response
$params array Params to return (default none). Possible options: settings, os, process, jvm, thread_pool, network, transport, http, plugin
Результат Elastica\Response Response object

Описание свойств

$_data защищенное свойство

Stats data.
protected $_data

$_id защищенное свойство

Unique node id.
protected string $_id
Результат string

$_node защищенное свойство

Node.
protected $_node

$_params защищенное свойство

Query parameters.
protected array $_params
Результат array

$_response защищенное свойство

Response.
protected $_response