Repository: beam Updated Branches: refs/heads/master 4c3174b80 -> eec903fb5
Add comments to Trigger.java Project: http://git-wip-us.apache.org/repos/asf/beam/repo Commit: http://git-wip-us.apache.org/repos/asf/beam/commit/c15fe056 Tree: http://git-wip-us.apache.org/repos/asf/beam/tree/c15fe056 Diff: http://git-wip-us.apache.org/repos/asf/beam/diff/c15fe056 Branch: refs/heads/master Commit: c15fe056b05da0d5a24619c1986a099d411c14b4 Parents: be88366 Author: wtanaka.com <wtan...@yahoo.com> Authored: Sat Apr 22 12:14:35 2017 -1000 Committer: wtanaka.com <wtan...@yahoo.com> Committed: Sat Apr 29 08:16:47 2017 -1000 ---------------------------------------------------------------------- .../apache/beam/sdk/transforms/windowing/Trigger.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/beam/blob/c15fe056/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/windowing/Trigger.java ---------------------------------------------------------------------- diff --git a/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/windowing/Trigger.java b/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/windowing/Trigger.java index 1cc807e..07d3077 100644 --- a/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/windowing/Trigger.java +++ b/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/windowing/Trigger.java @@ -89,6 +89,9 @@ public abstract class Trigger implements Serializable { * Specifically, triggers that are time based and intended to provide speculative results should * continue providing speculative results. Triggers that fire once (or multiple times) should * continue firing once (or multiple times). + * + * <p>If this method is not overridden, its default implementation delegates its behavior to + * {@link #getContinuationTrigger(List)} which is expected to be implemented by subclasses. */ public Trigger getContinuationTrigger() { if (subTriggers == null) { @@ -103,8 +106,13 @@ public abstract class Trigger implements Serializable { } /** - * Return the {@link #getContinuationTrigger} of this {@link Trigger}. For convenience, this is - * provided the continuation trigger of each of the sub-triggers. + * Subclasses should override this to return the {@link #getContinuationTrigger} of this + * {@link Trigger}. For convenience, this is provided the continuation trigger of each of the + * sub-triggers in the same order as {@link #subTriggers}. + * + * @param continuationTriggers null if {@link #subTriggers} is null, otherwise contains the + * result of {@link #getContinuationTrigger()} on each of the + * subTriggers in the same order. */ protected abstract Trigger getContinuationTrigger(List<Trigger> continuationTriggers);