Trait

org.squbs.stream

PerpetualStream

Related Doc: package stream

Permalink

trait PerpetualStream[T] extends Actor with ActorLogging with Stash with GracefulStopHelper

Traits for perpetual streams that start and stop with the server. The simplest conforming implementation follows these requirements:

T

The type of the materialized value of the stream.

Linear Supertypes
GracefulStopHelper, GracefulStopSupport, Stash, RequiresMessageQueue[DequeBasedMessageQueueSemantics], UnrestrictedStash, StashSupport, ActorLogging, Actor, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. PerpetualStream
  2. GracefulStopHelper
  3. GracefulStopSupport
  4. Stash
  5. RequiresMessageQueue
  6. UnrestrictedStash
  7. StashSupport
  8. ActorLogging
  9. Actor
  10. AnyRef
  11. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. type Receive = PartialFunction[Any, Unit]

    Permalink
    Definition Classes
    Actor

Abstract Value Members

  1. abstract def streamGraph: RunnableGraph[T]

    Permalink

    Describe your graph by implementing streamGraph

    Describe your graph by implementing streamGraph

    returns

    The graph.

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def aroundPostRestart(reason: Throwable): Unit

    Permalink
    Attributes
    protected[akka]
    Definition Classes
    Actor
  5. def aroundPostStop(): Unit

    Permalink
    Attributes
    protected[akka]
    Definition Classes
    Actor
  6. def aroundPreRestart(reason: Throwable, message: Option[Any]): Unit

    Permalink
    Attributes
    protected[akka]
    Definition Classes
    Actor
  7. def aroundPreStart(): Unit

    Permalink
    Attributes
    protected[akka]
    Definition Classes
    Actor
  8. def aroundReceive(receive: akka.actor.Actor.Receive, msg: Any): Unit

    Permalink
    Attributes
    protected[akka]
    Definition Classes
    Actor
  9. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  10. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. implicit val context: ActorContext

    Permalink
    Definition Classes
    Actor
  12. def decider: Decider

    Permalink

    The decider to use.

    The decider to use. Override if not resumingDecider.

  13. final def defaultLeafActorStop: Unit

    Permalink

    Default gracefully stop behavior for leaf level actors (Actors only receive the msg as input and send out a result) towards the GracefulStop message

    Default gracefully stop behavior for leaf level actors (Actors only receive the msg as input and send out a result) towards the GracefulStop message

    Simply stop itself

    Attributes
    protected
    Definition Classes
    GracefulStopHelper
  14. final def defaultMidActorStop(dependencies: Iterable[ActorRef], timeout: FiniteDuration = stopTimeout / 2): Unit

    Permalink

    Default gracefully stop behavior for middle level actors (Actors rely on the results of other actors to finish their tasks) towards the GracefulStop message

    Default gracefully stop behavior for middle level actors (Actors rely on the results of other actors to finish their tasks) towards the GracefulStop message

    Simply propagate the GracefulStop message to all actors that should be stop ahead of this actor

    If some actors failed to respond to the GracefulStop message, It will send PoisonPill again

    After all the actors get terminated it stops itself

    Attributes
    protected
    Definition Classes
    GracefulStopHelper
  15. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  16. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  17. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  18. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  19. def gracefulStop(target: ActorRef, timeout: FiniteDuration, stopMessage: Any): Future[Boolean]

    Permalink
    Definition Classes
    GracefulStopSupport
  20. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  21. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  22. lazy val killSwitch: SharedKillSwitch

    Permalink

    The kill switch to integrate into the stream.

    The kill switch to integrate into the stream. Override this if you want a different switch or one that is shared between perpetual streams.

    returns

    The kill switch.

  23. def log: LoggingAdapter

    Permalink
    Definition Classes
    ActorLogging
  24. final def matValue: T

    Permalink
  25. implicit val materializer: ActorMaterializer

    Permalink
  26. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  27. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  28. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  29. def postRestart(reason: Throwable): Unit

    Permalink
    Definition Classes
    Actor
    Annotations
    @throws( classOf[java.lang.Exception] )
  30. def postStop(): Unit

    Permalink
    Definition Classes
    UnrestrictedStash → Actor
  31. def preRestart(reason: Throwable, message: Option[Any]): Unit

    Permalink
    Definition Classes
    UnrestrictedStash → Actor
  32. def preStart(): Unit

    Permalink
    Definition Classes
    Actor
    Annotations
    @throws( classOf[java.lang.Exception] )
  33. def receive: Receive

    Permalink
    Definition Classes
    PerpetualStream → Actor
  34. final def running: Receive

    Permalink
  35. implicit final val self: ActorRef

    Permalink
    Definition Classes
    Actor
  36. final def sender(): ActorRef

    Permalink
    Definition Classes
    Actor
  37. def shutdown(): Future[Done]

    Permalink

    Override shutdown to define your own shutdown process or wait for the sink to finish.

    Override shutdown to define your own shutdown process or wait for the sink to finish. The default shutdown makes the following assumptions:

    • The stream materializes to a Future or a Product (Tuple, List, etc.) for which the last element is a Future
    • This Future represents the state whether the stream is done
    • The stream has the killSwitch as the first processing stage In which case you do not need to override this default shutdown if there are no further shutdown requirements. In case you override shutdown, it is recommended that super.shutdown() be called on overrides even if the stream only partially meets the requirements above.
    returns

    A Future[Done] that gets completed when the whole stream is done.

  38. final def starting: Receive

    Permalink
  39. def stash(): Unit

    Permalink
    Definition Classes
    StashSupport
  40. def stopTimeout: FiniteDuration

    Permalink

    Duration that the actor needs to finish the graceful stop.

    Duration that the actor needs to finish the graceful stop. Override it for customized timeout and it will be registered to the reaper Default to 5 seconds

    returns

    Duration

    Definition Classes
    GracefulStopHelper
  41. final def stopped(children: Iterable[ActorRef]): Receive

    Permalink
  42. def supervisorStrategy: SupervisorStrategy

    Permalink
    Definition Classes
    Actor
  43. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  44. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  45. def unhandled(message: Any): Unit

    Permalink
    Definition Classes
    Actor
  46. def unstashAll(): Unit

    Permalink
    Definition Classes
    StashSupport
  47. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  48. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  49. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from GracefulStopHelper

Inherited from GracefulStopSupport

Inherited from Stash

Inherited from RequiresMessageQueue[DequeBasedMessageQueueSemantics]

Inherited from UnrestrictedStash

Inherited from StashSupport

Inherited from ActorLogging

Inherited from Actor

Inherited from AnyRef

Inherited from Any

Ungrouped