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.
|
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