Class ProcessingTimeServiceUtil
java.lang.Object
org.apache.flink.streaming.runtime.tasks.ProcessingTimeServiceUtil
Utility for classes that implements the
ProcessingTimeService interface.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic longgetProcessingTimeDelay(long processingTimestamp, long currentTimestamp) Returns the remaining delay of the processing time specified byprocessingTimestamp.
-
Constructor Details
-
ProcessingTimeServiceUtil
public ProcessingTimeServiceUtil()
-
-
Method Details
-
getProcessingTimeDelay
public static long getProcessingTimeDelay(long processingTimestamp, long currentTimestamp) Returns the remaining delay of the processing time specified byprocessingTimestamp. This delay guarantees that the timer will be fired at least 1ms after the time it's registered for.- Parameters:
processingTimestamp- the processing time in millisecondscurrentTimestamp- the current processing timestamp; it usually usesProcessingTimeService.getCurrentProcessingTime()to get- Returns:
- the remaining delay of the processing time
-