AppVersionService
7/8/26Less than 1 minute
AppVersionService
Info
Service layer for application version CRUD with bloom filter-accelerated lookups and Spring Cache integration.
Overview
AppVersionService manages application version records. On startup, it rebuilds the bloom filter from the database. Read queries use the bloom filter to reject non-existent app names before hitting the database, preventing cache penetration.
Methods
| Method | Cache | Description |
|---|---|---|
getVersion(appName) | app-version | Query version by app name; bloom filter gates DB access |
listAll() | app-version-list | Query all version records |
createVersion(appName, version, description, downloadUrl) | Evicts both | Create new version; returns null if app already exists |
updateVersion(appName, version, description, downloadUrl) | Evicts both | Upsert: update existing or create new |
deleteVersion(appName) | Evicts both (conditional) | Delete version; removes from bloom filter |
incrementUpdateCount(appName, version) | Evicts both (conditional) | Increment download/update counter |
Bloom Filter Integration
getVersion("my-app")
├─ bloom.mightContain("my-app") == false → return null (no DB hit)
└─ bloom.mightContain("my-app") == true → query DB → cache resultLifecycle
- Startup:
rebuildVersionAppBloom()loads allappNamevalues from DB into the bloom filter - Create/Update: Adds
appNameto the bloom filter - Delete: Removes
appNamefrom the exact set (bitmap bits are retained)
Warning
App names are trimmed and null/empty values are rejected at the service boundary.
Changelog
7/8/26, 5:52 AM
View All Changelog
9f290-on

