Class CacheEntrySchedulerService<I, K extends org.wildfly.clustering.cache.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>, org.wildfly.clustering.server.scheduler.Scheduler<I, T>, org.wildfly.clustering.server.scheduler.SchedulerService<I, T>, org.wildfly.clustering.server.service.Service
public class CacheEntrySchedulerService<I, K extends org.wildfly.clustering.cache.Key<I>, V, T>
extends org.wildfly.clustering.server.scheduler.DecoratedSchedulerService<I,T>
implements CacheEntryScheduler<K,V>
A cache entry scheduler facade for a scheduler.
- Author:
- Paul Ferraro
-
Constructor Summary
ConstructorsConstructorDescriptionCacheEntrySchedulerService(org.wildfly.clustering.server.scheduler.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 org.wildfly.clustering.server.scheduler.DecoratedSchedulerService
cancel, close, contains, scheduleMethods inherited from class org.wildfly.clustering.server.service.DecoratedService
isStarted, start, stopMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.wildfly.clustering.server.scheduler.Scheduler
scheduleMethods inherited from interface org.wildfly.clustering.server.scheduler.SchedulerService
composeMethods inherited from interface org.wildfly.clustering.server.service.Service
isStarted, start, stop
-
Constructor Details
-
CacheEntrySchedulerService
public CacheEntrySchedulerService(org.wildfly.clustering.server.scheduler.SchedulerService<I, T> scheduler, BiFunction<I, V, T> mapper) 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 org.wildfly.clustering.cache.Key<I>>- Parameters:
entry- a cache entry
-
cancelKey
Description copied from interface:CacheEntrySchedulerCancels the entry with the specified key.- Specified by:
cancelKeyin interfaceCacheEntryScheduler<I, K extends org.wildfly.clustering.cache.Key<I>>- Parameters:
key- a cache 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 org.wildfly.clustering.cache.Key<I>>- Parameters:
key- a cache key- Returns:
- true, if the entry with the specified cache key is scheduled, false otherwise.
-