Package org.apache.cassandra.utils
Class FilterFactory
- java.lang.Object
-
- org.apache.cassandra.utils.FilterFactory
-
public class FilterFactory extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static IFilter
AlwaysPresent
-
Constructor Summary
Constructors Constructor Description FilterFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static IFilter
getFilter(long numElements, double maxFalsePosProbability)
static IFilter
getFilter(long numElements, int targetBucketsPerElem)
-
-
-
Field Detail
-
AlwaysPresent
public static final IFilter AlwaysPresent
-
-
Method Detail
-
getFilter
public static IFilter getFilter(long numElements, int targetBucketsPerElem)
- Returns:
- A BloomFilter with the lowest practical false positive probability for the given number of elements.
-
getFilter
public static IFilter getFilter(long numElements, double maxFalsePosProbability)
- Returns:
- The smallest BloomFilter 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.
-
-