PHP 클래스 Elastica\Node\Info

파일 보기 프로젝트 열기: ruflin/elastica 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_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