Class TimerGraphStageLogic

    • Constructor Detail

      • TimerGraphStageLogic

        public TimerGraphStageLogic​(Shape _shape)
    • Method Detail

      • cancelTimer

        protected final void cancelTimer​(java.lang.Object timerKey)
        Cancel timer, ensuring that the onTimer(java.lang.Object) is not subsequently called.

        Parameters:
        timerKey - key of the timer to cancel
      • isTimerActive

        protected final boolean isTimerActive​(java.lang.Object timerKey)
        Inquire whether the timer is still active. Returns true unless the timer does not exist, has previously been canceled or if it was a single-shot timer that was already triggered.
        Parameters:
        timerKey - (undocumented)
        Returns:
        (undocumented)
      • onTimer

        protected void onTimer​(java.lang.Object timerKey)
                        throws java.lang.Exception
        Will be called when the scheduled timer is triggered.

        Parameters:
        timerKey - key of the scheduled timer
        Throws:
        java.lang.Exception
      • scheduleOnce

        protected final void scheduleOnce​(java.lang.Object timerKey,
                                          scala.concurrent.duration.FiniteDuration delay)
        Schedule timer to call onTimer(java.lang.Object) after given delay. Any existing timer with the same key will automatically be canceled before adding the new timer.
        Parameters:
        timerKey - (undocumented)
        delay - (undocumented)
      • scheduleOnce

        protected final void scheduleOnce​(java.lang.Object timerKey,
                                          java.time.Duration delay)
        Schedule timer to call onTimer(java.lang.Object) after given delay. Any existing timer with the same key will automatically be canceled before adding the new timer.
        Parameters:
        timerKey - (undocumented)
        delay - (undocumented)
      • schedulePeriodically

        protected final void schedulePeriodically​(java.lang.Object timerKey,
                                                  scala.concurrent.duration.FiniteDuration interval)
        Schedule timer to call onTimer(java.lang.Object) periodically with the given interval. Any existing timer with the same key will automatically be canceled before adding the new timer.
        Parameters:
        timerKey - (undocumented)
        interval - (undocumented)
      • schedulePeriodically

        protected final void schedulePeriodically​(java.lang.Object timerKey,
                                                  java.time.Duration interval)
        Schedule timer to call onTimer(java.lang.Object) periodically with the given interval. Any existing timer with the same key will automatically be canceled before adding the new timer.
        Parameters:
        timerKey - (undocumented)
        interval - (undocumented)
      • schedulePeriodicallyWithInitialDelay

        protected final void schedulePeriodicallyWithInitialDelay​(java.lang.Object timerKey,
                                                                  scala.concurrent.duration.FiniteDuration initialDelay,
                                                                  scala.concurrent.duration.FiniteDuration interval)
        Schedule timer to call onTimer(java.lang.Object) periodically with the given interval after the specified initial delay. Any existing timer with the same key will automatically be canceled before adding the new timer.
        Parameters:
        timerKey - (undocumented)
        initialDelay - (undocumented)
        interval - (undocumented)
      • schedulePeriodicallyWithInitialDelay

        protected final void schedulePeriodicallyWithInitialDelay​(java.lang.Object timerKey,
                                                                  java.time.Duration initialDelay,
                                                                  java.time.Duration interval)
        Schedule timer to call onTimer(java.lang.Object) periodically with the given interval after the specified initial delay. Any existing timer with the same key will automatically be canceled before adding the new timer.
        Parameters:
        timerKey - (undocumented)
        initialDelay - (undocumented)
        interval - (undocumented)