parent
f8d7b0c94a
commit
2cccfa3c29
5 changed files with 57 additions and 6 deletions
|
|
@ -929,6 +929,24 @@ final class Source[Out, Mat](delegate: scaladsl.Source[Out, Mat]) extends Graph[
|
|||
def toMat[M, M2](sink: Graph[SinkShape[Out], M], combine: function.Function2[Mat, M, M2]): javadsl.RunnableGraph[M2] =
|
||||
RunnableGraph.fromGraph(delegate.toMat(sink)(combinerToScala(combine)))
|
||||
|
||||
/**
|
||||
* Connect this `Source` to the `Sink.ignore` and run it. Elements from the stream will be consumed and discarded.
|
||||
*
|
||||
* Note that the `ActorSystem` can be used as the `materializer` parameter to use the
|
||||
* [[akka.stream.SystemMaterializer]] for running the stream.
|
||||
*/
|
||||
def run(materializer: Materializer): CompletionStage[Done] =
|
||||
delegate.run()(materializer).toJava
|
||||
|
||||
/**
|
||||
* Connect this `Source` to the `Sink.ignore` and run it. Elements from the stream will be consumed and discarded.
|
||||
*
|
||||
* Note that the `ActorSystem` can be used as the `systemProvider` parameter to use the
|
||||
* [[akka.stream.SystemMaterializer]] for running the stream.
|
||||
*/
|
||||
def run(systemProvider: ClassicActorSystemProvider): CompletionStage[Done] =
|
||||
delegate.run()(SystemMaterializer(systemProvider.classicSystem).materializer).toJava
|
||||
|
||||
/**
|
||||
* Connect this `Source` to a `Sink` and run it. The returned value is the materialized value
|
||||
* of the `Sink`, e.g. the `Publisher` of a `Sink.asPublisher`.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue