Package

akka.stream

actor

Permalink

package actor

Content Hierarchy
Visibility
  1. Public
  2. All

Type Members

  1. sealed abstract class ActorPublisherMessage extends DeadLetterSuppression

    Permalink
  2. sealed abstract class ActorSubscriberMessage extends DeadLetterSuppression with NoSerializationVerificationNeeded

    Permalink
  3. abstract class MaxInFlightRequestStrategy extends RequestStrategy

    Permalink

    Requests up to the max and also takes the number of messages that have been queued internally or delegated to other actors into account.

    Requests up to the max and also takes the number of messages that have been queued internally or delegated to other actors into account. Concrete subclass must implement #inFlightInternally. It will request elements in minimum batches of the defined #batchSize.

  4. trait RequestStrategy extends AnyRef

    Permalink

    An ActorSubscriber defines a RequestStrategy to control the stream back pressure.

  5. final case class WatermarkRequestStrategy(highWatermark: Int, lowWatermark: Int) extends RequestStrategy with Product with Serializable

    Permalink

    Requests up to the highWatermark when the remainingRequested is below the lowWatermark.

    Requests up to the highWatermark when the remainingRequested is below the lowWatermark. This a good strategy when the actor performs work itself.

  6. abstract class AbstractActorPublisher[T] extends AbstractActor with ActorPublisher[T]

    Permalink

    Java API compatible with lambda expressions

    Java API compatible with lambda expressions

    Annotations
    @deprecated
    Deprecated

    (Since version 2.5.0) Use akka.stream.stage.GraphStage instead, it allows for all operations an Actor would and is more type-safe as well as guaranteed to be ReactiveStreams compliant.

    See also

    akka.stream.actor.ActorPublisher

  7. abstract class AbstractActorPublisherWithStash[T] extends AbstractActor with ActorPublisher[T] with Stash

    Permalink

    Java API compatible with lambda expressions.

    Java API compatible with lambda expressions. This class adds a Stash to AbstractActorPublisher.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.5.0) Use akka.stream.stage.GraphStage instead, it allows for all operations an Actor would and is more type-safe as well as guaranteed to be ReactiveStreams compliant.

    See also

    akka.stream.actor.ActorPublisher and akka.stream.actor.AbstractActorWithStash

  8. abstract class AbstractActorPublisherWithUnboundedStash[T] extends AbstractActor with ActorPublisher[T] with UnboundedStash

    Permalink

    Java API compatible with lambda expressions.

    Java API compatible with lambda expressions. This class adds an unbounded Stash to AbstractActorPublisher.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.5.0) Use akka.stream.stage.GraphStage instead, it allows for all operations an Actor would and is more type-safe as well as guaranteed to be ReactiveStreams compliant.

    See also

    akka.stream.actor.ActorPublisher and akka.stream.actor.AbstractActorWithUnboundedStash

  9. abstract class AbstractActorPublisherWithUnrestrictedStash[T] extends AbstractActor with ActorPublisher[T] with UnrestrictedStash

    Permalink

    Java API compatible with lambda expressions.

    Java API compatible with lambda expressions. This class adds an unrestricted Stash to AbstractActorPublisher.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.5.0) Use akka.stream.stage.GraphStage instead, it allows for all operations an Actor would and is more type-safe as well as guaranteed to be ReactiveStreams compliant.

    See also

    akka.stream.actor.ActorPublisher and akka.stream.actor.AbstractActorWithUnrestrictedStash

  10. abstract class AbstractActorSubscriber extends AbstractActor with ActorSubscriber

    Permalink

    Java API compatible with lambda expressions

    Java API compatible with lambda expressions

    Annotations
    @deprecated
    Deprecated

    (Since version 2.5.0) Use akka.stream.stage.GraphStage instead, it allows for all operations an Actor would and is more type-safe as well as guaranteed to be ReactiveStreams compliant.

    See also

    akka.stream.actor.ActorSubscriber

  11. trait ActorPublisher[T] extends Actor

    Permalink

    Extend/mixin this trait in your akka.actor.Actor to make it a stream publisher that keeps track of the subscription life cycle and requested elements.

    Extend/mixin this trait in your akka.actor.Actor to make it a stream publisher that keeps track of the subscription life cycle and requested elements.

    Create a org.reactivestreams.Publisher backed by this actor with Scala API ActorPublisher#apply, or Java API UntypedActorPublisher#create or Java API compatible with lambda expressions AbstractActorPublisher#create.

    It can be attached to a org.reactivestreams.Subscriber or be used as an input source for a akka.stream.scaladsl.Flow. You can only attach one subscriber to this publisher.

    The life cycle state of the subscription is tracked with the following boolean members: #isActive, #isCompleted, #isErrorEmitted, and #isCanceled.

    You send elements to the stream by calling #onNext. You are allowed to send as many elements as have been requested by the stream subscriber. This amount can be inquired with #totalDemand. It is only allowed to use onNext when isActive and totalDemand > 0, otherwise onNext will throw IllegalStateException.

    When the stream subscriber requests more elements the ActorPublisher#Request message is delivered to this actor, and you can act on that event. The #totalDemand is updated automatically.

    When the stream subscriber cancels the subscription the ActorPublisher#Cancel message is delivered to this actor. After that subsequent calls to onNext will be ignored.

    You can complete the stream by calling #onComplete. After that you are not allowed to call #onNext, #onError and #onComplete.

    You can terminate the stream with failure by calling #onError. After that you are not allowed to call #onNext, #onError and #onComplete.

    If you suspect that this ActorPublisher may never get subscribed to, you can override the #subscriptionTimeout method to provide a timeout after which this Publisher should be considered canceled. The actor will be notified when the timeout triggers via an akka.stream.actor.ActorPublisherMessage.SubscriptionTimeoutExceeded message and MUST then perform cleanup and stop itself.

    If the actor is stopped the stream will be completed, unless it was not already terminated with failure, completed or canceled.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.5.0) Use akka.stream.stage.GraphStage instead, it allows for all operations an Actor would and is more type-safe as well as guaranteed to be ReactiveStreams compliant.

  12. trait ActorSubscriber extends Actor

    Permalink

    Extend/mixin this trait in your akka.actor.Actor to make it a stream subscriber with full control of stream back pressure.

    Extend/mixin this trait in your akka.actor.Actor to make it a stream subscriber with full control of stream back pressure. It will receive ActorSubscriberMessage.OnNext, ActorSubscriberMessage.OnComplete and ActorSubscriberMessage.OnError messages from the stream. It can also receive other, non-stream messages, in the same way as any actor.

    Attach the actor as a org.reactivestreams.Subscriber to the stream with Scala API ActorSubscriber#apply, or Java API UntypedActorSubscriber#create or Java API compatible with lambda expressions AbstractActorSubscriber#create.

    Subclass must define the RequestStrategy to control stream back pressure. After each incoming message the ActorSubscriber will automatically invoke the RequestStrategy#requestDemand and propagate the returned demand to the stream. The provided WatermarkRequestStrategy is a good strategy if the actor performs work itself. The provided MaxInFlightRequestStrategy is useful if messages are queued internally or delegated to other actors. You can also implement a custom RequestStrategy or call #request manually together with ZeroRequestStrategy or some other strategy. In that case you must also call #request when the actor is started or when it is ready, otherwise it will not receive any elements.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.5.0) Use akka.stream.stage.GraphStage instead, it allows for all operations an Actor would and is more type-safe as well as guaranteed to be ReactiveStreams compliant.

  13. abstract class UntypedActorPublisher[T] extends UntypedActor with ActorPublisher[T]

    Permalink

    Java API

    Java API

    Annotations
    @deprecated
    Deprecated

    (Since version 2.5.0) Use akka.stream.stage.GraphStage instead, it allows for all operations an Actor would and is more type-safe as well as guaranteed to be ReactiveStreams compliant.

    See also

    akka.stream.actor.ActorPublisher

  14. abstract class UntypedActorSubscriber extends UntypedActor with ActorSubscriber

    Permalink

    Java API

    Java API

    Annotations
    @deprecated
    Deprecated

    (Since version 2.5.0) Use akka.stream.stage.GraphStage instead, it allows for all operations an Actor would and is more type-safe as well as guaranteed to be ReactiveStreams compliant.

    See also

    akka.stream.actor.ActorSubscriber

