lukecwik commented on a change in pull request #11199: [BEAM-9562] Update Timer
encoding with respect of dynamic timers
URL: https://github.com/apache/beam/pull/11199#discussion_r402687607
##########
File path:
runners/core-construction-java/src/main/java/org/apache/beam/runners/core/construction/Timer.java
##########
@@ -40,92 +52,201 @@
@AutoValue
public abstract class Timer<T> {
- /** Returns a timer for the given timestamp with a {@code null} payload. */
- public static Timer<Void> of(Instant time) {
- return of(time, (Void) null);
+ /**
+ * Returns a non-cleared timer for the given {@code userKey}, {@code
dynamicTimerTag}, {@code
+ * fireTimestamp}, {@code holdTimestamp}, {@code windows} and {@code pane}.
+ */
+ public static <T> Timer<T> of(
+ T userKey,
+ String dynamicTimerTag,
+ Collection<? extends BoundedWindow> windows,
+ Instant fireTimestamp,
+ Instant holdTimestamp,
+ PaneInfo pane) {
+ return new AutoValue_Timer(
+ userKey, dynamicTimerTag, windows, false, fireTimestamp,
holdTimestamp, pane);
}
- /** Returns a timer for the given timestamp with a user specified payload. */
- public static <T> Timer<T> of(Instant timestamp, @Nullable T payload) {
- return new AutoValue_Timer(timestamp, payload);
+ /** Returns a cleared timer for the given userKey, dynamicTimerTag and
windows. */
Review comment:
```suggestion
/** Returns a cleared timer for the given {@code userKey}, {@code
dynamicTimerTag} and {@code windows}. */
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services