add iterator based on specific index
This commit is contained in:
parent
96dfdcf97c
commit
3192654e80
|
@ -103,6 +103,10 @@ public class IndexShardRoutingTable implements Iterable<ShardRouting> {
|
||||||
return new PlainShardIterator(shardId, shards);
|
return new PlainShardIterator(shardId, shards);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ShardIterator shardsIt(int index) {
|
||||||
|
return new PlainShardIterator(shardId, shards, index);
|
||||||
|
}
|
||||||
|
|
||||||
public ShardIterator shardsRandomIt() {
|
public ShardIterator shardsRandomIt() {
|
||||||
return new PlainShardIterator(shardId, shards, counter.getAndIncrement());
|
return new PlainShardIterator(shardId, shards, counter.getAndIncrement());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue