Class RandomizedHashOrderMixer

java.lang.Object
com.carrotsearch.hppc.RandomizedHashOrderMixer
All Implemented Interfaces:
HashOrderMixingStrategy, Cloneable

public final class RandomizedHashOrderMixer extends Object implements HashOrderMixingStrategy
Randomized hash order. Does not guarantee deterministic hash ordering between runs. In fact, it tries hard to avoid such guarantee.
  • Field Details

  • Constructor Details

    • RandomizedHashOrderMixer

      public RandomizedHashOrderMixer()
    • RandomizedHashOrderMixer

      public RandomizedHashOrderMixer(long seed)
  • Method Details

    • newKeyMixer

      public int newKeyMixer(int newContainerBufferSize)
      Description copied from interface: HashOrderMixingStrategy
      A new key mixer value. The value can be derived from the new buffer size of the container, but preferably should be random and unique.
      Specified by:
      newKeyMixer in interface HashOrderMixingStrategy
      Parameters:
      newContainerBufferSize -
    • clone

      public HashOrderMixingStrategy clone()
      Specified by:
      clone in interface HashOrderMixingStrategy
      Overrides:
      clone in class Object
      Returns:
      Return a clone of this strategy. This should use a different mixing because cloned containers should have a different hash ordering.