org.apache.cassandra.utils
Class FilterFactory
java.lang.Object
org.apache.cassandra.utils.FilterFactory
public class FilterFactory
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FilterFactory
public FilterFactory()
serialize
public static void serialize(Filter bf,
java.io.DataOutput output)
throws java.io.IOException
- Throws:
java.io.IOException
serialize
public static void serialize(Filter bf,
java.io.DataOutput output,
FilterFactory.Type type)
throws java.io.IOException
- Throws:
java.io.IOException
deserialize
public static Filter deserialize(java.io.DataInput input,
FilterFactory.Type type)
throws java.io.IOException
- Throws:
java.io.IOException
serializedSize
public static long serializedSize(Filter bf)
serializedSize
public static long serializedSize(Filter bf,
FilterFactory.Type type)
getFilter
public static Filter getFilter(long numElements,
int targetBucketsPerElem)
- Returns:
- A BloomFilter with the lowest practical false positive
probability for the given number of elements.
getFilter
public static Filter 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.
emptyFilter
public static BloomFilter emptyFilter()
Copyright © 2012 The Apache Software Foundation