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:
relativeTimeMillisin interfaceorg.apache.flink.util.clock.RelativeClock
-
relativeTimeNanos
public long relativeTimeNanos()- Specified by:
relativeTimeNanosin interfaceorg.apache.flink.util.clock.RelativeClock
-
pause
public void pause() -
unPause
public void unPause() -
markStart
public void markStart()- Specified by:
markStartin interfaceTimerGauge.StartStopListener
-
markEnd
public void markEnd()- Specified by:
markEndin interfaceTimerGauge.StartStopListener
-