Module swim.runtime

Class AgentTimer

  • All Implemented Interfaces:
    Runnable, swim.concurrent.Timer, swim.concurrent.TimerContext, swim.concurrent.TimerFunction, swim.concurrent.TimerRef

    public class AgentTimer
    extends Object
    implements swim.concurrent.Timer, swim.concurrent.TimerContext, swim.concurrent.TimerRef, Runnable
    • Field Detail

      • timer

        protected final swim.concurrent.TimerFunction timer
      • timerContext

        protected swim.concurrent.TimerContext timerContext
    • Constructor Detail

      • AgentTimer

        public AgentTimer​(AgentNode node,
                          swim.concurrent.TimerFunction timer)
    • Method Detail

      • timerContext

        public swim.concurrent.TimerContext timerContext()
        Specified by:
        timerContext in interface swim.concurrent.Timer
      • setTimerContext

        public void setTimerContext​(swim.concurrent.TimerContext timerContext)
        Specified by:
        setTimerContext in interface swim.concurrent.Timer
      • runTimer

        public void runTimer()
        Specified by:
        runTimer in interface swim.concurrent.Timer
        Specified by:
        runTimer in interface swim.concurrent.TimerFunction
      • timerWillSchedule

        public void timerWillSchedule​(long millis)
        Specified by:
        timerWillSchedule in interface swim.concurrent.Timer
      • timerDidCancel

        public void timerDidCancel()
        Specified by:
        timerDidCancel in interface swim.concurrent.Timer
      • schedule

        public swim.concurrent.Schedule schedule()
        Specified by:
        schedule in interface swim.concurrent.TimerContext
      • isScheduled

        public boolean isScheduled()
        Specified by:
        isScheduled in interface swim.concurrent.TimerContext
        Specified by:
        isScheduled in interface swim.concurrent.TimerRef
      • reschedule

        public void reschedule​(long millis)
        Specified by:
        reschedule in interface swim.concurrent.TimerContext
        Specified by:
        reschedule in interface swim.concurrent.TimerRef
      • cancel

        public boolean cancel()
        Specified by:
        cancel in interface swim.concurrent.TimerContext
        Specified by:
        cancel in interface swim.concurrent.TimerRef
      • run

        public void run()
        Specified by:
        run in interface Runnable