static interface BloomFilter.Strategy
extends java.io.Serializable
numHashFunctions
bit indexes.
Implementations should be collections of pure functions (i.e. stateless).
Modifier and Type | Method and Description |
---|---|
<T> boolean |
mightContain(T object,
Funnel<? super T> funnel,
int numHashFunctions,
BloomFilterStrategies.BitArray bits)
Queries
numHashFunctions bits of the given bit array, by hashing a user element;
returns true if and only if all selected bits are set. |
int |
ordinal()
Identifier used to encode this strategy, when marshalled as part of a BloomFilter.
|
<T> boolean |
put(T object,
Funnel<? super T> funnel,
int numHashFunctions,
BloomFilterStrategies.BitArray bits)
Sets
numHashFunctions bits of the given bit array, by hashing a user element. |
<T> boolean put(T object, Funnel<? super T> funnel, int numHashFunctions, BloomFilterStrategies.BitArray bits)
numHashFunctions
bits of the given bit array, by hashing a user element.
Returns whether any bits changed as a result of this operation.
<T> boolean mightContain(T object, Funnel<? super T> funnel, int numHashFunctions, BloomFilterStrategies.BitArray bits)
numHashFunctions
bits of the given bit array, by hashing a user element;
returns true
if and only if all selected bits are set.int ordinal()