Value Members

  1. object AbstractActorPublisher

    Permalink

    Java API compatible with lambda expressions

  2. object ActorPublisherMessage

    Permalink
  3. object ActorSubscriber

    Permalink
  4. object ActorSubscriberMessage

    Permalink
  5. object OneByOneRequestStrategy extends RequestStrategy with Product with Serializable

    Permalink

    Requests one more element when remainingRequested is 0, i.e.

    Requests one more element when remainingRequested is 0, i.e. max one element in flight.

  6. object UntypedActorPublisher

    Permalink

    Java API

  7. object UntypedActorSubscriber

    Permalink

    Java API

  8. object WatermarkRequestStrategy extends Serializable

    Permalink
  9. object ZeroRequestStrategy extends RequestStrategy with Product with Serializable

    Permalink

    When request is only controlled with manual calls to ActorSubscriber#request.

Deprecated Value Members

  1. object AbstractActorSubscriber

    Permalink

    Java API compatible with lambda expressions

    Java API compatible with lambda expressions

    Annotations
    @deprecated
    Deprecated

    (Since version 2.5.0) Use akka.stream.stage.GraphStage instead, it allows for all operations an Actor would and is more type-safe as well as guaranteed to be ReactiveStreams compliant.

  2. object ActorPublisher

    Permalink
    Annotations
    @deprecated
    Deprecated

    (Since version 2.5.0) Use akka.stream.stage.GraphStage instead, it allows for all operations an Actor would and is more type-safe as well as guaranteed to be ReactiveStreams compliant.

Ungrouped