Class PausableRelativeClock

java.lang.Object
org.apache.flink.streaming.api.operators.util.PausableRelativeClock
All Implemented Interfaces:
TimerGauge.StartStopListener, org.apache.flink.util.clock.RelativeClock

@Internal @ThreadSafe public class PausableRelativeClock extends Object implements org.apache.flink.util.clock.RelativeClock, TimerGauge.StartStopListener
A RelativeClock whose time progress with respect to the wall clock can be paused and un-paused. It can be paused multiple times. If it is paused N times, it has to be un-paused also N times to resume progress.
  • Constructor Details

    • PausableRelativeClock

      public PausableRelativeClock(org.apache.flink.util.clock.Clock baseClock)
  • Method Details

    • relativeTimeMillis

      public long relativeTimeMillis()
      Specified by:
      relativeTimeMillis in interface org.apache.flink.util.clock.RelativeClock
    • relativeTimeNanos

      public long relativeTimeNanos()
      Specified by:
      relativeTimeNanos in interface org.apache.flink.util.clock.RelativeClock
    • pause

      public void pause()
    • unPause

      public void unPause()
    • markStart

      public void markStart()
      Specified by:
      markStart in interface TimerGauge.StartStopListener
    • markEnd

      public void markEnd()
      Specified by:
      markEnd in interface TimerGauge.StartStopListener