public class BloomFilter extends Object
Modifier and Type | Class and Description |
---|---|
static class |
BloomFilter.Builder
Bloom filter based on one memory segment.
|
Constructor and Description |
---|
BloomFilter(long expectedEntries,
int byteSize) |
Modifier and Type | Method and Description |
---|---|
void |
addHash(int hash1) |
static BloomFilter.Builder |
builder(long expectedRow,
double fpp) |
MemorySegment |
getMemorySegment() |
static int |
optimalNumOfBits(long inputEntries,
double fpp)
Compute optimal bits number with given input entries and expected false positive probability.
|
void |
reset() |
void |
setMemorySegment(MemorySegment memorySegment,
int offset) |
boolean |
testHash(int hash1) |
String |
toString() |
void |
unsetMemorySegment() |
public void setMemorySegment(MemorySegment memorySegment, int offset)
public void unsetMemorySegment()
public MemorySegment getMemorySegment()
public static int optimalNumOfBits(long inputEntries, double fpp)
public void addHash(int hash1)
public boolean testHash(int hash1)
public void reset()
public static BloomFilter.Builder builder(long expectedRow, double fpp)
Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.