Skip to content

Commit 759e261

Browse files
committed
Add @pure annotations to LateDataUtils
1 parent 5c9ab31 commit 759e261

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

runners/core-java/src/main/java/org/apache/beam/runners/core/LateDataUtils.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import org.apache.beam.sdk.values.WindowingStrategy;
2626
import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.FluentIterable;
2727
import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.Iterables;
28+
import org.checkerframework.dataflow.qual.Pure;
2829
import org.joda.time.Duration;
2930
import org.joda.time.Instant;
3031

@@ -41,6 +42,7 @@ private LateDataUtils() {}
4142
* Return when {@code window} should be garbage collected. If the window's expiration time is on
4243
* or after the end of the global window, it will be truncated to the end of the global window.
4344
*/
45+
@Pure
4446
public static Instant garbageCollectionTime(
4547
BoundedWindow window, WindowingStrategy windowingStrategy) {
4648
return garbageCollectionTime(window, windowingStrategy.getAllowedLateness());
@@ -50,6 +52,7 @@ public static Instant garbageCollectionTime(
5052
* Return when {@code window} should be garbage collected. If the window's expiration time is on
5153
* or after the end of the global window, it will be truncated to the end of the global window.
5254
*/
55+
@Pure
5356
public static Instant garbageCollectionTime(BoundedWindow window, Duration allowedLateness) {
5457

5558
// If the end of the window + allowed lateness is beyond the "end of time" aka the end of the

0 commit comments

Comments
 (0)