@InterfaceAudience.Private public interface BloomFilter extends BloomFilterBase
The Bloom filter is a data structure that was introduced in 1970 and that has been adopted by the networking research community in the past decade thanks to the bandwidth efficiencies that it offers for the transmission of set membership information between networked hosts. A sender encodes the information into a bit vector, the Bloom filter, that is more compact than a conventional representation. Computation and space costs for construction are linear in the number of elements. The receiver uses the filter to test whether various elements are members of the set. Though the filter will occasionally return a false positive, it will never return a false negative. When creating the filter, the sender can choose its desired point in a trade-off between the false positive rate and the size.
Modifier and Type | Method and Description |
---|---|
boolean |
contains(byte[] buf,
int offset,
int length,
ByteBuffer bloom)
Check if the specified key is contained in the bloom filter.
|
boolean |
supportsAutoLoading() |
createBloomKey, getByteSize, getComparator, getKeyCount, getMaxKeys
boolean contains(byte[] buf, int offset, int length, ByteBuffer bloom)
buf
- data to check for existence ofoffset
- offset into the datalength
- length of the databloom
- bloom filter data to search. This can be null if auto-loading
is supported.boolean supportsAutoLoading()
Copyright © 2007-2016 The Apache Software Foundation. All Rights Reserved.