Class RoutingNodesHelper

java.lang.Object
org.elasticsearch.cluster.routing.RoutingNodesHelper

public final class RoutingNodesHelper extends Object
  • Method Summary

    Modifier and Type
    Method
    Description
    static Stream<org.elasticsearch.cluster.routing.ShardRouting>
    asStream(org.elasticsearch.cluster.routing.IndexShardRoutingTable indexShardRoutingTable)
    Returns a stream over all ShardRouting in a IndexShardRoutingTable.
    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)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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

      public static List<org.elasticsearch.cluster.routing.ShardRouting> shardsWithState(org.elasticsearch.cluster.routing.RoutingNodes routingNodes, String index, org.elasticsearch.cluster.routing.ShardRoutingState... state)
    • asStream

      public static Stream<org.elasticsearch.cluster.routing.ShardRouting> asStream(org.elasticsearch.cluster.routing.IndexShardRoutingTable indexShardRoutingTable)
      Returns a stream over all ShardRouting in a IndexShardRoutingTable. 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