enum BloomFilterStrategies extends java.lang.Enum<BloomFilterStrategies> implements BloomFilter.Strategy
Modifier and Type | Class and Description |
---|---|
(package private) static class |
BloomFilterStrategies.BitArray |
Enum Constant and Description |
---|
MURMUR128_MITZ_32
See "Less Hashing, Same Performance: Building a Better Bloom Filter" by Adam Kirsch and
Michael Mitzenmacher.
|
MURMUR128_MITZ_64
This strategy uses all 128 bits of
Hashing.murmur3_128(int) when hashing. |
Modifier and Type | Method and Description |
---|---|
static BloomFilterStrategies |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static BloomFilterStrategies[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
mightContain, ordinal, put
public static final BloomFilterStrategies MURMUR128_MITZ_32
public static final BloomFilterStrategies MURMUR128_MITZ_64
Hashing.murmur3_128(int)
when hashing. It looks
different than the implementation in MURMUR128_MITZ_32 because we're avoiding the
multiplication in the loop and doing a (much simpler) += hash2. We're also changing the
index to a positive number by AND'ing with Long.MAX_VALUE instead of flipping the bits.public static BloomFilterStrategies[] values()
for (BloomFilterStrategies c : BloomFilterStrategies.values()) System.out.println(c);
public static BloomFilterStrategies valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null