summaryrefslogtreecommitdiff
path: root/core/src/main/java/org/elasticsearch/cluster/routing/RoutingNode.java
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/main/java/org/elasticsearch/cluster/routing/RoutingNode.java')
-rw-r--r--core/src/main/java/org/elasticsearch/cluster/routing/RoutingNode.java17
1 files changed, 10 insertions, 7 deletions
diff --git a/core/src/main/java/org/elasticsearch/cluster/routing/RoutingNode.java b/core/src/main/java/org/elasticsearch/cluster/routing/RoutingNode.java
index 596bb97887..ff6c829342 100644
--- a/core/src/main/java/org/elasticsearch/cluster/routing/RoutingNode.java
+++ b/core/src/main/java/org/elasticsearch/cluster/routing/RoutingNode.java
@@ -20,9 +20,12 @@
package org.elasticsearch.cluster.routing;
import org.elasticsearch.cluster.node.DiscoveryNode;
-import org.elasticsearch.common.collect.Iterators;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
/**
* A {@link RoutingNode} represents a cluster node associated with a single {@link DiscoveryNode} including all shards
@@ -57,7 +60,7 @@ public class RoutingNode implements Iterable<ShardRouting> {
/**
* Returns the nodes {@link DiscoveryNode}.
- *
+ *
* @return discoveryNode of this node
*/
public DiscoveryNode node() {
@@ -65,7 +68,7 @@ public class RoutingNode implements Iterable<ShardRouting> {
}
/**
- * Get the id of this node
+ * Get the id of this node
* @return id of the node
*/
public String nodeId() {
@@ -93,7 +96,7 @@ public class RoutingNode implements Iterable<ShardRouting> {
/**
* Determine the number of shards with a specific state
* @param states set of states which should be counted
- * @return number of shards
+ * @return number of shards
*/
public int numberOfShardsWithState(ShardRoutingState... states) {
int count = 0;
@@ -110,7 +113,7 @@ public class RoutingNode implements Iterable<ShardRouting> {
/**
* Determine the shards with a specific state
* @param states set of states which should be listed
- * @return List of shards
+ * @return List of shards
*/
public List<ShardRouting> shardsWithState(ShardRoutingState... states) {
List<ShardRouting> shards = new ArrayList<>();
@@ -125,7 +128,7 @@ public class RoutingNode implements Iterable<ShardRouting> {
}
/**
- * Determine the shards of an index with a specific state
+ * Determine the shards of an index with a specific state
* @param index id of the index
* @param states set of states which should be listed
* @return a list of shards