BloomFilter (apache-cassandra API)
Date: 2018-02-12

org.apache.cassandra.utils

## Class BloomFilter

- java.lang.Object
- - org.apache.cassandra.utils.concurrent.SharedCloseableImpl
  - - org.apache.cassandra.utils.concurrent.WrappedSharedCloseable
    - - org.apache.cassandra.utils.BloomFilter

- All Implemented Interfaces:
    java.lang.AutoCloseable, SharedCloseable, IFilter

      public class BloomFilter
      extends WrappedSharedCloseable
      implements IFilter

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.apache.cassandra.utils.IFilter

      `IFilter.FilterKey`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `IBitSet` | `bitset`
    `int` | `hashCount`
    `static org.apache.cassandra.utils.BloomFilterSerializer` | `serializer`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `add(IFilter.FilterKey key)`
    `void` | `clear()`
    `long[]` | `getHashBuckets(IFilter.FilterKey key, int hashCount, long max)`
    `boolean` | `isPresent(IFilter.FilterKey key)`
    `long` | `offHeapSize()` Returns the amount of memory in bytes used off heap.
    `long` | `serializedSize()`
    `IFilter` | `sharedCopy()`

    - ### Methods inherited from class org.apache.cassandra.utils.concurrent.SharedCloseableImpl

      `close, close, isCleanedUp`

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

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

    - ### Methods inherited from interface org.apache.cassandra.utils.IFilter

      `close`

    - ### Methods inherited from interface org.apache.cassandra.utils.concurrent.SharedCloseable

      `close`

- - ### Field Detail

    - #### bitset

          public final IBitSet bitset

    - #### hashCount

          public final int hashCount

    - #### serializer

          public static final org.apache.cassandra.utils.BloomFilterSerializer serializer

  - ### Method Detail

    - #### serializedSize

          public long serializedSize()

      Specified by:
        `serializedSize` in interface `IFilter`

    - #### getHashBuckets

          public long[] getHashBuckets(IFilter.FilterKey key,
                                       int hashCount,
                                       long max)

    - #### add

          public void add(IFilter.FilterKey key)

      Specified by:
        `add` in interface `IFilter`

    - #### isPresent

          public final boolean isPresent(IFilter.FilterKey key)

      Specified by:
        `isPresent` in interface `IFilter`

    - #### clear

          public void clear()

      Specified by:
        `clear` in interface `IFilter`

    - #### sharedCopy

          public IFilter sharedCopy()

      Specified by:
        `sharedCopy` in interface `SharedCloseable`
      Specified by:
        `sharedCopy` in interface `IFilter`
      Returns:
        a new instance of the object representing the same state and backed by the same underlying resources. Coordinates with the original (and other instances) when the underlying resource should be closed. Throws an exception if the shared resource has already been closed.

    - #### offHeapSize

          public long offHeapSize()

      Description copied from interface: `IFilter`
      Returns the amount of memory in bytes used off heap.
      Specified by:
        `offHeapSize` in interface `IFilter`
      Returns:
        the amount of memory in bytes used off heap

Copyright © 2018 The Apache Software Foundation