Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cassandra.utils
Class LegacyBloomFilter

    java.lang.Object
      org.apache.cassandra.utils.Filter
          org.apache.cassandra.utils.LegacyBloomFilter

    public class LegacyBloomFilter

extends Filter

Method Summary
`void` | `add(java.nio.ByteBuffer key)`
`static LegacyBloomFilter` | `alwaysMatchingBloomFilter()`
`void` | `clear()`
`java.util.BitSet` | `getBitSet()`
`static LegacyBloomFilter` | `getFilter(long numElements, double maxFalsePosProbability)`
`static LegacyBloomFilter` | `getFilter(long numElements, int targetBucketsPerElem)`
`int[]` | `getHashBuckets(java.nio.ByteBuffer key)`
`boolean` | `isPresent(java.nio.ByteBuffer key)`
`static LegacyBloomFilterSerializer` | `serializer()`
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Method Detail

### serializer

    public static LegacyBloomFilterSerializer serializer()

### getFilter

    public static LegacyBloomFilter getFilter(long numElements,
                                              int targetBucketsPerElem)

  Returns:
    A LegacyBloomFilter with the lowest practical false positive probability for the given number of elements.

### getFilter

    public static LegacyBloomFilter getFilter(long numElements,
                                              double maxFalsePosProbability)

  Returns:
    The smallest LegacyBloomFilter 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.

### clear

    public void clear()

### isPresent

    public boolean isPresent(java.nio.ByteBuffer key)

  Specified by:
    `isPresent` in class `Filter`

### add

    public void add(java.nio.ByteBuffer key)

  Specified by:
    `add` in class `Filter`

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

### alwaysMatchingBloomFilter

    public static LegacyBloomFilter alwaysMatchingBloomFilter()

  Returns:
    a LegacyBloomFilter that always returns a positive match, for testing

### getHashBuckets

    public int[] getHashBuckets(java.nio.ByteBuffer key)

### getBitSet

    public java.util.BitSet getBitSet()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2013 The Apache Software Foundation