public class RotationShardShuffler extends ShardShuffler
ShardShuffler implementation that uses an AtomicInteger to generate seeds and uses a rotation to permute shards.| Constructor | Description |
|---|---|
RotationShardShuffler(int seed) |
| Modifier and Type | Method | 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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitshufflepublic int nextSeed()
ShardShufflernextSeed in class ShardShufflerpublic java.util.List<ShardRouting> shuffle(java.util.List<ShardRouting> shards, int seed)
ShardShufflershuffle in class ShardShuffler