public static class BloomFilters.BloomFilterBuilder<T> extends Object
Modifier and Type | Method and Description |
---|---|
BloomFilter<T> |
build()
Builds the bloom filter with the configured options.
|
BloomFilters.RollingBloomFilterBuilder<T> |
rolling()
Forces the bloom filter to be a Rolling Bloom Filter, which is a variant on Scalable Bloom Filters where
elements in the bloom filter can expire allowing space to be reclaimed.
|
BloomFilters.ScalableBloomFilterBuilder<T> |
scalable()
Forces the bloom filter to be a Scalable Bloom Filter which can expand to arbitrary capacity.
|
BloomFilters.ScalableBloomFilterBuilder<T> |
withCapacityGrowthFactor(double growthFactor)
The factor by which to increase the capacity of the bloom filter when it exceeds the initial capacity.
|
BloomFilters.BloomFilterBuilder<T> |
withConcurrencyStrategy(ConcurrencyStrategy strategy)
Sets the strategy to use for managing thread-safety in the bloom filter.
|
BloomFilters.RollingBloomFilterBuilder<T> |
withExpiryStrategy(ExpiryStrategy<T> expiryStrategy)
Strategy for determining when elements of a rolling bloom filter have expired.
|
BloomFilters.BloomFilterBuilder<T> |
withFalsePositiveProbability(double fpp)
Specifies the overall probability of false positives that this bloom filter should achieve.
|
BloomFilters.ScalableBloomFilterBuilder<T> |
withFalsePositiveProbabilityScaleFactor(double scaleFactor)
The factor by which to reduce the probability of false positives when expanding a scalable/rolling bloom
filter.
|
BloomFilters.BloomFilterBuilder<T> |
withInitialCapacity(int capacity)
Specifies the initial capacity of the bloom filter.
|
BloomFilters.ScalableBloomFilterBuilder<T> |
withMaximumNumberOfBuckets(int maximumNumberOfBuckets)
Sets the maximum number of buckets to create before throwing an exception indicating the maximum capacity
has been reached.
|
BloomFilters.BloomFilterBuilder<T> |
withWriteBatchSize(int batchSize)
Enables batching of writes to the bloom filter.
|
public BloomFilters.BloomFilterBuilder<T> withInitialCapacity(int capacity)
capacity
- the initial capacity of the bloom filter.public BloomFilters.BloomFilterBuilder<T> withFalsePositiveProbability(double fpp)
fpp
- the probability of false positives to achieve.public BloomFilters.ScalableBloomFilterBuilder<T> withCapacityGrowthFactor(double growthFactor)
growthFactor
- the factor by which to increase bloom filter capacity when expanding.public BloomFilters.ScalableBloomFilterBuilder<T> withFalsePositiveProbabilityScaleFactor(double scaleFactor)
scaleFactor
- the factor by which to decrease the false positive probability when expanding.public BloomFilters.ScalableBloomFilterBuilder<T> withMaximumNumberOfBuckets(int maximumNumberOfBuckets)
maximumNumberOfBuckets
- the maximum number of buckets to create.public BloomFilters.RollingBloomFilterBuilder<T> withExpiryStrategy(ExpiryStrategy<T> expiryStrategy)
expiryStrategy
- strategy for determining element expiry time.public BloomFilters.BloomFilterBuilder<T> withConcurrencyStrategy(ConcurrencyStrategy strategy)
strategy
- the concurrency strategy to use.public BloomFilters.BloomFilterBuilder<T> withWriteBatchSize(int batchSize)
ConcurrencyStrategy.COPY_ON_WRITE
strategy.batchSize
- the number of elements to buffer before writing to the bloom filter.public BloomFilters.ScalableBloomFilterBuilder<T> scalable()
public BloomFilters.RollingBloomFilterBuilder<T> rolling()
public BloomFilter<T> build()
Copyright © 2025 Open Identity Platform Community. All rights reserved.