Class CacheEntrySchedulerService<I, K extends Key<I>, V, T>
java.lang.Object
org.wildfly.clustering.server.service.DecoratedService
org.wildfly.clustering.server.scheduler.DecoratedSchedulerService<I,T>
org.wildfly.clustering.server.infinispan.scheduler.CacheEntrySchedulerService<I,K,V,T>
- Type Parameters:
I- the scheduled item identifier typeK- the cache key typeV- the cache value typeT- the scheduled item metadata type
- All Implemented Interfaces:
AutoCloseable, CacheEntryScheduler<K,V>, Scheduler<I, T>, SchedulerService<I, T>, Service
public class CacheEntrySchedulerService<I, K extends Key<I>, V, T>
extends DecoratedSchedulerService<I,T>
implements CacheEntryScheduler<K,V>
A cache entry scheduler facade for a scheduler.
- Author:
- Paul Ferraro
-
Constructor Summary
ConstructorsConstructorDescriptionCacheEntrySchedulerService(SchedulerService<I, T> scheduler, BiFunction<I, V, T> mapper) Creates a cache entry scheduler from the specified scheduler and mapper. -
Method Summary
Modifier and TypeMethodDescriptionvoidCancels the entry with the specified key.booleancontainsKey(K key) Indicates whether or not the entry with the specified cache key is scheduled.voidscheduleEntry(Map.Entry<K, V> entry) Schedules the specified cache entry.Methods inherited from class DecoratedSchedulerService
cancel, close, contains, scheduleMethods inherited from class DecoratedService
isStarted, start, stopMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface SchedulerService
compose
-
Constructor Details
-
CacheEntrySchedulerService
Creates a cache entry scheduler from the specified scheduler and mapper.- Parameters:
scheduler- the decorated schedulermapper- the function mapping a cache entry to the scheduled value.
-
-
Method Details
-
scheduleEntry
Description copied from interface:CacheEntrySchedulerSchedules the specified cache entry.- Specified by:
scheduleEntryin interfaceCacheEntryScheduler<I, K extends Key<I>>- Parameters:
entry- a cache entry
-
cancelKey
Description copied from interface:CacheEntrySchedulerCancels the entry with the specified key. -
containsKey
Description copied from interface:CacheEntrySchedulerIndicates whether or not the entry with the specified cache key is scheduled.- Specified by:
containsKeyin interfaceCacheEntryScheduler<I, K extends Key<I>>- Parameters:
key- a cache key- Returns:
- true, if the entry with the specified cache key is scheduled, false otherwise.
-