Class BloomFilters.ScalableBloomFilterBuilder<T>

    • Method Detail

      • withCapacityGrowthFactor

        public BloomFilters.ScalableBloomFilterBuilder<T> withCapacityGrowthFactor​(double growthFactor)
        Description copied from class: BloomFilters.BloomFilterBuilder
        The factor by which to increase the capacity of the bloom filter when it exceeds the initial capacity. A factor of 1 will increase the capacity linearly, which may result in an explosion in the number of buckets if the expected capacity of the filter has been underestimated. The default factor is 2, which ensures that the bloom filter quickly grows to be "large enough" without creating a large number of buckets (i.e., the number of buckets created will be logarithmic in the total number of insertions).
        Overrides:
        withCapacityGrowthFactor in class BloomFilters.BloomFilterBuilder<T>
        Parameters:
        growthFactor - the factor by which to increase bloom filter capacity when expanding.
      • withFalsePositiveProbabilityScaleFactor

        public BloomFilters.ScalableBloomFilterBuilder<T> withFalsePositiveProbabilityScaleFactor​(double scaleFactor)
        Description copied from class: BloomFilters.BloomFilterBuilder
        The factor by which to reduce the probability of false positives when expanding a scalable/rolling bloom filter. As the overall false positive probability (FPP) is the sum of the probabilities of each component bloom filter in the chain, the FPP of each subsequent bucket is reduced by this factor so that the sum never exceeds the overall FPP. A factor close to 1 will reduce the FPP slowly, limiting the additional memory used on each expansion, but with the trade-off of using more memory initially. A lower number will use less memory initially but then decrease the FPP more rapidly, resulting in increased memory usage. The default setting (0.8) is tuned for scalable bloom filters that grow unbounded over time. It is recommended to reduce the factor in rolling bloom filters where the chain is expected not to grow beyond a few buckets in size.
        Overrides:
        withFalsePositiveProbabilityScaleFactor in class BloomFilters.BloomFilterBuilder<T>
        Parameters:
        scaleFactor - the factor by which to decrease the false positive probability when expanding.