TimerGraphStageLogicWithLogging

org.apache.pekko.stream.stage.TimerGraphStageLogicWithLogging

Attributes

Source
GraphStage.scala
Graph
Supertypes
trait StageLogging
class Object
trait Matchable
class Any
Show all

Members list

Type members

Inherited classlikes

class SubSinkInlet[T](name: String)

INTERNAL API

INTERNAL API

This allows the dynamic creation of an Inlet for a GraphStage which is connected to a Sink that is available for materialization (e.g. using the subFusingMaterializer). Completion, cancellation and failure of the parent operator is automatically delegated to instances of SubSinkInlet to avoid resource leaks.

To be thread safe this method must only be called from either the constructor of the graph operator during materialization or one of the methods invoked by the graph operator machinery, such as onPush and onPull.

Attributes

Inherited from:
GraphStageLogic
Source
GraphStage.scala
Supertypes
class Object
trait Matchable
class Any
class SubSourceOutlet[T](name: String)

INTERNAL API

INTERNAL API

This allows the dynamic creation of an Outlet for a GraphStage which is connected to a Source that is available for materialization (e.g. using the subFusingMaterializer). Completion, cancellation and failure of the parent operator is automatically delegated to instances of SubSourceOutlet to avoid resource leaks.

Even so it is good practice to use the timeout method to cancel this Outlet in case the corresponding Source is not materialized within a given time limit, see e.g. ActorMaterializerSettings.

To be thread safe this method must only be called from either the constructor of the graph operator during materialization or one of the methods invoked by the graph operator machinery, such as onPush and onPull.

Attributes

Inherited from:
GraphStageLogic
Source
GraphStage.scala
Supertypes
class Object
trait Matchable
class Any

Value members

Inherited methods

final def cancelStage(cause: Throwable): Unit

Automatically invokes cancel or complete on all the input or output ports that have been called, then marks the stage as stopped.

Automatically invokes cancel or complete on all the input or output ports that have been called, then marks the stage as stopped.

Attributes

Inherited from:
GraphStageLogic
Source
GraphStage.scala
final protected def cancelTimer(timerKey: Any): Unit

Cancel timer, ensuring that the onTimer is not subsequently called.

Cancel timer, ensuring that the onTimer is not subsequently called.

Value parameters

timerKey

key of the timer to cancel

Attributes

Inherited from:
TimerGraphStageLogic
Source
GraphStage.scala
final def completeStage(): Unit

Automatically invokes cancel or complete on all the input or output ports that have been called, then marks the operator as stopped.

Automatically invokes cancel or complete on all the input or output ports that have been called, then marks the operator as stopped.

Attributes

Inherited from:
GraphStageLogic
Source
GraphStage.scala
final def failStage(ex: Throwable): Unit

Automatically invokes cancel or fail on all the input or output ports that have been called, then marks the operator as stopped.

Automatically invokes cancel or fail on all the input or output ports that have been called, then marks the operator as stopped.

Attributes

Inherited from:
GraphStageLogic
Source
GraphStage.scala
final def getAsyncCallback[T](handler: T => Unit): AsyncCallback[T]

Obtain a callback object that can be used asynchronously to re-enter the current GraphStage with an asynchronous notification. The invoke method of the returned AsyncCallback is safe to be called from other threads. It will in the background thread-safely delegate to the passed callback function. I.e. invoke will be called by other thread and the passed handler will be invoked eventually in a thread-safe way by the execution environment.

Obtain a callback object that can be used asynchronously to re-enter the current GraphStage with an asynchronous notification. The invoke method of the returned AsyncCallback is safe to be called from other threads. It will in the background thread-safely delegate to the passed callback function. I.e. invoke will be called by other thread and the passed handler will be invoked eventually in a thread-safe way by the execution environment.

In case stream is not yet materialized AsyncCallback will buffer events until stream is available.

AsyncCallback.invokeWithFeedback has an internal promise that will be failed if event cannot be processed due to stream completion.

To be thread safe this method must only be called from either the constructor of the graph operator during materialization or one of the methods invoked by the graph operator machinery, such as onPush and onPull.

This object can be cached and reused within the same GraphStageLogic.

Attributes

Inherited from:
GraphStageLogic
Source
GraphStage.scala
final def isAvailable[T](out: Outlet[T]): Boolean

Return true if the given output port is ready to be pushed.

Return true if the given output port is ready to be pushed.

Attributes

Inherited from:
GraphStageLogic
Source
GraphStage.scala
final protected def isTimerActive(timerKey: Any): Boolean

Inquire whether the timer is still active. Returns true unless the timer does not exist, has previously been canceled or if it was a single-shot timer that was already triggered.

Inquire whether the timer is still active. Returns true unless the timer does not exist, has previously been canceled or if it was a single-shot timer that was already triggered.

Attributes

Inherited from:
TimerGraphStageLogic
Source
GraphStage.scala

Attributes

Inherited from:
StageLogging
Source
StageLogging.scala
protected def logSource: Class[_]

Override to customise reported log source

Override to customise reported log source

Attributes

Inherited from:
StageLogging
Source
StageLogging.scala
protected def onTimer(timerKey: Any): Unit

Will be called when the scheduled timer is triggered.

Will be called when the scheduled timer is triggered.

Value parameters

timerKey

key of the scheduled timer

Attributes

Inherited from:
TimerGraphStageLogic
Source
GraphStage.scala
def postStop(): Unit

Invoked after processing of external events stopped because the operator is about to stop or fail.

Invoked after processing of external events stopped because the operator is about to stop or fail.

Attributes

