Package com.carrotsearch.hppc
Class HashOrderMixing
- java.lang.Object
-
- com.carrotsearch.hppc.HashOrderMixing
-
public final class HashOrderMixing extends java.lang.Object
Factory methods to acquire the most common types ofHashOrderMixingStrategy
.- See Also:
HashOrderMixingStrategy
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HashOrderMixing.Strategy
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
PROPERTY_BIT_MIXER
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static HashOrderMixingStrategy
constant(long seed)
A constantHashOrderMixingStrategy
.static HashOrderMixingStrategy
defaultStrategy()
Returns the currently configured defaultHashOrderMixingStrategy
.static HashOrderMixingStrategy
deterministic()
Deprecated.Permanently deprecated as a warning signal.static HashOrderMixingStrategy
none()
Deprecated.Permanently deprecated as a warning signal.static HashOrderMixingStrategy
randomized()
Returns a randomizedHashOrderMixingStrategy
that issues unique per-container seed.
-
-
-
Field Detail
-
PROPERTY_BIT_MIXER
public static final java.lang.String PROPERTY_BIT_MIXER
- See Also:
- Constant Field Values
-
-
Method Detail
-
randomized
public static HashOrderMixingStrategy randomized()
Returns a randomizedHashOrderMixingStrategy
that issues unique per-container seed. This minimizes the chances of hash distribution conflicts.
-
constant
public static HashOrderMixingStrategy constant(long seed)
A constantHashOrderMixingStrategy
. This is useful if one needs to have deterministic key distribution but wishes to control it manually. Do not use the same constant for more than one container. Consider using scatter maps or sets instead of constant hash order mixer.
-
deterministic
@Deprecated public static HashOrderMixingStrategy deterministic()
Deprecated.Permanently deprecated as a warning signal.DeterministicHashOrderMixingStrategy
will reorder keys depending on the size of the container's buffer. This is inherently unsafe with hash containers using linear conflict addressing. The only use case when this can be useful is to count/ collect unique keys (for which scatter tables should be used).
-
none
@Deprecated public static HashOrderMixingStrategy none()
Deprecated.Permanently deprecated as a warning signal.This strategy does not change the hash order of keys at all. This is inherently unsafe with hash containers using linear conflict addressing. The only use case when this can be useful is to count/ collect unique keys (for which scatter tables should be used).
-
defaultStrategy
public static HashOrderMixingStrategy defaultStrategy()
Returns the currently configured defaultHashOrderMixingStrategy
.
-
-