pnowojski commented on code in PR #25167: URL: https://github.com/apache/flink/pull/25167#discussion_r1714060955
########## flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/util/ProgressBlockingRelativeClock.java: ########## @@ -0,0 +1,92 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.flink.streaming.api.operators.util; + +import org.apache.flink.annotation.Internal; +import org.apache.flink.runtime.metrics.TimerGauge; +import org.apache.flink.util.clock.Clock; +import org.apache.flink.util.clock.RelativeClock; + +import javax.annotation.concurrent.ThreadSafe; + +import static org.apache.flink.util.Preconditions.checkState; + +/** + * A {@link RelativeClock} that can be marked to start and stop blocking progress of the relative + * time with respect to the wall clock. + */ +@Internal +@ThreadSafe +public class ProgressBlockingRelativeClock implements RelativeClock, TimerGauge.StartStopListener { Review Comment: > Can you document the main paths how this clock is paused and unpaused? > IIUC, one of the paths goes through metrics - which is not obvious to me, so javadoc would be helpful. How it's paused/unpaused, depends on the use case. Currently it is used in 3 places, with two different patterns. Maybe I should document how it's paused/unpaused where it's instantiated? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org