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 TimeoutBidiOrdered and TimeoutBidiUnordered 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 cancelTimer(timerKey: Any): Unit

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  36. final def getHandler(out: Outlet[_]): OutHandler

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

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

    Permalink
    Attributes
    protected
    Definition Classes
    GraphStageLogic
  39. final def grab[T](in: Inlet[T]): T

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Permalink
    Definition Classes
    GraphStageLogic
  57. 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
  58. def postStop(): Unit

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Permalink
    Definition Classes
    GraphStageLogic
  74. def subFusingMaterializer: Materializer

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

    Permalink
    Definition Classes
    AnyRef
  76. def timeLeftForNextElemToTimeout: Long

    Permalink
    Attributes
    protected
  77. def toString(): String

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  82. 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