Class SubFlowImpl<In,​Out,​Mat,​F,​C>

  • All Implemented Interfaces:
    FlowOps<Out,​Mat>, SubFlow<Out,​Mat,​F,​C>

    public class SubFlowImpl<In,​Out,​Mat,​F,​C>
    extends java.lang.Object
    implements SubFlow<Out,​Mat,​F,​C>
    INTERNAL API
    • Method Detail

      • async

        public SubFlow<Out,​Mat,​F,​C> async()
        Description copied from interface: FlowOps
        Put an asynchronous boundary around this Flow.

        If this is a SubFlow (created e.g. by groupBy), this creates an asynchronous boundary around each materialized sub-flow, not the super-flow. That way, the super-flow will communicate with sub-flows asynchronously.

        Specified by:
        async in interface FlowOps<In,​Out>
        Returns:
        (undocumented)
      • mergeSubstreamsWithParallelism

        public F mergeSubstreamsWithParallelism​(int breadth)
        Description copied from interface: SubFlow
        Flatten the sub-flows back into the super-flow by performing a merge with the given parallelism limit. This means that only up to parallelism substreams will be executed at any given time. Substreams that are not yet executed are also not materialized, meaning that back-pressure will be exerted at the operator that creates the substreams when the parallelism limit is reached.
        Specified by:
        mergeSubstreamsWithParallelism in interface SubFlow<In,​Out,​Mat,​F>
        Parameters:
        breadth - (undocumented)
        Returns:
        (undocumented)
      • to

        public <M> C to​(Graph<SinkShape<Out>,​M> sink)
        Description copied from interface: SubFlow
        Attach a Sink to each sub-flow, closing the overall Graph that is being constructed.

        Note that attributes set on the returned graph, including async boundaries are now for the entire graph and not the SubFlow. for example async will not have any effect as the returned graph is the entire, closed graph.

        Specified by:
        to in interface FlowOps<In,​Out>
        Specified by:
        to in interface SubFlow<In,​Out,​Mat,​F>
        Parameters:
        sink - (undocumented)
        Returns:
        (undocumented)