Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Streamlet<I, O>

Stateful node in a dataflow graph that uses the state of its inlets to compute the state of its Outlets.

Type parameters

  • I

  • O

Hierarchy

Implemented by

Index

Methods

bindInput

  • bindInput(key: string, input: Outlet<I>): void
  • Connects the Inlet of this Streamlet, identified by the given key to the input from which the Inlet should acquire its state. Delegates to Inlet.bindInput on the identified Inlet.

    throws

    Error if this Streamlet has no Inlet with the given key.

    Parameters

    • key: string
    • input: Outlet<I>

    Returns void

disconnectInputs

  • disconnectInputs(): void

disconnectOutputs

  • disconnectOutputs(): void

inlet

  • inlet(key: string): Inlet<I> | null

invalidate

  • invalidate(): void
  • Marks this Streamlet—and all of its outlets—as having stale state. Invalidating a Streamlet will recursively invalidate all streamlets that transitively depend on the state of this Streamlet. Invalidating a Streamlet does not cause its state to be recomputed. A subsequent reconcile call will reconcile the state of the Streamlet.

    Returns void

outlet

  • outlet(key: string): Outlet<O> | null

reconcile

  • reconcile(version: number): void
  • Reconciles the state of this Streamlet, if the version of this Streamlet's state differs from the target version. To reconcile its state, the Streamlet first invokes Inlet.reconcileOutput on each of its inlets, to ensure that its input states are up-to-date. It then recomputes its own state, in an implementation defined manner. Finally, it invokes Outlet.reconcileInput on its outlets, causing all transitively dependent streamlets to reconcile their own state.

    Parameters

    • version: number

    Returns void

setStreamletContext

setStreamletScope

streamletContext

streamletScope

unbindInput

  • unbindInput(key: string): void