Repository: beam
Updated Branches:
  refs/heads/master f7d727c0f -> 9b8f23095


Add javadoc to getCheckpointMark in UnboundedSource


Project: http://git-wip-us.apache.org/repos/asf/beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/beam/commit/c62d698f
Tree: http://git-wip-us.apache.org/repos/asf/beam/tree/c62d698f
Diff: http://git-wip-us.apache.org/repos/asf/beam/diff/c62d698f

Branch: refs/heads/master
Commit: c62d698f52cab716f226ca4aec40718bf851a14c
Parents: f7d727c
Author: wtanaka.com <[email protected]>
Authored: Sun Apr 2 23:02:00 2017 -1000
Committer: Jean-Baptiste Onofré <[email protected]>
Committed: Mon Apr 17 09:49:49 2017 +0200

----------------------------------------------------------------------
 .../java/org/apache/beam/sdk/io/UnboundedSource.java   | 13 +++++++++++++
 1 file changed, 13 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/beam/blob/c62d698f/sdks/java/core/src/main/java/org/apache/beam/sdk/io/UnboundedSource.java
----------------------------------------------------------------------
diff --git 
a/sdks/java/core/src/main/java/org/apache/beam/sdk/io/UnboundedSource.java 
b/sdks/java/core/src/main/java/org/apache/beam/sdk/io/UnboundedSource.java
index 3f1ba0e..cc1f598 100644
--- a/sdks/java/core/src/main/java/org/apache/beam/sdk/io/UnboundedSource.java
+++ b/sdks/java/core/src/main/java/org/apache/beam/sdk/io/UnboundedSource.java
@@ -220,6 +220,19 @@ public abstract class UnboundedSource<
     /**
      * Returns a {@link CheckpointMark} representing the progress of this 
{@code UnboundedReader}.
      *
+     * <p>If this {@code UnboundedReader} does not support checkpoints, it may 
return a
+     * CheckpointMark which does nothing, like:
+     *
+     * <pre>{@code
+     * public UnboundedSource.CheckpointMark getCheckpointMark() {
+     *   return new UnboundedSource.CheckpointMark() {
+     *     public void finalizeCheckpoint() throws IOException {
+     *       // nothing to do
+     *     }
+     *   };
+     * }
+     * }</pre>
+     *
      * <p>All elements read up until this method is called will be processed 
together as a bundle.
      * (An element is considered 'read' if it could be returned by a call to 
{@link #getCurrent}.)
      * Once the result of processing those elements and the returned 
checkpoint have been durably

Reply via email to