RotationShardShuffler
public abstract class ShardShuffler
extends java.lang.Object
Constructor | Description |
---|---|
ShardShuffler() |
Modifier and Type | Method | Description |
---|---|---|
abstract int |
nextSeed() |
Return a new seed.
|
java.util.List<ShardRouting> |
shuffle(java.util.List<ShardRouting> shards) |
Equivalent to calling
shuffle(shards, nextSeed()) . |
abstract java.util.List<ShardRouting> |
shuffle(java.util.List<ShardRouting> shards,
int seed) |
Return a shuffled view over the list of shards.
|
public abstract int nextSeed()
public abstract java.util.List<ShardRouting> shuffle(java.util.List<ShardRouting> shards, int seed)
public java.util.List<ShardRouting> shuffle(java.util.List<ShardRouting> shards)
shuffle(shards, nextSeed())
.