public class Cluster
extends java.lang.Object
| Constructor and Description |
|---|
Cluster(org.elasticsearch.node.Node node,
Deflector deflector) |
| Modifier and Type | Method and Description |
|---|---|
int |
getActiveShards() |
java.util.List<org.elasticsearch.action.admin.cluster.node.info.NodeInfo> |
getAllNodes() |
java.util.List<org.elasticsearch.action.admin.cluster.node.info.NodeInfo> |
getDataNodes() |
org.elasticsearch.action.admin.cluster.health.ClusterHealthStatus |
getHealth() |
int |
getInitializingShards() |
java.lang.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. |
java.lang.String |
nodeIdToHostName(java.lang.String nodeId) |
java.lang.String |
nodeIdToName(java.lang.String nodeId) |
@Inject
public Cluster(org.elasticsearch.node.Node node,
Deflector deflector)
public java.lang.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 java.util.List<org.elasticsearch.action.admin.cluster.node.info.NodeInfo> getDataNodes()
public java.util.List<org.elasticsearch.action.admin.cluster.node.info.NodeInfo> getAllNodes()
public java.lang.String nodeIdToName(java.lang.String nodeId)
public java.lang.String nodeIdToHostName(java.lang.String nodeId)
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.