Package 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
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(IFilter.FilterKey key)voidaddTo(Ref.IdentityCollection identities)voidclear()long[]getHashBuckets(IFilter.FilterKey key, int hashCount, long max)booleanisPresent(IFilter.FilterKey key)longoffHeapSize()Returns the amount of memory in bytes used off heap.longserializedSize()IFiltersharedCopy()java.lang.StringtoString()-
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, wait, wait, wait
-
Methods inherited from interface org.apache.cassandra.utils.concurrent.SharedCloseable
close
-
-
-
-
Field Detail
-
bitset
public final IBitSet bitset
-
hashCount
public final int hashCount
-
-
Method Detail
-
serializedSize
public long serializedSize()
- Specified by:
serializedSizein interfaceIFilter
-
getHashBuckets
public long[] getHashBuckets(IFilter.FilterKey key, int hashCount, long max)
-
add
public void add(IFilter.FilterKey key)
-
isPresent
public final boolean isPresent(IFilter.FilterKey key)
-
sharedCopy
public IFilter sharedCopy()
- Specified by:
sharedCopyin interfaceIFilter- Specified by:
sharedCopyin interfaceSharedCloseable- 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:IFilterReturns the amount of memory in bytes used off heap.- Specified by:
offHeapSizein interfaceIFilter- Returns:
- the amount of memory in bytes used off heap
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
addTo
public void addTo(Ref.IdentityCollection identities)
- Specified by:
addToin interfaceSharedCloseable- Overrides:
addToin classSharedCloseableImpl
-
-