@ThreadSafe public final class ConcurrentRollingBloomFilter<T> extends Object implements BloomFilter<T>
addAll(Collection)
method, or by using some external synchronisation mechanism to perform pre-emptive
locking (at the cost of reducing read performance).Modifier and Type | Method and Description |
---|---|
void |
add(T element)
Adds the specified element to this set if it is not already possibly present.
|
void |
addAll(Collection<? extends T> elements)
Adds all of the specified elements to this set if they are not possibly already present.
|
BloomFilterStatistics |
getStatistics()
Gets a snapshot of the current statistics of the set.
|
boolean |
mightContain(T element)
Checks if the given element might be a member of this set.
|
String |
toString() |
public void add(T element)
BloomFilter
BloomFilter.mightContain(Object)
will return true
for the same object.add
in interface BloomFilter<T>
element
- the element to add to this set.public void addAll(Collection<? extends T> elements)
BloomFilter
addAll
in interface BloomFilter<T>
elements
- the elements to add to the set.public boolean mightContain(T element)
BloomFilter
false
, then
the given object is definitely not a member of the set. If the result is true
then the object may or
may not be a member of this set, with a certain probability of false positives.mightContain
in interface BloomFilter<T>
element
- the element to check for membership in this set.false
if the element is definitely not in the set, or true
if it might be.public BloomFilterStatistics getStatistics()
BloomFilter
getStatistics
in interface BloomFilter<T>
Copyright © 2025 Open Identity Platform Community. All rights reserved.