Package org.keycloak.expiration.jpa
Interface ExpirationTask
- All Superinterfaces:
Runnable
- All Known Implementing Classes:
DefaultExpirationTask,RealmAwareExpirationTask
A periodic task that removes expired entries from the database.
Instances are created via the ExpirationTaskBuilder and registered with the Keycloak
TimerProvider by calling schedule().
Each invocation of Runnable.run() submits the cleanup work to an Executor, ensuring the
timer thread is not blocked by long-running deletions. Concurrent runs are prevented by an internal guard: if a
previous run is still in progress, the new invocation is skipped.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic ExpirationTaskBuilderbuilder()Returns a newExpirationTaskBuilderto configure and build anExpirationTask.voidschedule()Registers this task with theTimerProviderto run periodically at the configured interval.
-
Method Details
-
schedule
void schedule()Registers this task with theTimerProviderto run periodically at the configured interval. -
builder
Returns a newExpirationTaskBuilderto configure and build anExpirationTask.
-