beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From k...@apache.org
Subject [10/18] incubator-beam git commit: Construct AfterAllStateMachine with a list of subtriggers
Date Tue, 18 Oct 2016 03:38:41 GMT
Construct AfterAllStateMachine with a list of subtriggers


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

Branch: refs/heads/master
Commit: b2bb7c048086a3e5eee7d2652d4bb971bc0694e7
Parents: 87c7811
Author: Kenneth Knowles <klk@google.com>
Authored: Thu Oct 13 20:42:38 2016 -0700
Committer: Kenneth Knowles <klk@google.com>
Committed: Mon Oct 17 19:56:35 2016 -0700

----------------------------------------------------------------------
 .../apache/beam/runners/core/triggers/AfterAllStateMachine.java | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/b2bb7c04/runners/core-java/src/main/java/org/apache/beam/runners/core/triggers/AfterAllStateMachine.java
----------------------------------------------------------------------
diff --git a/runners/core-java/src/main/java/org/apache/beam/runners/core/triggers/AfterAllStateMachine.java
b/runners/core-java/src/main/java/org/apache/beam/runners/core/triggers/AfterAllStateMachine.java
index 2f4ad63..12cbc3d 100644
--- a/runners/core-java/src/main/java/org/apache/beam/runners/core/triggers/AfterAllStateMachine.java
+++ b/runners/core-java/src/main/java/org/apache/beam/runners/core/triggers/AfterAllStateMachine.java
@@ -20,6 +20,7 @@ package org.apache.beam.runners.core.triggers;
 import static com.google.common.base.Preconditions.checkArgument;
 
 import com.google.common.base.Joiner;
+import com.google.common.collect.ImmutableList;
 import java.util.Arrays;
 import java.util.List;
 import org.apache.beam.runners.core.triggers.TriggerStateMachine.OnceTriggerStateMachine;
@@ -45,6 +46,10 @@ public class AfterAllStateMachine extends OnceTriggerStateMachine {
     return new AfterAllStateMachine(Arrays.<TriggerStateMachine>asList(triggers));
   }
 
+  public static OnceTriggerStateMachine of(Iterable<? extends TriggerStateMachine>
triggers) {
+    return new AfterAllStateMachine(ImmutableList.copyOf(triggers));
+  }
+
   @Override
   public void onElement(OnElementContext c) throws Exception {
     for (ExecutableTriggerStateMachine subTrigger : c.trigger().unfinishedSubTriggers())
{


Mime
View raw message