Interface JSentinelVersionStore

All Known Implementing Classes:
InMemoryJSentinelVersionStore

@ExperimentalJSentinelApi public interface JSentinelVersionStore
Persistent counter store for JSentinelVersion per JSentinelVersionKey. Backs the planned JSentinelVersionCheck interceptor in security-vaadin and security-rest: every session captures the subject's version at login time (SessionRecord.securityVersionAtLogin()); the interceptor compares that snapshot against the subject's current version returned by current(JSentinelVersionKey) on every request and rejects the session when the two have drifted apart.

The API is behaviour-flavoured rather than pure CRUD because the data shape is so narrow (a single non-negative counter): callers either read the current version, atomically bump it, or reset it. The reset path is intentional — an admin tooling that forces a clean state for a tenant can call reset(JSentinelVersionKey) per subject.

Implementations must be thread-safe; concurrent current and increment calls happen on every authority change.