Package com.carrotsearch.hppc
Class RandomizedHashOrderMixer
java.lang.Object
com.carrotsearch.hppc.RandomizedHashOrderMixer
- All Implemented Interfaces:
HashOrderMixingStrategy,Cloneable
Randomized hash order. Does not guarantee deterministic hash ordering between
runs. In fact, it tries hard to avoid such guarantee.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final RandomizedHashOrderMixerprotected final AtomicLong -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()intnewKeyMixer(int newContainerBufferSize) A new key mixer value.
-
Field Details
-
INSTANCE
-
seedMixer
-
-
Constructor Details
-
RandomizedHashOrderMixer
public RandomizedHashOrderMixer() -
RandomizedHashOrderMixer
public RandomizedHashOrderMixer(long seed)
-
-
Method Details
-
newKeyMixer
public int newKeyMixer(int newContainerBufferSize) Description copied from interface:HashOrderMixingStrategyA 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:
newKeyMixerin interfaceHashOrderMixingStrategy- Parameters:
newContainerBufferSize-
-
clone
- Specified by:
clonein interfaceHashOrderMixingStrategy- Overrides:
clonein classObject- Returns:
- Return a clone of this strategy. This should use a different mixing because cloned containers should have a different hash ordering.
-