public interface BloomFilter
| Modifier and Type | Interface and Description |
|---|---|
static class |
BloomFilter.Algorithm |
static class |
BloomFilter.Compression |
static class |
BloomFilter.HashStrategy |
| Modifier and Type | Method and Description |
|---|---|
default boolean |
canMergeFrom(BloomFilter otherBloomFilter)
Determines whether a given Bloom filter can be merged into this Bloom filter.
|
boolean |
equals(Object object)
Compare this Bloom filter to the specified object.
|
boolean |
findHash(long hash)
Determine whether an element is in set or not.
|
BloomFilter.Algorithm |
getAlgorithm()
Return the algorithm that the bloom filter apply.
|
int |
getBitsetSize()
Get the number of bytes for bitset in this Bloom filter.
|
BloomFilter.Compression |
getCompression()
Return the compress algorithm that the bloom filter apply.
|
BloomFilter.HashStrategy |
getHashStrategy()
Return the hash strategy that the bloom filter apply.
|
long |
hash(Binary value)
Compute hash for Binary value by using its plain encoding result.
|
long |
hash(double value)
Compute hash for double value by using its plain encoding result.
|
long |
hash(float value)
Compute hash for float value by using its plain encoding result.
|
long |
hash(int value)
Compute hash for int value by using its plain encoding result.
|
long |
hash(long value)
Compute hash for long value by using its plain encoding result.
|
long |
hash(Object value)
Compute hash for Object value by using its plain encoding result.
|
void |
insertHash(long hash)
Insert an element to the Bloom filter, the element content is represented by
the hash value of its plain encoding result.
|
default void |
merge(BloomFilter otherBloomFilter)
Merges this Bloom filter with another Bloom filter by performing a bitwise OR of the underlying bitsets
|
void |
writeTo(OutputStream out)
Write the Bloom filter to an output stream.
|
void writeTo(OutputStream out) throws IOException
out - the output stream to writeIOExceptionvoid insertHash(long hash)
hash - the hash result of element.boolean findHash(long hash)
hash - the hash value of element plain encoding result.int getBitsetSize()
boolean equals(Object object)
long hash(int value)
value - the value to hashlong hash(long value)
value - the value to hashlong hash(double value)
value - the value to hashlong hash(float value)
value - the value to hashlong hash(Binary value)
value - the value to hashlong hash(Object value)
value - the value to hashBloomFilter.HashStrategy getHashStrategy()
BloomFilter.Algorithm getAlgorithm()
BloomFilter.Compression getCompression()
default boolean canMergeFrom(BloomFilter otherBloomFilter)
otherBloomFilter - The Bloom filter to merge this Bloom filter with.default void merge(BloomFilter otherBloomFilter) throws IOException
otherBloomFilter - The Bloom filter to merge this Bloom filter with.IOExceptionCopyright © 2024 The Apache Software Foundation. All rights reserved.