CuckooFilter.Builder

public void CuckooFilter.Builder(long maxKeys)
public void CuckooFilter.Builder(int maxKeys)

Creates a Builder interface for CuckooFilter with the expected number of insertions using the default false positive rate, #hashAlgorithm, and concurrency. The default false positive rate is 1%. The default hash is Murmur3, automatically using the 32 bit version for small tables and 128 bit version for larger ones. The default concurrency is 16 expected threads.

Note that overflowing a CuckooFilter with significantly more elements than specified will result in insertion failure.

The constructed BloomFilter<T> will be serializable if the provided Funnel<T> is.

It is recommended that the funnel be implemented as a Java enum. This has the benefit of ensuring proper serialization and deserialization, which is important since equals also relies on object identity of funnels.

Parameters

funnel

the funnel of T's that the constructed CuckooFilter<T> will use

maxKeys

the number of expected insertions to the constructed CuckooFilter<T>; must be positive