Repository: incubator-edgent Updated Branches: refs/heads/master a92c365ee -> 6e8ebd584
[Edgent-362] fix PlumbingStreams.gate javadoc Project: http://git-wip-us.apache.org/repos/asf/incubator-edgent/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-edgent/commit/23fa72f0 Tree: http://git-wip-us.apache.org/repos/asf/incubator-edgent/tree/23fa72f0 Diff: http://git-wip-us.apache.org/repos/asf/incubator-edgent/diff/23fa72f0 Branch: refs/heads/master Commit: 23fa72f0e212cb09a13937d41d08263ca8300628 Parents: a6090c8 Author: Dale LaBossiere <[email protected]> Authored: Tue Jan 3 17:26:25 2017 -0500 Committer: Dale LaBossiere <[email protected]> Committed: Tue Jan 3 17:26:25 2017 -0500 ---------------------------------------------------------------------- .../edgent/topology/plumbing/PlumbingStreams.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-edgent/blob/23fa72f0/api/topology/src/main/java/org/apache/edgent/topology/plumbing/PlumbingStreams.java ---------------------------------------------------------------------- diff --git a/api/topology/src/main/java/org/apache/edgent/topology/plumbing/PlumbingStreams.java b/api/topology/src/main/java/org/apache/edgent/topology/plumbing/PlumbingStreams.java index 1c7d0a7..e551642 100644 --- a/api/topology/src/main/java/org/apache/edgent/topology/plumbing/PlumbingStreams.java +++ b/api/topology/src/main/java/org/apache/edgent/topology/plumbing/PlumbingStreams.java @@ -627,10 +627,9 @@ public class PlumbingStreams { /** * Control the flow of tuples to an output stream. * <P> - * A {@link Semaphore} - * is used to control the flow of tuples - * through the {@code gate} - * . The gate acquires a permit from the + * A {@link Semaphore} is used to control the flow of tuples + * through the {@code gate}. + * The gate acquires a permit from the * semaphore to pass the tuple through, blocking until a permit is * acquired (and applying backpressure upstream while blocked). * Elsewhere, some code calls {@link Semaphore#release(int)} @@ -651,7 +650,7 @@ public class PlumbingStreams { * <pre>{@code * TStream<Integer> readings = ...; * Semaphore gateControl = new Semaphore(1); // allow the first to pass through - * TStream<Integer> gated = gate(readings, gateControl); + * TStream<Integer> gated = PlumbingStreams.gate(readings, gateControl); * * // Create the concurrent pipeline combiner and have it * // signal that concurrent processing of the tuple has completed. @@ -659,7 +658,10 @@ public class PlumbingStreams { * // each pipeline result. * * Function<TStream<List<Integer>>,TStream<List<Integer>>> combiner = - * stream -> stream.map(list -> { * gateControl.release(); * return list; * }); + * stream -> stream.map(list -> { + * gateControl.release(); + * return list; + * }); * * TStream<List<Integer>> results = PlumbingStreams.concurrent(gated, pipelines, combiner); * }</pre>
