AdmissionPolicy
constructor(minSightings: Int = DEFAULT_MIN_SIGHTINGS, sketchWidth: Int = DEFAULT_SKETCH_WIDTH, sketchDepth: Int = DEFAULT_SKETCH_DEPTH, resetAfter: Int = DEFAULT_RESET_AFTER)
Parameters
minSightings
how many times a prompt must be seen before its answer is stored. 2 admits on the first repeat, which is the whole idea; higher values fill the store more slowly and give up more hits. 1 admits everything and is the same as no policy at all.
sketchWidth
counters per row. Wider is a more accurate estimate and more memory: the default is 4,096 counters across 4 rows, so 64 KiB, whatever the traffic.
sketchDepth
rows of counters. A key's estimate is the smallest of the sketchDepth counters it hashes to, so more rows make an over-estimate from a hash collision less likely.
resetAfter
sightings after which every counter halves, so the estimate follows recent traffic. Without it a prompt asked twice a year apart looks like one asked twice this morning.