public class Cluster extends Object
| Constructor and Description |
|---|
Cluster(org.elasticsearch.node.Node node,
Deflector deflector) |
| Modifier and Type | Method and Description |
|---|---|
int |
getActiveShards() |
List<org.elasticsearch.action.admin.cluster.node.info.NodeInfo> |
getAllNodes() |
List<org.elasticsearch.action.admin.cluster.node.info.NodeInfo> |
getDataNodes() |
org.elasticsearch.action.admin.cluster.health.ClusterHealthStatus |
getHealth() |
int |
getInitializingShards() |
String |
getName() |
int |
getNumberOfNodes() |
int |
getRelocatingShards() |
int |
getUnassignedShards() |
boolean |
isConnectedAndHealthy()
Check if the Elasticsearch
Node is connected and that the cluster health status
is not ClusterHealthStatus.RED. |
String |
nodeIdToHostName(String nodeId) |
String |
nodeIdToName(String nodeId) |
@Inject
public Cluster(org.elasticsearch.node.Node node,
Deflector deflector)
public String getName()
public org.elasticsearch.action.admin.cluster.health.ClusterHealthStatus getHealth()
public int getActiveShards()
public int getInitializingShards()
public int getUnassignedShards()
public int getRelocatingShards()
public int getNumberOfNodes()
public List<org.elasticsearch.action.admin.cluster.node.info.NodeInfo> getDataNodes()
public List<org.elasticsearch.action.admin.cluster.node.info.NodeInfo> getAllNodes()
public boolean isConnectedAndHealthy()
Node is connected and that the cluster health status
is not ClusterHealthStatus.RED.true if the Elasticsearch client is up and the cluster is healthy, false otherwiseCopyright © 2012-2014 TORCH GmbH. All Rights Reserved.