Interface CacheEntryScheduler<I,M>

Type Parameters:
I - the identifier type of scheduled entries
M - the meta data type
All Superinterfaces:
AutoCloseable, Scheduler<I,M>
All Known Implementing Classes:
AbstractCacheEntryScheduler, AbstractExpirationScheduler, CacheEntryScheduler.InactiveCacheEntryScheduler, CacheEntryScheduler.ReferenceCacheEntryScheduler, SessionExpirationScheduler

public interface CacheEntryScheduler<I,M> extends Scheduler<I,M>
A task scheduler.
Author:
Paul Ferraro
  • Method Details

    • schedule

      void schedule(I id)
      Schedules a cache entry with the specified identifier. This method will generally delegate to Scheduler.schedule(Object, Object) after performing a cache lookup.
      Parameters:
      id - the identifier of the object to be scheduled
    • cancel

      void cancel(Locality locality)
      Cancels any previous scheduled tasks for entries which are no longer local to the current member
      Parameters:
      locality - the cache locality
    • inactive

      static <I, M> CacheEntryScheduler<I,M> inactive()
      Returns an inactive scheduler instance.
      Type Parameters:
      I - the scheduled entry identifier type
      M - 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 type
      M - the scheduled entry metadata type
      Parameters:
      reference - a scheduler reference
      Returns:
      a scheduler that delegates to a scheduler reference.