Interface CacheEntryScheduler<I,M>
- Type Parameters:
I- the identifier type of scheduled entriesM- the meta data type
- All Superinterfaces:
AutoCloseable,org.wildfly.clustering.server.scheduler.Scheduler<I,M>
- All Known Implementing Classes:
AbstractCacheEntryScheduler,AbstractExpirationScheduler,CacheEntryScheduler.InactiveCacheEntryScheduler,CacheEntryScheduler.ReferenceCacheEntryScheduler
public interface CacheEntryScheduler<I,M>
extends org.wildfly.clustering.server.scheduler.Scheduler<I,M>
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
org.wildfly.clustering.server.scheduler.Scheduler.InactiveScheduler<I extends Object,M extends Object>, org.wildfly.clustering.server.scheduler.Scheduler.ReferenceScheduler<I extends Object, M extends Object> -
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.Methods inherited from interface org.wildfly.clustering.server.scheduler.Scheduler
cancel, close, contains, schedule, stream
-
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.
-