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

    Constructors
    Constructor
    Description
    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.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    cancelKey(K key)
    Cancels the entry with the specified key.
    boolean
    Indicates whether or not the entry with the specified cache key is scheduled.
    void
    Schedules the specified cache entry.

    Methods inherited from class org.wildfly.clustering.server.scheduler.DecoratedSchedulerService

    cancel, close, contains, schedule

    Methods inherited from class org.wildfly.clustering.server.service.DecoratedService

    isStarted, start, stop

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.wildfly.clustering.server.scheduler.Scheduler

    schedule

    Methods inherited from interface org.wildfly.clustering.server.scheduler.SchedulerService

    compose

    Methods 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 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 org.wildfly.clustering.cache.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 org.wildfly.clustering.cache.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 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.