public List<ShardRouting> allShards(String index){
  List<ShardRouting> shards=new ArrayList<>();
  IndexRoutingTable indexRoutingTable=index(index);
  if (indexRoutingTable == null) {
    throw new IndexNotFoundException(index);
  }
  for (  IndexShardRoutingTable indexShardRoutingTable : indexRoutingTable) {
    for (    ShardRouting shardRouting : indexShardRoutingTable) {
      shards.add(shardRouting);
    }
  }
  return shards;
}

public List < ShardRouting > allShards ( String index ) { List < ShardRouting > shards = new ArrayList < > ( ) ; IndexRoutingTable indexRoutingTable = index ( index ) ; if ( indexRoutingTable == null ) { throw new IndexNotFoundException ( index ) ; } for ( IndexShardRoutingTable indexShardRoutingTable : indexRoutingTable ) { for ( ShardRouting shardRouting : indexShardRoutingTable ) { shards . add ( shardRouting ) ; } } return shards ; }
all the shards ( replicas ) for the provided index .
