Interface Inlet<I>

All Known Subinterfaces:
Inoutlet<I,O>, MapDownlink<K,V>, MapInlet<K,V,I>, MapInletMapOutlet<KI,KO,VI,VO,I,O>, MapInletOutlet<K,V,I,O>, MapInoutlet<K,VI,VO,I,O>, MapLane<K,V>, ValueDownlink<V>, ValueLane<V>
All Known Implementing Classes:
AbstractInlet, AbstractInoutlet, AbstractMapInlet, AbstractMapInletMapOutlet, AbstractMapInletOutlet, AbstractMapInoutlet, FilterFieldsCombinator, FilterFieldsOperator, JoinMapLaneDownlink, JoinValueLaneDownlink, MapDownlinkView, MapFieldValuesCombinator, MapFieldValuesOperator, MapLaneView, MapOutput, MapValueCombinator, MapValueOperator, MemoizeMapCombinator, MemoizeValueCombinator, OutletInlet, OutletMapInlet, RecordFieldUpdater, ReduceFieldsCombinator, ReduceFieldsOperator, StreamletInlet, StreamletInoutlet, ValueDownlinkView, ValueLaneView, ValueOutput, WatchFieldsCombinator, WatchFieldsOperator, WatchValueCombinator, WatchValueOperator

public 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(Outlet) 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 decoherent. When any state on which an Inlet transitively depends changes, the Inlet will be decohered. Decoherence does not immediately cause an Inlet to recompute its state. Instead, a separate recohere step causes all of the decoherent paths in the dataflow graph passing through the Inlet to make their states coherent again.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    bindInput(Outlet<? extends I> input)
    Connects this Inlet to an Outlet from which it will acquire its state.
    void
    Marks this Inlet—and the Streamlet to which this Inlet is attached—as having decoherent state.
    void
    Disconnects all Inlets dominated by this Inlet in the dataflow dependency graph.
    void
    Disconnects all Outlets dominated by this Inlet in the dataflow graph.
    Outlet<? extends I>
    Returns the Outlet from which this Inlet acquires its state; returns null if this Inlet is disconnected.
    void
    recohereOutput(int version)
    Updates the state of this Inlet to make it consistent with the target version.
    void
    Disconnects this Inlet from its input Outlet, if connected.
  • Method Details

    • input

      Outlet<? extends I> input()
      Returns the Outlet from which this Inlet acquires its state; returns null if this Inlet is disconnected.
    • bindInput

      void bindInput(Outlet<? extends I> input)
      Connects this Inlet to an Outlet from which it will acquire its state. If this Inlet is already connected, it will first disconnect from its existing input. Then, after updating its input property, the Inlet will invoke Outlet.bindOutput(Inlet) on its new input.
    • unbindInput

      void unbindInput()
      Disconnects this Inlet from its input Outlet, if connected. After setting its input property to null, the Inlet will invoke Outlet.unbindOutput(Inlet) on its old input, if defined.
    • disconnectInputs

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

      void disconnectOutputs()
      Disconnects all Outlets dominated by this Inlet in the dataflow graph. Used to recursively clean up chains of combinators passing through this Inlet.
    • decohereOutput

      void decohereOutput()
      Marks this Inlet—and the Streamlet to which this Inlet is attached—as having decoherent state. Decohering an Inlet will recursively decohere all streamlets that transitively depend on the state of this Inlet. Decohering an Inlet does not cause its state to be recomputed. A subsequent recohereOutput(int) call will eventually make the state of the Inlet coherent again.
    • recohereOutput

      void recohereOutput(int version)
      Updates the state of this Inlet to make it consistent with the target version. The Inlet only needs to update if its current version differs from the target version. To update its state, the Inlet first invokes Outlet.recohereInput(int) on its input, to ensure that its input is coherent. It then invokes Streamlet.recohere(int) on the Streamlet to which it's attached, causing the Streamlet to make its own state coherent again.