Interface BloomFilterService
- All Known Implementing Classes:
BloomFilterServiceImpl
public interface BloomFilterService
Probabilistic service for fast citizen consent lookups using a Redis-backed Bloom Filter.
Used as a first-layer filter before MongoDB queries to reduce database load:
- "false" → Fiscal code definitely absent (skip DB query)
- "true" → Fiscal code might exist (verify with DB)
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<String> mightContain(String fiscalCode) Checks if a fiscal code might be present in the Bloom Filter.
-
Method Details
-
mightContain
Checks if a fiscal code might be present in the Bloom Filter.
Note: False negatives are impossible, false positives occur with ~1% probability.
- Parameters:
fiscalCode- plain fiscal code- Returns:
"true"if might exist (requires DB check),"false"if definitely absent
-