Class

org.squbs.streams

TimeoutGraphStageLogic

Related Doc: package streams

Permalink

abstract class TimeoutGraphStageLogic[In, FromWrapped, Out] extends TimerGraphStageLogic

A bidi GraphStageLogic that is used by TimeoutOrdered and Timeout to wrap flows to add timeout functionality.

Once an element is pushed from the wrapped flow (from fromWrapped), it first checks if the element is already timed out. If a timeout message has already been sent for that element to downstream, then the element from the wrapped flow is dropped.

A timer gets scheduled when there is a downstream demand that's not immediately addressed. This is to make sure that a timeout response is sent to the downstream when upstream cannot address the demand on time.

Timer precision is at best 10ms to avoid unnecessary timer scheduling cycles

       +------+
 In ~> |      | ~> In
       | bidi |
Out <~ |      | <~ FromWrapped
       +------+
In

the type of the elements that gets forwarded to the wrapped flow

FromWrapped

the type of the elements that the wrapped flow sends back

Out

the type of the elements that are pushed to downstream

Linear Supertypes
TimerGraphStageLogic, GraphStageLogic, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TimeoutGraphStageLogic
  2. TimerGraphStageLogic
  3. GraphStageLogic
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new TimeoutGraphStageLogic(shape: BidiShape[In, In, FromWrapped, Out])

    Permalink

    shape

    the BidiShape that the timeout logic is applied on

Type Members

  1. class SubSinkInlet[T] extends AnyRef

    Permalink
    Definition Classes
    GraphStageLogic
  2. class SubSourceOutlet[T] extends AnyRef

    Permalink
    Definition Classes
    GraphStageLogic

