include/SugarSearchEngine/Elastic/Elastica/Cluster.php
Cluster informations for elasticsearch
- Author
- Nicolas Ruflin
- Category
- Xodoa
- Link
- http://www.elasticsearch.com/docs/elasticsearch/rest_api/admin/cluster
- Package
- Elastica
\Elastica_Cluster
Package: Elastica
Cluster informations for elasticsearch
- Author
- Nicolas Ruflin
- Category
- Xodoa
- Link
- http://www.elasticsearch.com/docs/elasticsearch/rest_api/admin/cluster
Properties
Methods

__construct(
\Elastica_Client $client
)
:
voidCreates a cluster object
Parameters
| Name | Type | Description |
|---|---|---|
| $client | \Elastica_Client | Connection client object |

getClient(
)
:
\Elastica_ClientReturns the client object
Returns
| Type | Description |
|---|---|
| \Elastica_Client | Client object |

getHealth(
array $args
=
array()
)
:
void
Parameters
Details
| Name | Type | Description |
|---|---|---|
| $args | array | OPTIONAL |

getInfo(
array $args
)
:
voidReturns the cluster information (not implemented yet)
Parameters
Details
| Name | Type | Description |
|---|---|---|
| $args | array | Additional arguemtns |

getNodeNames(
)
:
arrayReturns a list of existing node names
Returns
| Type | Description |
|---|---|
| array | List of node names |

getNodes(
)
:
arrayReturns all nodes of the cluster
Returns
| Type | Description |
|---|---|
| array | List of Elastica_Node objects |

getResponse(
)
:
\Elastica_ResponseReturns the response object
Returns
| Type | Description |
|---|---|
| \Elastica_Response | Response object |

getState(
)
:
arrayReturns the full state of the cluster
Returns
Details
| Type | Description |
|---|---|
| array | State array |

shutdown(
string $delay
=
'1s'
)
:
\Elastica_ResponseShuts down the complete cluster
Parameters
Returns
Details
| Name | Type | Description |
|---|---|---|
| $delay | string | OPTIONAL Seconds to shutdown cluster after (default = 1s) |
| Type | Description |
|---|---|
| \Elastica_Response |