Class CfReserveArgs

    • Constructor Detail

      • CfReserveArgs

        public CfReserveArgs()
    • Method Detail

      • bucketSize

        public CfReserveArgs bucketSize​(long bucketSize)
        Set the number of items in each bucket. A higher bucket size value improves the fill rate but also causes a higher error rate and slightly slower performance. The default value is 2.
        Parameters:
        bucketSize - the bucket size
        Returns:
        the current CfReserveArgs
      • maxIterations

        public CfReserveArgs maxIterations​(int maxIterations)
        Sets the number of attempts to swap items between buckets before declaring filter as full and creating an additional filter. A low value is better for performance and a higher number is better for filter fill rate. The default value is 20.
        Parameters:
        maxIterations - the iterations
        Returns:
        the current CfReserveArgs
      • expansion

        public CfReserveArgs expansion​(int expansion)
        When a new filter is created, its size is the size of the current filter multiplied by expansion. Expansion is rounded to the next 2^n number. The default value is 1.
        Parameters:
        expansion - the expansion factor
        Returns:
        the current CfReserveArgs