parent
f2e39c7534
commit
ccf5d46a58
12 changed files with 321 additions and 7 deletions
17
akka-stream/src/main/scala/akka/stream/javadsl/SubSource.scala
Normal file → Executable file
17
akka-stream/src/main/scala/akka/stream/javadsl/SubSource.scala
Normal file → Executable file
|
|
@ -1157,6 +1157,23 @@ class SubSource[+Out, +Mat](delegate: scaladsl.SubFlow[Out, Mat, scaladsl.Source
|
|||
def divertTo(that: Graph[SinkShape[Out], _], when: function.Predicate[Out]): SubSource[Out, Mat] =
|
||||
new SubSource(delegate.divertTo(that, when.test))
|
||||
|
||||
/**
|
||||
* Attaches the given [[Sink]] to this [[Flow]] as a wire tap, meaning that elements that pass
|
||||
* through will also be sent to the wire-tap Sink, without the latter affecting the mainline flow.
|
||||
* If the wire-tap Sink backpressures, elements that would've been sent to it will be dropped instead.
|
||||
*
|
||||
* '''Emits when''' element is available and demand exists from the downstream; the element will
|
||||
* also be sent to the wire-tap Sink if there is demand.
|
||||
*
|
||||
* '''Backpressures when''' downstream backpressures
|
||||
*
|
||||
* '''Completes when''' upstream completes
|
||||
*
|
||||
* '''Cancels when''' downstream cancels
|
||||
*/
|
||||
def wireTap(that: Graph[SinkShape[Out], _]): SubSource[Out, Mat] =
|
||||
new SubSource(delegate.wireTap(that))
|
||||
|
||||
/**
|
||||
* Merge the given [[Source]] to this [[Flow]], taking elements as they arrive from input streams,
|
||||
* picking randomly when several elements ready.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue