Interface TimerService

All Superinterfaces:
SchedulerService
All Known Implementing Classes:
JDKTimerService, PseudoClockScheduler

public interface TimerService extends SchedulerService
An interface for all timer service implementations used in a drools session.
  • Method Details

    • getCurrentTime

      long getCurrentTime()
      Returns the current time from the scheduler clock
      Returns:
      the current timestamp
    • reset

      void reset()
      Reset this service
    • shutdown

      void shutdown()
      Shuts the service down
    • getTimeToNextJob

      long getTimeToNextJob()
      Returns the number of time units (usually ms) to the next scheduled job
      Returns:
      the number of time units until the next scheduled job or -1 if there is no job scheduled
    • getTimerJobInstances

      Collection<TimerJobInstance> getTimerJobInstances(long id)
      This method may return null for some TimerService implementations that do not want the overhead of maintain this.
      Returns:
    • setTimerJobFactoryManager

      void setTimerJobFactoryManager(TimerJobFactoryManager timerJobFactoryManager)
    • getTimerJobFactoryManager

      TimerJobFactoryManager getTimerJobFactoryManager()