Or, if to reformulate, how does transparent stage look?
--
>> Read the docs: http://akka.io/docs/
>> Check the FAQ:
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>> Search the archives: https://groups.google.com/group/akka-user
---
Yo
Johan, hi!
Sorry, haven't grokked exactly :)
Do I understand correctly, in code above I must eliminate all
complete()/cancel() calls, instead just bothering about own clean up only?
In other words, are `finish` events propagating to other stages
independently these my stage's in/out handlers?
In general the sources and sinks should take care of cleaning up themselves
rather than have some downstream/upstream element report
cancel/failure/completion through a side channel, if you are implementing a
custom Source it's OutHandler will get a onDownstreamFinish and if your are
writing a Sink
Or - must the last method be
override def onDownstreamFinish(): Unit = {
cancel(in)
onDownFinish
}
?
--
>> Read the docs: http://akka.io/docs/
>> Check the FAQ:
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>
At the moment I have got this approach. Let's define a stage:
class OnFinish[A] extends GraphStage[FlowShape[A, A]] {
def onUpFinish: Unit = {}
def onDownFinish: Unit = {}
val in = Inlet[A]("onFinish.in")
val out = Outlet[A]("onFinish.out")
override val shape = FlowShape.of(in, out)