-
- 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 aStreamlet. AnInletrepresents a source from which aStreamletacquires state.In order for an
Inletto provide state to itsStreamlet, it must bind to aninputsource. The input source of anInletis anOutletof some otherStreamlet. ThebindInput(Outlet)method "plugs" theInletinto anOutlet. TheunbindInput()method "unplugs" theInletfrom its connectedOutlet.The state of an
Inlethas an integral version. When its version is negative, the state of theInletis considered invalid. When any state on which anInlettransitively depends changes, theInletwill beinvalidated. Invalidation does not immediately cause anInletto recompute its state. Instead, a separatereconcileOutput(int)step causes all of the invalid paths in the dataflow graph passing through theInletto reconcile their state.
-
-
Method Summary
Modifier and Type Method Description voidbindInput(Outlet<? extends I> input)Connects thisInletto anOutletfrom which it will acquire its state.voiddisconnectInputs()Disconnects allInlets dominated by thisInletin the dataflow dependency graph.voiddisconnectOutputs()Disconnects allOutlets dominated by thisInletin the dataflow graph.Outlet<? extends I>input()Returns theOutletfrom which thisInletacquires its state; returnsnullif thisInletis disconnected.voidinvalidateOutput()Marks thisInlet—and theStreamletto which thisInletis attached—as having stale state.voidreconcileOutput(int version)Reconciles the state of thisInlet, if the version of thisInlet's state differs from the targetversion.voidunbindInput()Disconnects thisInletfrom its inputOutlet, if connected.
-
-
-
Method Detail
-
input
Outlet<? extends I> input()
Returns theOutletfrom which thisInletacquires its state; returnsnullif thisInletis disconnected.
-
bindInput
void bindInput(Outlet<? extends I> input)
Connects thisInletto anOutletfrom which it will acquire its state. If thisInletis already connected, it will first disconnect from its existing input. Then, after updating itsinputproperty, theInletwill invokeOutlet.bindOutput(Inlet)on its newinput.
-
unbindInput
void unbindInput()
Disconnects thisInletfrom its inputOutlet, if connected. After setting itsinputproperty tonull, theInletwill invokeOutlet.unbindOutput(Inlet)on its old input, if defined.
-
disconnectInputs
void disconnectInputs()
Disconnects allInlets dominated by thisInletin the dataflow dependency graph. Used to recursively clean up chains of combinators terminating at thisInlet.
-
disconnectOutputs
void disconnectOutputs()
Disconnects allOutlets dominated by thisInletin the dataflow graph. Used to recursively clean up chains of combinators passing through thisInlet.
-
invalidateOutput
void invalidateOutput()
Marks thisInlet—and theStreamletto which thisInletis attached—as having stale state. Invalidating anInletwill recursively invalidate all streamlets that transitively depend on the state of thisInlet. Invalidating anInletdoes not cause its state to be recomputed. A subsequentreconcileOutput(int)call will reconcile the state of theInlet.
-
reconcileOutput
void reconcileOutput(int version)
Reconciles the state of thisInlet, if the version of thisInlet's state differs from the targetversion. To reconcile its state, theInletfirst invokesOutlet.reconcileInput(int)on itsinput, to ensure that its input is up-to-date. It then invokesStreamlet.reconcile(int)on theStreamletto which it's attached, causing theStreamletto reconcile its own state.
-
-