- java.lang.Object
-
- swim.streamlet.AbstractInlet<I>
-
- All Implemented Interfaces:
Inlet<I>
- Direct Known Subclasses:
OutletInlet,RecordFieldUpdater,StreamletInlet,ValueOutput,WatchValueOperator
public abstract class AbstractInlet<I> extends Object implements Inlet<I>
-
-
Constructor Summary
Constructors Constructor Description AbstractInlet()
-
Method Summary
Modifier and Type Method Description voidbindInput(Outlet<? extends I> input)Connects thisInletto anOutletfrom which it will acquire its state.protected voiddidInvalidateOutput()protected voiddidReconcileOutput(int version)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.protected voidonInvalidateOutput()protected voidonReconcileOutput(int version)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.protected voidwillInvalidateOutput()protected voidwillReconcileOutput(int version)
-
-
-
Method Detail
-
input
public Outlet<? extends I> input()
Description copied from interface:InletReturns theOutletfrom which thisInletacquires its state; returnsnullif thisInletis disconnected.
-
bindInput
public void bindInput(Outlet<? extends I> input)
Description copied from interface:InletConnects 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
public void unbindInput()
Description copied from interface:InletDisconnects thisInletfrom its inputOutlet, if connected. After setting itsinputproperty tonull, theInletwill invokeOutlet.unbindOutput(Inlet)on its old input, if defined.- Specified by:
unbindInputin interfaceInlet<I>
-
disconnectInputs
public void disconnectInputs()
Description copied from interface:InletDisconnects allInlets dominated by thisInletin the dataflow dependency graph. Used to recursively clean up chains of combinators terminating at thisInlet.- Specified by:
disconnectInputsin interfaceInlet<I>
-
disconnectOutputs
public void disconnectOutputs()
Description copied from interface:InletDisconnects allOutlets dominated by thisInletin the dataflow graph. Used to recursively clean up chains of combinators passing through thisInlet.- Specified by:
disconnectOutputsin interfaceInlet<I>
-
invalidateOutput
public void invalidateOutput()
Description copied from interface:InletMarks 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 subsequentInlet.reconcileOutput(int)call will reconcile the state of theInlet.- Specified by:
invalidateOutputin interfaceInlet<I>
-
reconcileOutput
public void reconcileOutput(int version)
Description copied from interface:InletReconciles 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.- Specified by:
reconcileOutputin interfaceInlet<I>
-
willInvalidateOutput
protected void willInvalidateOutput()
-
onInvalidateOutput
protected void onInvalidateOutput()
-
didInvalidateOutput
protected void didInvalidateOutput()
-
willReconcileOutput
protected void willReconcileOutput(int version)
-
onReconcileOutput
protected void onReconcileOutput(int version)
-
didReconcileOutput
protected void didReconcileOutput(int version)
-
-