object KeepLastOutput
A decorator that remembers the last output produced by the inner stage and re-emits it when the inner stage yields no value.
The decorator has two internal states:
- **
Nonestate** (initial): no output has been seen yet. The inner stage'sh8io.stages.Yield.Noneis forwarded unchanged; ah8io.stages.Yield.Someis forwarded and transitions the wrapper to theSomestate. - **
Somestate**: a previous outputoutis remembered. On every subsequent call the inner stage's last known output is emitted regardless of whether the inner stage yieldsSomeorNone. A newh8io.stages.Yield.Someupdates the remembered value.
In both states the evolution is mapped so that continuations remain wrapped in the appropriate KeepLastOutput
variant, preserving the last-value semantics.
The apply factory method always starts in the None state.
- Source
- KeepLastOutput.scala
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- KeepLastOutput
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def apply[I, O, E](stage: Stage[I, O, E]): Stage[I, O, E]
Wraps
stagein aKeepLastOutputstarting in the initial (no remembered value) state.Wraps
stagein aKeepLastOutputstarting in the initial (no remembered value) state.- I
the input type
- O
the output type
- E
the error type
- stage
the stage to wrap
- returns
a stage that re-emits the last seen output when the inner stage yields nothing
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)