public class AkkaStreams
extends java.lang.Object
| Constructor and Description |
|---|
AkkaStreams() |
| Modifier and Type | Method and Description |
|---|---|
static <In,FlowIn,Out> |
bypassWith(akka.stream.javadsl.Flow<In,F.Either<FlowIn,Out>,?> splitter,
akka.stream.Graph<akka.stream.UniformFanInShape<Out,Out>,?> mergeStrategy,
akka.stream.javadsl.Flow<FlowIn,Out,?> flow)
Using the given splitter flow, allow messages to bypass a flow.
|
static <In,FlowIn,Out> |
bypassWith(java.util.function.Function<In,F.Either<FlowIn,Out>> splitter,
akka.stream.javadsl.Flow<FlowIn,Out,?> flow)
Bypass the given flow using the given splitter function.
|
public static <In,FlowIn,Out> akka.stream.javadsl.Flow<In,Out,?> bypassWith(java.util.function.Function<In,F.Either<FlowIn,Out>> splitter, akka.stream.javadsl.Flow<FlowIn,Out,?> flow)
If the splitter function returns Left, they will go through the flow. If it returns Right, they will bypass the flow.
Uses onlyFirstCanFinishMerge(2) by default.
In - the In type parameter for FlowFlowIn - the FlowIn type parameter for the left branch in Either.Out - the Out type parameter for Flowflow - the original flowsplitter - the splitter function to usepublic static <In,FlowIn,Out> akka.stream.javadsl.Flow<In,Out,?> bypassWith(akka.stream.javadsl.Flow<In,F.Either<FlowIn,Out>,?> splitter, akka.stream.Graph<akka.stream.UniformFanInShape<Out,Out>,?> mergeStrategy, akka.stream.javadsl.Flow<FlowIn,Out,?> flow)
If the splitter flow produces Left, they will be fed into the flow. If it produces Right, they will bypass the flow.
In - the In type parameter for FlowFlowIn - the FlowIn type parameter for the left branch in Either.Out - the Out type parameter for Flow.flow - the original flow.splitter - the splitter function.mergeStrategy - the merge strategy (onlyFirstCanFinishMerge, ignoreAfterFinish,
ignoreAfterCancellation)