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 and Description
    --- | ---
    `static IFilter` | `AlwaysPresent`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FilterFactory()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static IFilter` | `deserialize(java.io.DataInput input, boolean offheap)`
    `static IFilter` | `getFilter(long numElements, double maxFalsePosProbability, boolean offheap)`
    `static IFilter` | `getFilter(long numElements, int targetBucketsPerElem, boolean offheap)`
    `static void` | `serialize(IFilter bf, DataOutputPlus output)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### AlwaysPresent

          public static final IFilter AlwaysPresent

  - ### Constructor Detail

    - #### FilterFactory

          public FilterFactory()

  - ### Method Detail

    - #### serialize

          public static void serialize(IFilter bf,
                                       DataOutputPlus output)
                                throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### deserialize

          public static IFilter deserialize(java.io.DataInput input,
                                            boolean offheap)
                                     throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### getFilter

          public static IFilter getFilter(long numElements,
                                          int targetBucketsPerElem,
                                          boolean offheap)

      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,
                                          boolean offheap)

      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.

Copyright © 2018 The Apache Software Foundation