Deprecate actor materializer (#27538)
This commit is contained in:
parent
8765a4fbe6
commit
b68d67008a
118 changed files with 1233 additions and 731 deletions
|
|
@ -305,13 +305,23 @@ object Source {
|
|||
new Source(LinearTraversalBuilder.fromBuilder(other.traversalBuilder, other.shape, Keep.right), other.shape)
|
||||
}
|
||||
|
||||
/**
|
||||
* 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: (Materializer, Attributes) => Source[T, M]): Source[T, Future[M]] =
|
||||
Source.fromGraph(new SetupSourceStage(factory))
|
||||
|
||||
/**
|
||||
* 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: (ActorMaterializer, Attributes) => Source[T, M]): Source[T, Future[M]] =
|
||||
Source.fromGraph(new SetupSourceStage(factory))
|
||||
Source.fromGraph(new SetupSourceStage((materializer, attributes) =>
|
||||
factory(ActorMaterializerHelper.downcast(materializer), attributes)))
|
||||
|
||||
/**
|
||||
* Helper to create [[Source]] from `Iterable`.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue