org.apache.cassandra.utils
Class BloomFilter

java.lang.Object
  extended by org.apache.cassandra.utils.BloomFilter
All Implemented Interfaces:
java.io.Closeable, IFilter
Direct Known Subclasses:
Murmur2BloomFilter, Murmur3BloomFilter

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


Field Summary
 IBitSet bitset
           
 int hashCount
           
 
Method Summary
 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
Throws:
java.io.IOException


Copyright © 2013 The Apache Software Foundation