org.apache.cassandra.utils
Class LegacyBloomFilter
java.lang.Object
org.apache.cassandra.utils.Filter
org.apache.cassandra.utils.LegacyBloomFilter
public class LegacyBloomFilter
- extends Filter
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
serializer
public static LegacyBloomFilterSerializer serializer()
getFilter
public static LegacyBloomFilter getFilter(long numElements,
int targetBucketsPerElem)
- Returns:
- A LegacyBloomFilter with the lowest practical false positive probability
for the given number of elements.
getFilter
public static LegacyBloomFilter getFilter(long numElements,
double maxFalsePosProbability)
- Returns:
- The smallest LegacyBloomFilter that can provide the given false positive
probability rate for the given number of elements.
Asserts that the given probability can be satisfied using this filter.
clear
public void clear()
isPresent
public boolean isPresent(java.nio.ByteBuffer key)
- Specified by:
isPresent
in class Filter
add
public void add(java.nio.ByteBuffer key)
- Specified by:
add
in class Filter
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
alwaysMatchingBloomFilter
public static LegacyBloomFilter alwaysMatchingBloomFilter()
- Returns:
- a LegacyBloomFilter that always returns a positive match, for testing
getHashBuckets
public int[] getHashBuckets(java.nio.ByteBuffer key)
getBitSet
public java.util.BitSet getBitSet()
Copyright © 2012 The Apache Software Foundation