public class CollectorStage<T> extends org.apache.pekko.stream.stage.GraphStageWithMaterializedValue<org.apache.pekko.stream.SinkShape<T>,Collect<T>>
When this is added to a fused flow it can be used to check what output and completion a given input will bring. Because the side-channel will go through the mailbox of the ActorGraphInterpreter the hope is that the fused stream will "run to exhaustion", i.e. it will run as far as it can, so that when the side-channel event is processed, no other (internal) events are still to be processed. This assumption does not hold if the source stream has asynchronous boundaries or components.
TODO: allow multiple rescheduling of AsyncCallback to make it more likely that all internal queues have been processed.
Modifier and Type | Class and Description |
---|---|
class |
CollectorStage.Completed |
class |
CollectorStage.Completed$ |
class |
CollectorStage.Initialized$ |
class |
CollectorStage.Scheduled |
class |
CollectorStage.Scheduled$ |
static interface |
CollectorStage.State
State of the callback infrastructure
|
class |
CollectorStage.Uninitialized$ |
Constructor and Description |
---|
CollectorStage() |
Modifier and Type | Method and Description |
---|---|
scala.Tuple2<org.apache.pekko.stream.stage.GraphStageLogic,Collect<T>> |
createLogicAndMaterializedValue(org.apache.pekko.stream.Attributes inheritedAttributes) |
org.apache.pekko.stream.Inlet<T> |
in() |
CollectorStage.Initialized$ |
Initialized()
Accessor for nested Scala object
|
static <T,U> scala.concurrent.Future<scala.Tuple2<scala.collection.immutable.Seq<U>,java.lang.Object>> |
resultAfterSourceElements(org.apache.pekko.stream.scaladsl.Source<T,java.lang.Object> source,
org.apache.pekko.stream.scaladsl.Flow<T,U,java.lang.Object> flow,
org.apache.pekko.stream.Materializer materializer) |
org.apache.pekko.stream.SinkShape<T> |
shape() |
CollectorStage.Uninitialized$ |
Uninitialized()
Accessor for nested Scala object
|
addAttributes, async, async, async, createLogicAndMaterializedValue, getAttributes, initialAttributes, named, traversalBuilder, withAttributes
public static <T,U> scala.concurrent.Future<scala.Tuple2<scala.collection.immutable.Seq<U>,java.lang.Object>> resultAfterSourceElements(org.apache.pekko.stream.scaladsl.Source<T,java.lang.Object> source, org.apache.pekko.stream.scaladsl.Flow<T,U,java.lang.Object> flow, org.apache.pekko.stream.Materializer materializer)
public CollectorStage.Uninitialized$ Uninitialized()
public CollectorStage.Initialized$ Initialized()
public org.apache.pekko.stream.Inlet<T> in()
public org.apache.pekko.stream.SinkShape<T> shape()