Package org.apache.pekko.stream
package org.apache.pekko.stream
-
ClassDescriptionSignal that the operator was abruptly terminated, usually seen as a call to
postStopof theGraphStageLogicwithout any of the handler callbacks seeing completion or failure from upstream or cancellation from downstream.A base exception for abrupt stream termination.This exception signals that an actor implementing a Reactive Streams Subscriber, Publisher or Processor has been terminated without being notified by an onError, onComplete or cancel signal.Java API for creating customShapetypes.Attributes for theMaterializer.Enables additional low level troubleshooting logging at DEBUG log levelConfigures the dispatcher to be used by streams.Test utility: fuzzing mode means that GraphStage events are not processed in FIFO order within a fused subgraph, but randomized.Configure the maximum buffer size for which a FixedSizeBuffer will be preallocated.Maximum number of elements emitted in batch if downstream signals large demand.Defines a timeout for stream subscription and what action to take when that hits.Limit for number of messages that can be processed synchronously in stream to substream communication.Attributes for theMaterializer.This class describes the configurable properties of theActorMaterializer.This type ofShapecan express any number of inputs and outputs at the expense of forgetting about their specific types.Holds attributes which can be used to alterpekko.stream.scaladsl.Flow/pekko.stream.javadsl.Floworpekko.stream.scaladsl.GraphDSL/pekko.stream.javadsl.GraphDSLmaterialization.Note that more attributes for theMaterializerare defined inActorAttributes.Cancellation strategies provide a way to configure the behavior of a stage whencancelStageis called.Strategy that allows to delay any action whencancelStageis invoked.Strategy that treatscancelStagethe same ascompleteStage, i.e.Strategy that treatscancelStagethe same asfailStage, i.e.Strategy that treatscancelStagein different ways depending on the cause that was given to the cancellation.Each asynchronous piece of a materialized stream topology is executed by one Actor that manages an input buffer for all inlets of its shape.Attributes that are always present (is defined with default values by the materializer)Nested materialization cancellation strategy provides a way to configure the cancellation behavior of stages that materialize a nested flow.Attribute that contains the source location of for example a lambda passed to an operator, useful for example for debugging.Note that more attributes for theMaterializerare defined inActorAttributes.BidiShape<In1,Out1, In2, Out2> A bidirectional flow of elements that consequently has two inputs and two outputs, arranged like this:A queue of the given size that gives immediate feedback whether an element could be enqueued or not.The client is usually the side that consumes the service provided by its interlocutor.ThisShapeis used for graphs that have neither open inputs nor open outputs.INTERNAL APIINTERNAL APIRepresents a strategy that decides how to deal with a buffer of time based operator that is full but is about to receive a new element.seeTLSClosingFanInShape<O>FanInShape10<T0,T1, T2, T3, T4, T5, T6, T7, T8, T9, O> FanInShape11<T0,T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, O> FanInShape12<T0,T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, O> FanInShape13<T0,T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, O> FanInShape14<T0,T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, O> FanInShape15<T0,T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, O> FanInShape16<T0,T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, O> FanInShape17<T0,T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, O> FanInShape18<T0,T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, O> FanInShape19<T0,T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, O> FanInShape2<T0,T1, O> FanInShape20<T0,T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, O> FanInShape21<T0,T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, O> FanInShape22<T0,T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, O> FanInShape3<T0,T1, T2, O> FanInShape4<T0,T1, T2, T3, O> FanInShape5<T0,T1, T2, T3, T4, O> FanInShape6<T0,T1, T2, T3, T4, T5, O> FanInShape7<T0,T1, T2, T3, T4, T5, T6, O> FanInShape8<T0,T1, T2, T3, T4, T5, T6, T7, O> FanInShape9<T0,T1, T2, T3, T4, T5, T6, T7, T8, O> FanOutShape<I>FanOutShape10<I,O0, O1, O2, O3, O4, O5, O6, O7, O8, O9> FanOutShape11<I,O0, O1, O2, O3, O4, O5, O6, O7, O8, O9, O10> FanOutShape12<I,O0, O1, O2, O3, O4, O5, O6, O7, O8, O9, O10, O11> FanOutShape13<I,O0, O1, O2, O3, O4, O5, O6, O7, O8, O9, O10, O11, O12> FanOutShape14<I,O0, O1, O2, O3, O4, O5, O6, O7, O8, O9, O10, O11, O12, O13> FanOutShape15<I,O0, O1, O2, O3, O4, O5, O6, O7, O8, O9, O10, O11, O12, O13, O14> FanOutShape16<I,O0, O1, O2, O3, O4, O5, O6, O7, O8, O9, O10, O11, O12, O13, O14, O15> FanOutShape17<I,O0, O1, O2, O3, O4, O5, O6, O7, O8, O9, O10, O11, O12, O13, O14, O15, O16> FanOutShape18<I,O0, O1, O2, O3, O4, O5, O6, O7, O8, O9, O10, O11, O12, O13, O14, O15, O16, O17> FanOutShape19<I,O0, O1, O2, O3, O4, O5, O6, O7, O8, O9, O10, O11, O12, O13, O14, O15, O16, O17, O18> FanOutShape2<I,O0, O1> FanOutShape20<I,O0, O1, O2, O3, O4, O5, O6, O7, O8, O9, O10, O11, O12, O13, O14, O15, O16, O17, O18, O19> FanOutShape21<I,O0, O1, O2, O3, O4, O5, O6, O7, O8, O9, O10, O11, O12, O13, O14, O15, O16, O17, O18, O19, O20> FanOutShape22<I,O0, O1, O2, O3, O4, O5, O6, O7, O8, O9, O10, O11, O12, O13, O14, O15, O16, O17, O18, O19, O20, O21> FanOutShape3<I,O0, O1, O2> FanOutShape4<I,O0, O1, O2, O3> FanOutShape5<I,O0, O1, O2, O3, O4> FanOutShape6<I,O0, O1, O2, O3, O4, O5> FanOutShape7<I,O0, O1, O2, O3, O4, O5, O6> FanOutShape8<I,O0, O1, O2, O3, O4, O5, O6, O7> FanOutShape9<I,O0, O1, O2, O3, O4, O5, O6, O7, O8> FlowMonitor<T>Used to monitor the state of a streamStream failedStream completed successfullyStream was created, but no events have passed through itStream processed a messageFlowShape<I,O> A FlowShapehas exactly one input and one output, it looks from the outside like a pipe (but it can be a complex topology of streams within of course).Not intended to be directly extended by user classesScala API, see https://github.com/akka/akka/issues/28501 for discussion why this can't be an instance method on class Graph.seeTLSClosingseeTLSClosingseeTLSClosingInlet<T>An Inlet is a typed input to a Shape.An input port of a StreamLayout.Module.Stream refs establish a connection between a local and remote actor, representing the origin and remote sides of a stream.This exception signals that a stream has been completed or has an error while there was still IO operations in progressHolds a result of an IO operation.AKillSwitchallows completion ofGraphs from the outside by completingGraphs ofFlowShapelinked to the switch.Creates shared or single kill switches which can be used to control completion of graphs from the outside.Creates shared or single kill switches which can be used to control completion of graphs from the outside.Internal APIThis exception or subtypes thereof should be used to signal materialization failures.The Materializer is the component responsible for turning a stream blueprint into a running stream.Not for user extensionOutlet<T>An Outlet is a typed output to a Shape.An output port of a StreamLayout.Module.INTERNAL APIRepresents a strategy that decides how to deal with a buffer that is full but is about to receive a new element.Not for user extensionNot for user extensionType is used to indicate that stream is dropped an elementType is used to indicate that stream is successfully enqueued an elementType is used to indicate that stream is failed before or during call to the stream param: cause - exception that stream failed withType is used to indicate that stream is completed before callContains types that is used as return types for streams Source queuesException that is thrown when rated controlled by stream is exceededThe server is usually the side the provides the service to its interlocutor.A Shape describes the inlets and outlets of aGraph.INTERNAL APIASharedKillSwitchis a provider forGraphs ofFlowShapethat can be completed or failed from the outside.SinkRef<In>ASinkRefallows sharing a "reference" to ascaladsl.Sinkwith others, with the main purpose of crossing a network boundary.See full documentation onSinkRef.SinkShape<T>A SinkShapehas exactly one input and no outputs, it models a data sink.SourceRef<T>A SourceRef allows sharing a "reference" with others, with the main purpose of crossing a network boundary.See full documentation onSourceRef.SourceShape<T>A SourceShapehas exactly one output and no inputs, it models a source of data.This exception signals that materialized value is already detached from stream.Attributes for stream refs (pekko.stream.SourceRefandpekko.stream.SinkRef).Attributes specific to stream refs.Attributes for stream refs (pekko.stream.SourceRefandpekko.stream.SinkRef).Protobuf typeActorRefProtobuf typeActorRefProtobuf typeCumulativeDemandProtobuf typeCumulativeDemandProtobuf typeOnSubscribeHandshakeProtobuf typeOnSubscribeHandshakeProtobuf typePayloadProtobuf typePayloadProtobuf typeRemoteStreamCompletedProtobuf typeRemoteStreamCompletedProtobuf typeRemoteStreamFailureProtobuf typeRemoteStreamFailureProtobuf typeSequencedOnNextProtobuf typeSequencedOnNextProtobuf typeSinkRefProtobuf typeSinkRefProtobuf typeSourceRefProtobuf typeSourceRefThe stream ref resolver provides a way to serialize and deserialize streamrefs in user serializers.The stream ref resolver extension provides a way to serialize and deserialize streamrefs in user serializers.Leaked publishers and subscribers are cleaned up when they are not used within a given deadline, configured byStreamSubscriptionTimeoutSettings.This mode describes what shall happen when the subscription timeout expires for substream Publishers created by operations likeprefixAndTail.Base class for timeout exceptions specific to Pekko StreamsExtension of Subscription that allows to pass a cause when a subscription is cancelled.Not for user extensionINTERNAL APIINTERNAL APIDeprecated.Use .withAttributes(ActorAttributes.supervisionStrategy(equivalentDecider)) rather than a SubstreamCancelStrategy.Deprecated.Use .withAttributes(ActorAttributes.supervisionStrategy(equivalentDecider)) rather than a SubstreamCancelStrategy.Scala API: The element is dropped and the stream continues after restarting the operator if application code for processing an element throws an exception.Scala API: The element is dropped and the stream continues if application code for processing an element throws an exception.Scala API: The stream will be completed with failure if application code for processing an element throws an exception.The system materializer is a default materializer to use for most cases running streams, it is a single instance per actor system that is tied to the lifecycle of that system.Represents a mode that decides how to deal exceed rate for Throttle operatorMakes throttle fail with exception when upstream is faster than throttle rateTells throttle to make pauses before emitting messages to meet throttle rateAn SSLEngine can either demand, allow or ignore its peer’s authentication (via certificates), whereNeedwill fail the handshake if the peer does not provide valid credentials,Wantallows the peer to send credentials and verifies them if provided, andNonedisables peer certificate verification.All streams in Pekko are unidirectional: while in a complex flow graph data may flow in multiple directions these individual flows are independent from each other.Initiate a new session negotiation.Send the givenpekko.util.ByteStringacross the encrypted session to the peer.Plaintext bytes emitted by the SSLEngine are received over one specific encryption session and this class bundles the bytes with the SSLSession object.If the underlying transport is closed before the final TLS closure command is received from the peer then the SSLEngine will throw an SSLException that warns about possible truncation attacks.This is the supertype of all messages that the SslTls operator emits on the plaintext side.This is the supertype of all messages that the SslTls operator accepts on its plaintext side.Many protocols are asymmetric and distinguish between the client and the server, where the latter listens passively for messages and the former actively initiates the exchange.This exception signals that the maximum number of substreams declared has been exceeded.UniformFanInShape<T,O> UniformFanOutShape<I,O> AUniqueKillSwitchis always a result of a materialization (unlikeSharedKillSwitchwhich is constructed before any materialization) and it always controls that graph and operator which yielded the materialized value.Used as failure exception by anaskoperator if the target actor terminates.