lukecwik commented on a change in pull request #12016:
URL: https://github.com/apache/beam/pull/12016#discussion_r448727139



##########
File path: sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/DoFn.java
##########
@@ -1053,6 +1056,51 @@ public Duration getAllowedTimestampSkew() {
   @Experimental(Kind.SPLITTABLE_DO_FN)
   public @interface SplitRestriction {}
 
+  /**
+   * Annotation for the method that truncates the restriction of a <a
+   * href="https://s.apache.org/splittable-do-fn";>splittable</a> {@link DoFn} 
into a bounded one to
+   * be processed when pipeline starts to drain.
+   *
+   * <p>This method is used to perform truncation of the restriction while it 
is not actively being
+   * processed.
+   *
+   * <p>Signature: {@code Optional<RestrictionT> 
truncateRestriction(<arguments>);}

Review comment:
       We should state what Optional.empty means as part of the contract.




----------------------------------------------------------------
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]


Reply via email to