public static interface KeySelector.BitSelector
Bit selectors are used to determine which bits in a key should be examined or set when performing Bloom filter operations. Each bit offset represents a specific bit position within the key that will be used by one of the k hash functions in the Bloom filter.
The bit selection algorithm extracts k bit positions from the key, where each bit position corresponds to a specific hash function's target bit in the filter's bit array. This enables efficient mapping from key data to Bloom filter bit positions.
Implementations must be thread-safe as they may be used concurrently by multiple threads accessing the same Bloom filter.
| Modifier and Type | Method and Description |
|---|---|
void |
getBitSelectors(byte[] b,
int offset,
int length,
int[] bitOffset)
Extracts k bit offsets from a key for Bloom filter operations.
|
void getBitSelectors(byte[] b,
int offset,
int length,
int[] bitOffset)
This method populates the provided bitOffset array with k integer values, each representing a bit position within the key that should be used by a hash function. The bit positions are calculated based on the key data and the specific bit selection algorithm.
The offset and length parameters allow processing of subsets of the key data, enabling flexible key handling for different key sizes and Bloom filter configurations.
b - the key data as byte arrayoffset - starting position within the key arraylength - number of bytes to process from the keybitOffset - output array of length k to store calculated bit offsets