org.apache.cassandra.utils

## Class BloomFilter

- java.lang.Object
- - org.apache.cassandra.utils.BloomFilter

- All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, IFilter
  Direct Known Subclasses:
    Murmur2BloomFilter, Murmur3BloomFilter

      public abstract class BloomFilter
      extends java.lang.Object
      implements IFilter

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `IBitSet` | `bitset`
    `int` | `hashCount`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `add(java.nio.ByteBuffer key)`
    `void` | `clear()`
    `void` | `close()`
    `protected abstract long[]` | `hash(java.nio.ByteBuffer b, int position, int remaining, long seed)`
    `boolean` | `isPresent(java.nio.ByteBuffer key)`

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

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

- - ### Field Detail

    - #### bitset

          public final IBitSet bitset

    - #### hashCount

          public final int hashCount

  - ### Method Detail

    - #### hash

          protected abstract long[] hash(java.nio.ByteBuffer b,
                    int position,
                    int remaining,
                    long seed)

    - #### add

          public void add(java.nio.ByteBuffer key)

      Specified by:
        `add` in interface `IFilter`

    - #### isPresent

          public boolean isPresent(java.nio.ByteBuffer key)

      Specified by:
        `isPresent` in interface `IFilter`

    - #### clear

          public void clear()

      Specified by:
        `clear` in interface `IFilter`

    - #### close

          public void close()
                     throws java.io.IOException

      Specified by:
        `close` in interface `java.io.Closeable`
      Specified by:
        `close` in interface `java.lang.AutoCloseable`
      Throws:
        `java.io.IOException`

Copyright © 2014 The Apache Software Foundation