Packages

final class GlobalSoftDeadline[T] extends Endo[T, Nothing]

An endomorphic stage that passes values through as long as a wall-clock deadline has not elapsed.

The deadline is measured from the moment this instance is created: the timestamp ts is captured once at construction using now(). On each invocation, if the elapsed time (now() - ts) is less than duration (in nanoseconds), the stage yields h8io.stages.Status.Success; otherwise it yields h8io.stages.Status.Complete.

The deadline is global in the sense that it is fixed at construction and never resets, unlike h8io.stages.operators.LocalSoftDeadline which restarts its window with each new unit of work.

T

the value type passed through unchanged

Linear Supertypes
FruitfulStaticStage[T, T, Nothing], Fruitful[T, T, Nothing], SAMStage[T, T, Nothing], Stagnation[T, T, Nothing], Evolution[T, T, Nothing], Stage[T, T, Nothing], (T) ⇒ Yield[T, T, Nothing], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. GlobalSoftDeadline
  2. FruitfulStaticStage
  3. Fruitful
  4. SAMStage
  5. Stagnation
  6. Evolution
  7. Stage
  8. Function1
  9. AnyRef
  10. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def andThen[A](g: (Yield[T, T, Nothing]) ⇒ A): (T) ⇒ A
    Definition Classes
    Function1
    Annotations
    @unspecialized()
  5. final def apply(in: T): Some[T, T, Nothing]

    Processes in and returns the Yield carrying the optional output, the status and the continuation.

    Processes in and returns the Yield carrying the optional output, the status and the continuation.

    A stage that throws from here must have released its own resources first — see the Lifecycle section above.

    Definition Classes
    FruitfulStaticStage → Fruitful → Stage → Function1
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @IntrinsicCandidate()
  8. final def compose[_O, _E >: Nothing](that: Evolution[T, _O, _E]): Evolution[T, _O, _E]

    Composes this evolution with the one downstream of it, so that for every status

    Composes this evolution with the one downstream of it, so that for every status

    composed(s) == self(s) ~> that(s)

    This is how Yield composition carries both continuations of a pipeline forward; application code rarely calls it directly.

    Definition Classes
    Evolution
    Annotations
    @inline()
  9. def compose[A](g: (A) ⇒ T): (A) ⇒ Yield[T, T, Nothing]
    Definition Classes
    Function1
    Annotations
    @unspecialized()
  10. def dispose(): Unit

    Releases everything held by the Stage that produced this evolution.

    Releases everything held by the Stage that produced this evolution. That stage is permanently unusable afterwards — neither applied nor skipped again — and this is the only place its resources are released.

    Whoever terminates a pipeline is responsible for disposing the evolution of the final Yield, so that the continuation is released at once instead of being carried around. The reference terminal driver is the execute extension method of h8io.stages.base in the lib module.

    dispose() stays valid after evolve has been called on the same instance, and must then release everything still alive, including whatever building the continuation acquired. evolve hands over no ownership: this evolution remains the cleanup point for its lineage until the continuation has run and produced an evolution of its own, which takes the role over from that moment.

    Exceptions are not part of this contract: a stage whose apply throws produces no yield and therefore no evolution, so there is nothing to dispose — it must clean up after itself (see the Lifecycle section in Stage).

    A no-op is a fine implementation for a stage holding nothing external.

    Definition Classes
    Stagnation → Evolution
  11. val duration: Long
  12. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  14. final def evolve(status: Status[_]): Stage[T, T, Nothing]

    The next stage, for the given status.

    The next stage, for the given status.

    May release what belongs to this generation alone — anything the returned stage and its own evolution will not reuse.

    evolve and dispose are not mutually exclusive. Usually only one of them is called on an instance: a terminal driver disposes, a continuing pipeline evolves and drops the previous evolution. But a caller may do both, and operators owning their inner stage (Loop, Repeat and the rest of h8io.stages.cycles in the lib module) do exactly that — they evolve eagerly and keep the inner dispose as the cleanup handle of the generation they just built.

    Definition Classes
    Stagnation → Evolution
  15. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  16. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  17. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  18. final def map[_I, _O, _E](f: (Stage[T, T, Nothing]) ⇒ Stage[_I, _O, _E]): Evolution[_I, _O, _E]

    Applies f to every stage this evolution would return, leaving disposal delegated to it unchanged.

    Applies f to every stage this evolution would return, leaving disposal delegated to it unchanged.

    The way an operator keeps its wrapping in place across generations: the continuation comes back wrapped the same way the current stage is.

    Definition Classes
    Evolution
    Annotations
    @inline()
  19. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  20. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  21. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  22. val now: () ⇒ Long
  23. def process(in: T): (T, Status[Nothing])

    The processing logic for this stage: computes the output value and the resulting h8io.stages.Status for the given input.

    The processing logic for this stage: computes the output value and the resulting h8io.stages.Status for the given input.

    in

    the input value

    returns

    the output value paired with the execution status

    Attributes
    protected
    Definition Classes
    GlobalSoftDeadline → FruitfulStaticStage
  24. final def skip(): Evolution[T, T, Nothing]

    Returns this stage's Evolution without consuming an input.

    Returns this stage's Evolution without consuming an input.

    Called instead of apply whenever the stage takes part in a run but has nothing to process: the upstream yielded no output, or a binary operator excluded this branch. The evolution must be the one the stage would have returned had it run. Like apply, skip() may perform side effects — a decorator, for instance, may advance or release the inner stage it owns.

    Definition Classes
    SAMStage → Stage
  25. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  26. def toString(): String
    Definition Classes
    Function1 → AnyRef → Any
  27. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  29. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def ~>[_O, _E >: Nothing](that: Stage[T, _O, _E]): Stage[T, _O, _E]

    Composes this stage with that, feeding this stage's output into it.

    Composes this stage with that, feeding this stage's output into it. See the Composition section above for what happens when there is no output to feed.

    Definition Classes
    Stage
    Annotations
    @inline()

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated
    Deprecated

Inherited from FruitfulStaticStage[T, T, Nothing]

Inherited from Fruitful[T, T, Nothing]

Inherited from SAMStage[T, T, Nothing]

Inherited from Stagnation[T, T, Nothing]

Inherited from Evolution[T, T, Nothing]

Inherited from Stage[T, T, Nothing]

Inherited from (T) ⇒ Yield[T, T, Nothing]

Inherited from AnyRef

Inherited from Any

Ungrouped