Interface Timer

    • Method Summary

      Modifier and Type Method Description
      void runTimer()
      Executes scheduled logic when this Timer fires.
      void setTimerContext​(TimerContext timerContext)
      Sets the context used to manage this Timer.
      TimerContext timerContext()
      Returns the context used to manage this Timer.
      void timerDidCancel()
      Lifecycle callback invoked after this Timer is explicitly cancelled.
      void timerWillSchedule​(long millis)
      Lifecycle callback invoked before this Timer is scheduled for execution.
    • Method Detail

      • timerContext

        TimerContext timerContext()
        Returns the context used to manage this Timer. Returns null if this Timer is not bound to a Schedule.
      • setTimerContext

        void setTimerContext​(TimerContext timerContext)
        Sets the context used to manage this Timer. A TimerContext is assigned when binding this Timer to a Schedule.
      • runTimer

        void runTimer()
        Executes scheduled logic when this Timer fires.
        Specified by:
        runTimer in interface TimerFunction
      • timerWillSchedule

        void timerWillSchedule​(long millis)
        Lifecycle callback invoked before this Timer is scheduled for execution.
      • timerDidCancel

        void timerDidCancel()
        Lifecycle callback invoked after this Timer is explicitly cancelled.