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 type
K - the cache key type
V - the cache value type
T - 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 Details

    • CacheEntrySchedulerService

      public CacheEntrySchedulerService(SchedulerService<I,T> scheduler, BiFunction<I,V,T> mapper)
      Creates a cache entry scheduler from the specified scheduler and mapper.
      Parameters:
      scheduler - the decorated scheduler
      mapper - the function mapping a cache entry to the scheduled value.
  • Method Details

    • scheduleEntry

      public void scheduleEntry(Map.Entry<K,V> entry)
      Description copied from interface: CacheEntryScheduler
      Schedules the specified cache entry.
      Specified by:
      scheduleEntry in interface CacheEntryScheduler<I, K extends Key<I>>
      Parameters:
      entry - a cache entry
    • cancelKey

      public void cancelKey(K key)
      Description copied from interface: CacheEntryScheduler
      Cancels the entry with the specified key.
      Specified by:
      cancelKey in interface CacheEntryScheduler<I, K extends Key<I>>
      Parameters:
      key - a cache key
    • containsKey

      public boolean containsKey(K key)
      Description copied from interface: CacheEntryScheduler
      Indicates whether or not the entry with the specified cache key is scheduled.
      Specified by:
      containsKey in interface CacheEntryScheduler<I, K extends Key<I>>
      Parameters:
      key - a cache key
      Returns:
      true, if the entry with the specified cache key is scheduled, false otherwise.