Deprecate actor materializer (#27538)
This commit is contained in:
parent
8765a4fbe6
commit
b68d67008a
118 changed files with 1233 additions and 731 deletions
|
|
@ -366,11 +366,21 @@ object Source {
|
|||
case other => new Source(scaladsl.Source.fromGraph(other))
|
||||
}
|
||||
|
||||
/**
|
||||
* Defers the creation of a [[Source]] until materialization. The `factory` function
|
||||
* exposes [[Materializer]] which is going to be used during materialization and
|
||||
* [[Attributes]] of the [[Source]] returned by this method.
|
||||
*/
|
||||
def fromMaterializer[T, M](
|
||||
factory: BiFunction[Materializer, Attributes, Source[T, M]]): Source[T, CompletionStage[M]] =
|
||||
scaladsl.Source.fromMaterializer((mat, attr) => factory(mat, attr).asScala).mapMaterializedValue(_.toJava).asJava
|
||||
|
||||
/**
|
||||
* Defers the creation of a [[Source]] until materialization. The `factory` function
|
||||
* exposes [[ActorMaterializer]] which is going to be used during materialization and
|
||||
* [[Attributes]] of the [[Source]] returned by this method.
|
||||
*/
|
||||
@deprecated("Use 'fromMaterializer' instead", "2.6.0")
|
||||
def setup[T, M](factory: BiFunction[ActorMaterializer, Attributes, Source[T, M]]): Source[T, CompletionStage[M]] =
|
||||
scaladsl.Source.setup((mat, attr) => factory(mat, attr).asScala).mapMaterializedValue(_.toJava).asJava
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue