Interface Scheduler<K,V>

Type Parameters:
K - the scheduled entry key type
V - the scheduled entry value type
All Known Subinterfaces:
SchedulerService<K,V>
All Known Implementing Classes:
DecoratedSchedulerService

public interface Scheduler<K,V>
A task scheduler.
Author:
Paul Ferraro
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    cancel(K key)
    Cancels a previously scheduled task for the entry with the specified key.
    boolean
    contains(K key)
    Indicates whether the entry with the specified key is scheduled.
    default void
    Schedules a task for the specified entry
    void
    schedule(K key, V value)
    Schedules a task for the specified entry.
  • Method Details

    • schedule

      default void schedule(Map.Entry<K,V> entry)
      Schedules a task for the specified entry
      Parameters:
      entry - the scheduled entry
    • schedule

      void schedule(K key, V value)
      Schedules a task for the specified entry.
      Parameters:
      key - the scheduled entry key
      value - the scheduled entry value
    • cancel

      void cancel(K key)
      Cancels a previously scheduled task for the entry with the specified key.
      Parameters:
      key - the scheduled entry key
    • contains

      boolean contains(K key)
      Indicates whether the entry with the specified key is scheduled.
      Parameters:
      key - the scheduled entry key
      Returns:
      true, if the specified entry is scheduled, false otherwise.