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, so the wrapper always emits a value. A newh8io.stages.Yield.Somefrom the inner stage is forwarded as is and updates the remembered value; onh8io.stages.Yield.Nonethe remembered value is emitted instead.
In both states the evolution is mapped so that continuations remain wrapped in the appropriate KeepLastOutput
variant, preserving the last-value semantics.
Both variants are internal to the package: the decorator is reached through the KeepLastOutput.apply factory,
which always starts in the None state, and the state it is in afterwards is not part of the API.
- Alphabetic
- By Inheritance
- KeepLastOutput
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
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( ... ) @native() @IntrinsicCandidate()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
-
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
- @native() @IntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
-
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( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated
- Deprecated