Class ShardShuffler

org.elasticsearch.cluster.routing.ShardShuffler
Direct Known Subclasses:
RotationShardShuffler

public abstract class ShardShuffler extends
A shuffler for shards whose primary goal is to balance load.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract int
    Return a new seed.
    <ShardRouting> shards)
    Equivalent to calling shuffle(shards, nextSeed()).
    abstract <ShardRouting>
    <ShardRouting> shards, int seed)
    Return a shuffled view over the list of shards.

    Methods inherited from class java.lang.

    , , , , , , , , , ,
  • Constructor Details

    • ShardShuffler

      public ShardShuffler()
  • Method Details

    • nextSeed

      public abstract int nextSeed()
      Return a new seed.
    • shuffle

      public abstract <<ShardRouting> shards, int seed)
      Return a shuffled view over the list of shards. The behavior of this method must be deterministic: if the same list and the same seed are provided twice, then the result needs to be the same.
    • shuffle

      public <<ShardRouting> shards)
      Equivalent to calling shuffle(shards, nextSeed()).