Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Inlet<I>

Input connector into a Streamlet. An Inlet represents a source from which a Streamlet acquires state.

In order for an Inlet to provide state to its Streamlet, it must bind to an input source. The input source of an Inlet is an Outlet of some other Streamlet. The bindInput method "plugs" the Inlet into an Outlet. The unbindInput method "unplugs" the Inlet from its connected Outlet.

The state of an Inlet has an integral version. When its version is negative, the state of the Inlet is considered invalid. When any state on which an Inlet transitively depends changes, the Inlet will be [[invalidatOutput invalidated]]. Invalidation does not immediately cause an Inlet to recompute its state. Instead, a separate reconcile step causes all of the invalid paths in the dataflow graph passing through the Inlet to reconcile their state.

Type parameters

  • I

Hierarchy

Implemented by

Index

Methods

bindInput

  • bindInput(input: Outlet<I> | null): void

disconnectInputs

  • disconnectInputs(): void
  • Disconnects all Inlets dominated by this Inlet in the dataflow dependency graph. Used to recursively clean up chains of combinators terminating at this Inlet.

    Returns void

disconnectOutputs

  • disconnectOutputs(): void

input

invalidateOutput

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

    Returns void

reconcileOutput

  • reconcileOutput(version: number): void
  • Reconciles the state of this Inlet, if the version of this Inlet's state differs from the target version. To reconcile its state, the Inlet first invokes Outlet.reconcileInput on its input, to ensure that its input is up-to-date. It then invokes Streamlet.reconcile on the Streamlet to which it's attached, causing the Streamlet to reconcile its own state.

    Parameters

    • version: number

    Returns void

unbindInput

  • unbindInput(): void