public class BloomFilter extends Object
| 限定符和类型 | 类和说明 |
|---|---|
static class |
BloomFilter.Builder
Bloom filter based on one memory segment.
|
| 限定符和类型 | 字段和说明 |
|---|---|
protected BitSet |
bitSet |
protected long |
expectedEntries |
protected int |
numHashFunctions |
| 构造器和说明 |
|---|
BloomFilter(long expectedEntries,
int byteSize) |
| 限定符和类型 | 方法和说明 |
|---|---|
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() |
protected BitSet bitSet
protected long expectedEntries
protected int numHashFunctions
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.