- 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbindInput(Outlet<? extends I> input)Connects thisInletto anOutletfrom which it will acquire its state.voiddecohereOutput()Marks thisInlet—and theStreamletto which thisInletis attached—as having decoherent state.protected voiddidDecohereOutput()protected voiddidRecohereOutput(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.protected voidonDecohereOutput()protected voidonRecohereOutput(int version)voidrecohereOutput(int version)Updates the state of thisInletto make it consistent with thetargetversion.voidunbindInput()Disconnects thisInletfrom its inputOutlet, if connected.protected voidwillDecohereOutput()protected voidwillRecohereOutput(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>
-
decohereOutput
public void decohereOutput()
Description copied from interface:InletMarks thisInlet—and theStreamletto which thisInletis attached—as having decoherent state. Decohering anInletwill recursively decohere all streamlets that transitively depend on the state of thisInlet. Decohering anInletdoes not cause its state to be recomputed. A subsequentInlet.recohereOutput(int)call will eventually make the state of theInletcoherent again.- Specified by:
decohereOutputin interfaceInlet<I>
-
recohereOutput
public void recohereOutput(int version)
Description copied from interface:InletUpdates the state of thisInletto make it consistent with thetargetversion. TheInletonly needs to update if its currentversiondiffers from the targetversion. To update its state, theInletfirst invokesOutlet.recohereInput(int)on itsinput, to ensure that its input is coherent. It then invokesStreamlet.recohere(int)on theStreamletto which it's attached, causing theStreamletto make its own state coherent again.- Specified by:
recohereOutputin interfaceInlet<I>
-
willDecohereOutput
protected void willDecohereOutput()
-
onDecohereOutput
protected void onDecohereOutput()
-
didDecohereOutput
protected void didDecohereOutput()
-
willRecohereOutput
protected void willRecohereOutput(int version)
-
onRecohereOutput
protected void onRecohereOutput(int version)
-
didRecohereOutput
protected void didRecohereOutput(int version)
-
-