Interface ClockService
@Internal
public interface ClockService
A clock service which can get current processing time. This can help to mock processing time in
tests.
-
Method Summary
Modifier and TypeMethodDescriptionlongReturns the current processing time.static ClockServiceof(org.apache.flink.streaming.api.operators.InternalTimerService<?> timerService) Creates aClockServicefrom the givenInternalTimerService.static ClockServiceofSystem()Creates aClockServicewhich assigns as current processing time the result of callingSystem.currentTimeMillis().
-
Method Details
-
currentProcessingTime
long currentProcessingTime()Returns the current processing time. -
of
static ClockService of(org.apache.flink.streaming.api.operators.InternalTimerService<?> timerService) Creates aClockServicefrom the givenInternalTimerService. -
ofSystem
Creates aClockServicewhich assigns as current processing time the result of callingSystem.currentTimeMillis().
-