\Elastica\ClusterSettings

Cluster settings.

Summary

Methods
Properties
Constants
__construct()
get()
getPersistent()
getTransient()
setPersistent()
setTransient()
setReadOnly()
set()
getClient()
request()
No public properties found
No constants found
No protected methods found
$_client
N/A
No private methods found
No private properties found
N/A

Properties

Methods

__construct()

__construct(\Elastica\Client  $client) 

Creates a cluster object.

Parameters

\Elastica\Client $client

Connection client object

get()

get() : array

Returns settings data.

Returns

array —

Settings data (persistent and transient)

getPersistent()

getPersistent(string  $setting = '') : array|string|null

Returns the current persistent settings of the cluster.

If param is set, only specified setting is return.

Parameters

string $setting

OPTIONAL Setting name to return

Returns

array|string|null —

Settings data

getTransient()

getTransient(string  $setting = '') : array|string|null

Returns the current transient settings of the cluster.

If param is set, only specified setting is return.

Parameters

string $setting

OPTIONAL Setting name to return

Returns

array|string|null —

Settings data

setPersistent()

setPersistent(string  $key, string  $value) : \Elastica\Response

Sets persistent setting.

Parameters

string $key
string $value

Returns

\Elastica\Response

setTransient()

setTransient(string  $key, string  $value) : \Elastica\Response

Sets transient settings.

Parameters

string $key
string $value

Returns

\Elastica\Response

setReadOnly()

setReadOnly(boolean  $readOnly = true, boolean  $persistent = false) : \Elastica\Response

Sets the cluster to read only.

Second param can be used to set it persistent

Parameters

boolean $readOnly
boolean $persistent

Returns

\Elastica\Response

$response

set()

set(array  $settings) : \Elastica\Response

Set settings for cluster.

Parameters

array $settings

Raw settings (including persistent or transient)

Returns

\Elastica\Response

getClient()

getClient() : \Elastica\Client

Get the client.

Returns

\Elastica\Client

request()

request(array  $data = array(), string  $method = \Elastica\Request::GET) : \Elastica\Response

Sends settings request.

Parameters

array $data

OPTIONAL Data array

string $method

OPTIONAL Transfer method (default = \Elastica\Request::GET)

Returns

\Elastica\Response

Response object