Class GerritTriggerTimer


  • public final class GerritTriggerTimer
    extends Object
    Manages the timer that is used for each GerritTrigger TimerTask that is active.
    Author:
    Fredrik Abrahamson <fredrik.abrahamson@sonymobile.com>
    • Field Detail

      • DELAY_MILLISECONDS

        protected static final long DELAY_MILLISECONDS
        Wait this many milliseconds before the first call to a TimerTask.
        See Also:
        Constant Field Values
    • Method Detail

      • getInstance

        public static GerritTriggerTimer getInstance()
        Returns the instance, and creates it first if needed.
        Returns:
        the instance of this class
      • schedule

        public void schedule​(GerritTriggerTimerTask timerTask,
                             @NonNull
                             GerritTrigger trigger)
        Schedule a TimerTask according to the two constants above.
        Parameters:
        trigger - the trigger associated with the task
        timerTask - the TimerTask to be scheduled
      • cancel

        public void cancel​(GerritTriggerTimerTask timerTask)
        Cancel a TimerTask.
        Parameters:
        timerTask - the TimerTask to cancel