Interface CacheEntryScheduler<I,M>
- Type Parameters:
I- the identifier type of scheduled entriesM- the meta data type
- All Superinterfaces:
AutoCloseable,Scheduler<I,M>
- All Known Implementing Classes:
AbstractCacheEntryScheduler,AbstractExpirationScheduler,CacheEntryScheduler.InactiveCacheEntryScheduler,CacheEntryScheduler.ReferenceCacheEntryScheduler,SessionExpirationScheduler
A task scheduler.
- Author:
- Paul Ferraro
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classstatic classNested classes/interfaces inherited from interface org.wildfly.clustering.server.scheduler.Scheduler
Scheduler.InactiveScheduler<I,M>, Scheduler.ReferenceScheduler<I, M> -
Method Summary
Modifier and TypeMethodDescriptionvoidCancels any previous scheduled tasks for entries which are no longer local to the current memberstatic <I,M> CacheEntryScheduler<I, M> inactive()Returns an inactive scheduler instance.static <I,M> CacheEntryScheduler<I, M> reference(Supplier<? extends CacheEntryScheduler<I, M>> reference) Returns a scheduler that delegates to a scheduler reference.voidSchedules a cache entry with the specified identifier.
-
Method Details
-
schedule
Schedules a cache entry with the specified identifier. This method will generally delegate toScheduler.schedule(Object, Object)after performing a cache lookup.- Parameters:
id- the identifier of the object to be scheduled
-
cancel
Cancels any previous scheduled tasks for entries which are no longer local to the current member- Parameters:
locality- the cache locality
-
inactive
Returns an inactive scheduler instance.- Type Parameters:
I- the scheduled entry identifier typeM- the scheduled entry metadata type- Returns:
- an inactive scheduler instance.
-
reference
static <I,M> CacheEntryScheduler<I,M> reference(Supplier<? extends CacheEntryScheduler<I, M>> reference) Returns a scheduler that delegates to a scheduler reference.- Type Parameters:
I- the scheduled entry identifier typeM- the scheduled entry metadata type- Parameters:
reference- a scheduler reference- Returns:
- a scheduler that delegates to a scheduler reference.
-