public class RotationShardShuffler extends ShardShuffler
ShardShuffler implementation that uses an AtomicInteger to generate seeds and uses a rotation to permute shards.| Constructor and Description |
|---|
RotationShardShuffler(int seed) |
| Modifier and Type | Method and Description |
|---|---|
int |
nextSeed()
Return a new seed.
|
java.util.List<ShardRouting> |
shuffle(java.util.List<ShardRouting> shards,
int seed)
Return a shuffled view over the list of shards.
|
shufflepublic int nextSeed()
ShardShufflernextSeed in class ShardShufflerpublic java.util.List<ShardRouting> shuffle(java.util.List<ShardRouting> shards, int seed)
ShardShufflershuffle in class ShardShuffler