Package org.keycloak.expiration.jpa
Interface ExpirationListener
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A listener notified after each expiration task run.
Implementations can use this callback for logging, alerting, or custom metrics. The built-in Micrometer metrics
listener is registered automatically when metrics are enabled via ExpirationTaskBuilder.withMetrics(boolean).
-
Method Summary
-
Method Details
-
onTaskRun
Called after an expiration task run completes for a given scope (global or per-realm).- Parameters:
realmId- the realm that was cleaned up, ornullfor non-realm-aware expiration tasks.outcome- the outcome of the task run.removed- the total number of expired entries removed across all batches.duration- the wall-clock duration of the task run.
-