Interface Scheduler<I,M>

Type Parameters:
I - the scheduled entry identifier type
M - the scheduled entry metadata type
All Superinterfaces:
AutoCloseable
All Known Subinterfaces:
CacheEntryScheduler<I,M>
All Known Implementing Classes:
AbstractCacheEntryScheduler, AbstractExpirationScheduler, LocalScheduler, PrimaryOwnerScheduler, SessionExpirationScheduler

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

    Modifier and Type
    Method
    Description
    void
    cancel(I id)
    Cancels a previously scheduled task for the object with the specified identifier.
    void
     
    default boolean
    contains(I id)
    Indicates whether the entry with the specified identifier is scheduled.
    void
    schedule(I id, M metaData)
    Schedules a task for the object with the specified identifier, using the specified metaData
    Returns a stream of scheduled item identifiers.
  • Method Details

    • schedule

      void schedule(I id, M metaData)
      Schedules a task for the object with the specified identifier, using the specified metaData
      Parameters:
      id - an object identifier
      metaData - the object meta-data
    • cancel

      void cancel(I id)
      Cancels a previously scheduled task for the object with the specified identifier.
      Parameters:
      id - an object identifier
    • stream

      Stream<I> stream()
      Returns a stream of scheduled item identifiers.
      Returns:
      a stream of scheduled item identifiers.
    • contains

      default boolean contains(I id)
      Indicates whether the entry with the specified identifier is scheduled.
      Parameters:
      id - an object identifier
      Returns:
      true, if the specified entry is scheduled, false otherwise.
    • close

      void close()
      Specified by:
      close in interface AutoCloseable