Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface MapOutlet<K, V, O>

Output connector from a Streamlet for a key-value map state.

Type parameters

  • K

  • V

  • O

Hierarchy

  • Outlet<O>
    • MapOutlet

Index

Methods

bindOutput

  • bindOutput(output: Inlet<O>): void
  • Adds an output to the set of Inlets that depend on the state of this Outlet. The output will be invalidated when the state of this Outlet is invalidated, and updated when this Outlet is updated.

    Parameters

    • output: Inlet<O>

    Returns void

disconnectInputs

  • disconnectInputs(): void

disconnectOutputs

  • disconnectOutputs(): void

filter

get

  • get(): O | undefined
  • get(key: K): V | undefined

has

  • has(key: K): boolean

invalidateInput

  • invalidateInput(): void

invalidateInputKey

  • invalidateInputKey(key: K, effect: KeyEffect): void
  • Marks this MapOutlet as needing an effect applied to a given key. Invalidating an individual key invalidates the entire state of the Outlet. But only the invalidated keys need to be updated in order to reconcile the overall state of the Outlet.

    Parameters

    Returns void

keyIterator

map

memoize

  • memoize(): MapOutlet<K, V, O>

outlet

  • outlet(key: K): Outlet<V>

outputIterator

reconcileInput

  • reconcileInput(version: number): void

reconcileInputKey

  • reconcileInputKey(key: K, version: number): void
  • Reconciles the state of an individual key in this MapOutlet, if the version of this MapOutlet's state differs from the target version. To reconcile the state of a key, the MapOutlet first invokes Streamlet.reconcile on its attached streamlets. Then, for each dependent output, it invokes MapInlet.reconcileOutputKey, if the dependent output is a MapInlet, or it invokes [[Inlet.reconcile]], if the dependent output is not a MapInlet.

    Parameters

    • key: K
    • version: number

    Returns void

reduce

  • reduce<U>(identity: U, accumulator: (result: U, element: V) => U, combiner: (result: U, result2: U) => U): Outlet<U>
  • Type parameters

    • U

    Parameters

    • identity: U
    • accumulator: (result: U, element: V) => U
        • (result: U, element: V): U
        • Parameters

          • result: U
          • element: V

          Returns U

    • combiner: (result: U, result2: U) => U
        • (result: U, result2: U): U
        • Parameters

          • result: U
          • result2: U

          Returns U

    Returns Outlet<U>

unbindOutput

  • unbindOutput(output: Inlet<O>): void

unbindOutputs

  • unbindOutputs(): void

watch