Inherited from:
GraphStageLogic
Source
GraphStage.scala
def preStart(): Unit

Invoked before any external events are processed, at the startup of the operator.

Invoked before any external events are processed, at the startup of the operator.

Attributes

Inherited from:
GraphStageLogic
Source
GraphStage.scala
final protected def scheduleAtFixedRate(timerKey: Any, initialDelay: Duration, interval: Duration): Unit

Schedule timer to call onTimer periodically with the given interval after the specified initial delay. Any existing timer with the same key will automatically be canceled before adding the new timer.

Schedule timer to call onTimer periodically with the given interval after the specified initial delay. Any existing timer with the same key will automatically be canceled before adding the new timer.

Attributes

Inherited from:
TimerGraphStageLogic
Source
GraphStage.scala
final protected def scheduleAtFixedRate(timerKey: Any, initialDelay: FiniteDuration, interval: FiniteDuration): Unit

Schedule timer to call onTimer periodically with the given interval after the specified initial delay. Any existing timer with the same key will automatically be canceled before adding the new timer.

Schedule timer to call onTimer periodically with the given interval after the specified initial delay. Any existing timer with the same key will automatically be canceled before adding the new timer.

Attributes

Inherited from:
TimerGraphStageLogic
Source
GraphStage.scala
final protected def scheduleOnce(timerKey: Any, delay: Duration): Unit

Schedule timer to call onTimer after given delay. Any existing timer with the same key will automatically be canceled before adding the new timer.

Schedule timer to call onTimer after given delay. Any existing timer with the same key will automatically be canceled before adding the new timer.

Attributes

Inherited from:
TimerGraphStageLogic
Source
GraphStage.scala
final protected def scheduleOnce(timerKey: Any, delay: FiniteDuration): Unit

Schedule timer to call onTimer after given delay. Any existing timer with the same key will automatically be canceled before adding the new timer.

Schedule timer to call onTimer after given delay. Any existing timer with the same key will automatically be canceled before adding the new timer.

Attributes

Inherited from:
TimerGraphStageLogic
Source
GraphStage.scala
final protected def scheduleWithFixedDelay(timerKey: Any, initialDelay: Duration, interval: Duration): Unit

Schedule timer to call onTimer periodically with the given delay after the specified initial delay. Any existing timer with the same key will automatically be canceled before adding the new timer.

Schedule timer to call onTimer periodically with the given delay after the specified initial delay. Any existing timer with the same key will automatically be canceled before adding the new timer.

Attributes

Inherited from:
TimerGraphStageLogic
Source
GraphStage.scala
final protected def scheduleWithFixedDelay(timerKey: Any, initialDelay: FiniteDuration, delay: FiniteDuration): Unit

Schedule timer to call onTimer periodically with the given delay after the specified initial delay. Any existing timer with the same key will automatically be canceled before adding the new timer.

Schedule timer to call onTimer periodically with the given delay after the specified initial delay. Any existing timer with the same key will automatically be canceled before adding the new timer.

Attributes

Inherited from:
TimerGraphStageLogic
Source
GraphStage.scala
final def stageActor: StageActor

Attributes

Inherited from:
GraphStageLogic
Source
GraphStage.scala
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Inherited from:
GraphStageLogic
Source
GraphStage.scala

Deprecated and Inherited methods

final protected def schedulePeriodically(timerKey: Any, interval: Duration): Unit

Schedule timer to call onTimer periodically with the given interval. Any existing timer with the same key will automatically be canceled before adding the new timer.

Schedule timer to call onTimer periodically with the given interval. Any existing timer with the same key will automatically be canceled before adding the new timer.

Attributes

Deprecated
[Since version Akka 2.6.0]
Inherited from:
TimerGraphStageLogic
Source
GraphStage.scala
final protected def schedulePeriodically(timerKey: Any, interval: FiniteDuration): Unit

Schedule timer to call onTimer periodically with the given interval. Any existing timer with the same key will automatically be canceled before adding the new timer.

Schedule timer to call onTimer periodically with the given interval. Any existing timer with the same key will automatically be canceled before adding the new timer.

Attributes

Deprecated
[Since version Akka 2.6.0]
Inherited from:
TimerGraphStageLogic
Source
GraphStage.scala
final protected def schedulePeriodicallyWithInitialDelay(timerKey: Any, initialDelay: Duration, interval: Duration): Unit

Schedule timer to call onTimer periodically with the given interval after the specified initial delay. Any existing timer with the same key will automatically be canceled before adding the new timer.

Schedule timer to call onTimer periodically with the given interval after the specified initial delay. Any existing timer with the same key will automatically be canceled before adding the new timer.

Attributes

Deprecated
[Since version Akka 2.6.0]
Inherited from:
TimerGraphStageLogic
Source
GraphStage.scala
final protected def schedulePeriodicallyWithInitialDelay(timerKey: Any, initialDelay: FiniteDuration, interval: FiniteDuration): Unit

Schedule timer to call onTimer periodically with the given interval after the specified initial delay. Any existing timer with the same key will automatically be canceled before adding the new timer.

Schedule timer to call onTimer periodically with the given interval after the specified initial delay. Any existing timer with the same key will automatically be canceled before adding the new timer.

Attributes

Deprecated
[Since version Akka 2.6.0]
Inherited from:
TimerGraphStageLogic
Source
GraphStage.scala

Inherited fields

val inCount: Int

Attributes

Inherited from:
GraphStageLogic
Source
GraphStage.scala
val outCount: Int

Attributes

Inherited from:
GraphStageLogic
Source
GraphStage.scala