Skip to content
Bluetape4k docs1.11

Filters, scripts, and primitives

Latest stable Based on Bluetape4k release 1.11.0

For a Bloom filter, contains=false proves absence while true may be a false positive. A Cuckoo filter supports deletion, but insertion can fail in a constrained bucket layout. Reinitializing an existing filter with different parameters raises an exception.

val filter = LettuceBloomFilter(
connection,
"blocked-email",
BloomFilterOptions(expectedInsertions = 100_000, falseProbability = 0.01),
)
filter.tryInit()
filter.add("spam@example.com")

HyperLogLog provides approximate cardinality, not an exact set size, and is unsuitable for billing or hard quota decisions.

RedisScript precomputes the source SHA1. Every RedisScriptRunner mode tries EVALSHA first and sends the source with EVAL only after NOSCRIPT. Other script failures propagate.

AtomicLong, semaphore, and lock wrappers combine Redis commands with Lua. Release locks and permits in finally, and do not equate a Redis mutex with business atomicity under network partitions.

Continue with Operations and ecosystem.