Class RoutingNodesHelper
java.lang.Object
org.elasticsearch.cluster.routing.RoutingNodesHelper
-
Method Summary
Modifier and TypeMethodDescriptionstatic Stream<org.elasticsearch.cluster.routing.ShardRouting>asStream(org.elasticsearch.cluster.routing.IndexShardRoutingTable indexShardRoutingTable) Returns a stream over allShardRoutingin aIndexShardRoutingTable.static List<org.elasticsearch.cluster.routing.ShardRouting>shardsWithState(org.elasticsearch.cluster.routing.RoutingNodes routingNodes, String index, org.elasticsearch.cluster.routing.ShardRoutingState... state) static List<org.elasticsearch.cluster.routing.ShardRouting>shardsWithState(org.elasticsearch.cluster.routing.RoutingNodes routingNodes, org.elasticsearch.cluster.routing.ShardRoutingState... state)
-
Method Details
-
shardsWithState
public static List<org.elasticsearch.cluster.routing.ShardRouting> shardsWithState(org.elasticsearch.cluster.routing.RoutingNodes routingNodes, org.elasticsearch.cluster.routing.ShardRoutingState... state) -
shardsWithState
-
asStream
public static Stream<org.elasticsearch.cluster.routing.ShardRouting> asStream(org.elasticsearch.cluster.routing.IndexShardRoutingTable indexShardRoutingTable) Returns a stream over allShardRoutingin aIndexShardRoutingTable. This is not part of production code on purpose as its too costly to iterate the table like this in many production use cases.- Parameters:
indexShardRoutingTable- index shard routing table to iterate over- Returns:
- stream over
ShardRouting
-