Interface TimerService

    • Method Detail

      • 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

        java.util.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)