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, wait
shuffle
public int nextSeed()
ShardShuffler
nextSeed
in class ShardShuffler
public java.util.List<ShardRouting> shuffle(java.util.List<ShardRouting> shards, int seed)
ShardShuffler
shuffle
in class ShardShuffler