WIP initial typed streams adapters
Adapt ref source and sink for typed * do not use the typed teskit temporarily
This commit is contained in:
parent
84b8f3ac29
commit
171bb6c231
16 changed files with 657 additions and 39 deletions
|
|
@ -168,7 +168,7 @@ import scala.collection.generic.CanBuildFrom
|
|||
/**
|
||||
* INTERNAL API
|
||||
*/
|
||||
@InternalApi private[akka] final class ActorRefSink[In](ref: ActorRef, onCompleteMessage: Any,
|
||||
@InternalApi private[akka] final class ActorRefSink[In](ref: ActorRef, onCompleteMessage: Any, onFailureMessage: Throwable ⇒ Any,
|
||||
val attributes: Attributes,
|
||||
shape: SinkShape[In]) extends SinkModule[In, NotUsed](shape) {
|
||||
|
||||
|
|
@ -177,14 +177,14 @@ import scala.collection.generic.CanBuildFrom
|
|||
val maxInputBufferSize = context.effectiveAttributes.mandatoryAttribute[Attributes.InputBuffer].max
|
||||
val subscriberRef = actorMaterializer.actorOf(
|
||||
context,
|
||||
ActorRefSinkActor.props(ref, maxInputBufferSize, onCompleteMessage))
|
||||
ActorRefSinkActor.props(ref, maxInputBufferSize, onCompleteMessage, onFailureMessage))
|
||||
(akka.stream.actor.ActorSubscriber[In](subscriberRef), NotUsed)
|
||||
}
|
||||
|
||||
override protected def newInstance(shape: SinkShape[In]): SinkModule[In, NotUsed] =
|
||||
new ActorRefSink[In](ref, onCompleteMessage, attributes, shape)
|
||||
new ActorRefSink[In](ref, onCompleteMessage, onFailureMessage, attributes, shape)
|
||||
override def withAttributes(attr: Attributes): SinkModule[In, NotUsed] =
|
||||
new ActorRefSink[In](ref, onCompleteMessage, attr, amendShape(attr))
|
||||
new ActorRefSink[In](ref, onCompleteMessage, onFailureMessage, attr, amendShape(attr))
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue