pub struct ConcurrentBloomInterval<T: BloomHashIndex> { /* private fields */ }This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
Expand description
Wrapper around ConcurrentBloom and AtomicInterval so the bloom filter
can be cleared periodically.
Implementations§
Source§impl<T: BloomHashIndex> ConcurrentBloomInterval<T>
impl<T: BloomHashIndex> ConcurrentBloomInterval<T>
Sourcepub fn new(num_items: usize, false_positive_rate: f64, max_bits: usize) -> Self
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn new(num_items: usize, false_positive_rate: f64, max_bits: usize) -> Self
This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
Create a new filter with the given parameters.
See Bloom::random for details.
Sourcepub fn maybe_reset(&self, reset_interval_ms: u64)
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn maybe_reset(&self, reset_interval_ms: u64)
This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
Reset the filter if the reset interval has elapsed.
Methods from Deref<Target = ConcurrentBloom<T>>§
Sourcepub fn add(&self, key: &T) -> bool
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn add(&self, key: &T) -> bool
This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
Adds an item to the bloom filter and returns true if the item was not in the filter before.
pub fn contains(&self, key: &T) -> bool
This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
pub fn clear(&self)
This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.