Abstract Value Members

  1. abstract def enqueueInTimeoutQueue(elem: In): Unit

    Permalink
    Attributes
    protected
  2. abstract def firstElemStartTime: Long

    Permalink
    Attributes
    protected
  3. abstract def isBuffersEmpty: Boolean

    Permalink
    Attributes
    protected
  4. abstract def onPullOut(): Option[Out]

    Permalink
    Attributes
    protected
  5. abstract def onPushFromWrapped(elem: FromWrapped, isOutAvailable: Boolean): Option[Out]

    Permalink
    Attributes
    protected
  6. abstract def onScheduledTimeout(): Option[Out]

    Permalink
    Attributes
    protected
  7. abstract def timeoutDuration: FiniteDuration

    Permalink
    Attributes
    protected

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. final def abortEmitting(out: Outlet[_]): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    GraphStageLogic
  5. final def abortReading(in: Inlet[_]): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    GraphStageLogic
  6. def afterPostStop(): Unit

    Permalink
    Attributes
    protected[akka.stream]
    Definition Classes
    TimerGraphStageLogic → GraphStageLogic
  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. def beforePreStart(): Unit

    Permalink
    Attributes
    protected[akka.stream]
    Definition Classes
    GraphStageLogic
  9. final def cancel[T](in: Inlet[T]): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    GraphStageLogic
  10. final def cancelStage(cause: Throwable): Unit

    Permalink
    Definition Classes
    GraphStageLogic
  11. final def cancelTimer(timerKey: Any): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    TimerGraphStageLogic
  12. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  13. final def complete[T](out: Outlet[T]): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    GraphStageLogic
  14. final def completeStage(): Unit

    Permalink
    Definition Classes
    GraphStageLogic
  15. final def conditionalTerminateInput(predicate: () ⇒ Boolean): InHandler

    Permalink
    Attributes
    protected
    Definition Classes
    GraphStageLogic
  16. final def conditionalTerminateOutput(predicate: () ⇒ Boolean): OutHandler

    Permalink
    Attributes
    protected
    Definition Classes
    GraphStageLogic
  17. final def createAsyncCallback[T](handler: Procedure[T]): AsyncCallback[T]

    Permalink
    Attributes
    protected
    Definition Classes
    GraphStageLogic
  18. final def eagerTerminateInput: InHandler

    Permalink
    Attributes
    protected
    Definition Classes
    GraphStageLogic
  19. final def eagerTerminateOutput: OutHandler

    Permalink
    Attributes
    protected
    Definition Classes
    GraphStageLogic
  20. final def emit[T](out: Outlet[T], elem: T, andThen: Effect): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    GraphStageLogic
  21. final def emit[T](out: Outlet[T], elem: T): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    GraphStageLogic
  22. final def emit[T](out: Outlet[T], elem: T, andThen: () ⇒ Unit): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    GraphStageLogic
  23. final def emitMultiple[T](out: Outlet[T], elems: Iterator[T]): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    GraphStageLogic
  24. final def emitMultiple[T](out: Outlet[T], elems: Iterator[T], andThen: () ⇒ Unit): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    GraphStageLogic
  25. final def emitMultiple[T](out: Outlet[T], elems: Iterator[T], andThen: Effect): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    GraphStageLogic
  26. final def emitMultiple[T](out: Outlet[T], elems: Iterator[T]): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    GraphStageLogic
  27. final def emitMultiple[T](out: Outlet[T], elems: Iterable[T]): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    GraphStageLogic
  28. final def emitMultiple[T](out: Outlet[T], elems: Iterable[T], andThen: () ⇒ Unit): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    GraphStageLogic
  29. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  31. def expirationTime(): Long

    Permalink
    Attributes
    protected
  32. final def fail[T](out: Outlet[T], ex: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    GraphStageLogic
  33. final def failStage(ex: Throwable): Unit

    Permalink
    Definition Classes
    GraphStageLogic
  34. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  35. final def getAsyncCallback[T](handler: (T) ⇒ Unit): AsyncCallback[T]

    Permalink
    Definition Classes
    GraphStageLogic
  36. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  37. def getEagerStageActor(eagerMaterializer: Materializer, poisonPillCompatibility: Boolean)(receive: ((ActorRef, Any)) ⇒ Unit): StageActor

    Permalink
    Attributes
    protected[akka]
    Definition Classes
    GraphStageLogic
    Annotations
    @InternalApi()
  38. final def getHandler(out: Outlet[_]): OutHandler

    Permalink
    Attributes
    protected
    Definition Classes
    GraphStageLogic
  39. final def getHandler(in: Inlet[_]): InHandler

    Permalink
    Attributes
    protected
    Definition Classes
    GraphStageLogic
  40. final def getStageActor(receive: ((ActorRef, Any)) ⇒ Unit): StageActor

    Permalink
    Attributes
    protected
    Definition Classes
    GraphStageLogic
    Annotations
    @ApiMayChange()
  41. final def grab[T](in: Inlet[T]): T

    Permalink
    Attributes
    protected
    Definition Classes
    GraphStageLogic
  42. final def hasBeenPulled[T](in: Inlet[T]): Boolean

    Permalink
    Attributes
    protected
    Definition Classes
    GraphStageLogic
  43. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  44. final def ignoreTerminateInput: InHandler

    Permalink
    Attributes
    protected
    Definition Classes
    GraphStageLogic
  45. final def ignoreTerminateOutput: OutHandler

    Permalink
    Attributes
    protected
    Definition Classes
    GraphStageLogic
  46. val inCount: Int

    Permalink
    Definition Classes
    GraphStageLogic
  47. final def isAvailable[T](out: Outlet[T]): Boolean

    Permalink
    Definition Classes
    GraphStageLogic
  48. final def isAvailable[T](in: Inlet[T]): Boolean

    Permalink
    Attributes
    protected
    Definition Classes
    GraphStageLogic
  49. final def isClosed[T](out: Outlet[T]): Boolean

    Permalink
    Attributes
    protected
    Definition Classes
    GraphStageLogic
  50. final def isClosed[T](in: Inlet[T]): Boolean

    Permalink
    Attributes
    protected
    Definition Classes
    GraphStageLogic
  51. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  52. final def isTimerActive(timerKey: Any): Boolean

    Permalink
    Attributes
    protected
    Definition Classes
    TimerGraphStageLogic
  53. def materializer: Materializer

    Permalink
    Attributes
    protected
    Definition Classes
    GraphStageLogic
  54. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  57. final def onTimer(key: Any): Unit

    Permalink
    Definition Classes
    TimeoutGraphStageLogic → TimerGraphStageLogic
  58. val outCount: Int

    Permalink
    Definition Classes
    GraphStageLogic
  59. final def passAlong[Out, In <: Out](from: Inlet[In], to: Outlet[Out], doFinish: Boolean, doFail: Boolean, doPull: Boolean): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    GraphStageLogic
  60. def postStop(): Unit

    Permalink
    Definition Classes
    GraphStageLogic
    Annotations
    @throws( classOf[java.lang.Exception] )
  61. def preStart(): Unit

    Permalink
    Definition Classes
    GraphStageLogic
    Annotations
    @throws( classOf[java.lang.Exception] )
  62. final def pull[T](in: Inlet[T]): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    GraphStageLogic
  63. final def push[T](out: Outlet[T], elem: T): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    GraphStageLogic
  64. final def read[T](in: Inlet[T], andThen: Procedure[T], onClose: Effect): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    GraphStageLogic
  65. final def read[T](in: Inlet[T])(andThen: (T) ⇒ Unit, onClose: () ⇒ Unit): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    GraphStageLogic
  66. final def readN[T](in: Inlet[T], n: Int, andThen: Procedure[List[T]], onClose: Procedure[List[T]]): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    GraphStageLogic
  67. final def readN[T](in: Inlet[T], n: Int)(andThen: (Seq[T]) ⇒ Unit, onClose: (Seq[T]) ⇒ Unit): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    GraphStageLogic
  68. final def scheduleOnce(timerKey: Any, delay: Duration): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    TimerGraphStageLogic
  69. final def scheduleOnce(timerKey: Any, delay: FiniteDuration): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    TimerGraphStageLogic
  70. final def schedulePeriodically(timerKey: Any, interval: Duration): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    TimerGraphStageLogic
  71. final def schedulePeriodically(timerKey: Any, interval: FiniteDuration): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    TimerGraphStageLogic
  72. final def schedulePeriodicallyWithInitialDelay(timerKey: Any, initialDelay: Duration, interval: Duration): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    TimerGraphStageLogic
  73. final def schedulePeriodicallyWithInitialDelay(timerKey: Any, initialDelay: FiniteDuration, interval: FiniteDuration): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    TimerGraphStageLogic
  74. final def setHandler(out: Outlet[_], handler: OutHandler): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    GraphStageLogic
  75. final def setHandler(in: Inlet[_], handler: InHandler): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    GraphStageLogic
  76. final def setHandlers(in: Inlet[_], out: Outlet[_], handler: InHandler with OutHandler): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    GraphStageLogic
  77. final def setKeepGoing(enabled: Boolean): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    GraphStageLogic
  78. final def stageActor: StageActor

    Permalink
    Definition Classes
    GraphStageLogic
  79. def stageActorName: String

    Permalink
    Attributes
    protected
    Definition Classes
    GraphStageLogic
    Annotations
    @ApiMayChange()
  80. def subFusingMaterializer: Materializer

    Permalink
    Attributes
    protected
    Definition Classes
    GraphStageLogic
  81. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  82. def timeLeftForNextElemToTimeout: Long

    Permalink
    Attributes
    protected
  83. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  84. final def totallyIgnorantInput: InHandler

    Permalink
    Attributes
    protected
    Definition Classes
    GraphStageLogic
  85. final def tryPull[T](in: Inlet[T]): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    GraphStageLogic
  86. final def wait(): Unit

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

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

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

Inherited from TimerGraphStageLogic

Inherited from GraphStageLogic

Inherited from AnyRef

Inherited from Any

Ungrouped