- java.lang.Object
-
- swim.streamlet.AbstractOutlet<O>
-
- All Implemented Interfaces:
Outlet<O>
- Direct Known Subclasses:
AndOutlet,BinaryOutlet,ConditionalOutlet,GetOutlet,InvokeOutlet,KeyOutlet,OrOutlet,StreamletOutlet,UnaryOutlet,ValueInput
public abstract class AbstractOutlet<O> extends Object implements Outlet<O>
-
-
Constructor Summary
Constructors Constructor Description AbstractOutlet()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidbindOutput(Inlet<? super O> output)Adds anoutputto the set ofInlets that depend on the state of thisOutlet.voiddecohereInput()Marks thisOutlet—and alloutputsthat depend on the state of thisOutlet—as having decoherent state.protected voiddidDecohereInput()protected voiddidRecohereInput(int version)voiddisconnectInputs()Disconnects allInlets dominated by thisOutletin the dataflow dependency graph.voiddisconnectOutputs()Disconnects allOutlets dominated by thisOutletin the dataflow graph.abstract Oget()Returns the current state of thisOutlet.protected voidonDecohereInput()protected voidonRecohereInput(int version)Iterator<Inlet<? super O>>outputIterator()Returns anIteratorover the set ofInlets that depend on the state of thisOutlet.voidrecohereInput(int version)Updates the state of thisOutletto make it consistent with the targetversion.voidunbindOutput(Inlet<? super O> output)Removes anoutputfrom the set ofInlets that depend on the state of thisOutlet.voidunbindOutputs()Disconnects all outputs from thisOutletby invokingInlet.unbindInput()on eachIneltthat depends on the state of thisOutlet.protected voidwillDecohereInput()protected voidwillRecohereInput(int version)
-
-
-
Method Detail
-
get
public abstract O get()
Description copied from interface:OutletReturns the current state of thisOutlet.
-
outputIterator
public Iterator<Inlet<? super O>> outputIterator()
Description copied from interface:OutletReturns anIteratorover the set ofInlets that depend on the state of thisOutlet.- Specified by:
outputIteratorin interfaceOutlet<O>
-
bindOutput
public void bindOutput(Inlet<? super O> output)
Description copied from interface:OutletAdds anoutputto the set ofInlets that depend on the state of thisOutlet. Theoutputwill be decohered when the state of thisOutletis decohered, and recohered when thisOutletis recohered.- Specified by:
bindOutputin interfaceOutlet<O>
-
unbindOutput
public void unbindOutput(Inlet<? super O> output)
Description copied from interface:OutletRemoves anoutputfrom the set ofInlets that depend on the state of thisOutlet.- Specified by:
unbindOutputin interfaceOutlet<O>
-
unbindOutputs
public void unbindOutputs()
Description copied from interface:OutletDisconnects all outputs from thisOutletby invokingInlet.unbindInput()on eachIneltthat depends on the state of thisOutlet.- Specified by:
unbindOutputsin interfaceOutlet<O>
-
disconnectOutputs
public void disconnectOutputs()
Description copied from interface:OutletDisconnects allOutlets dominated by thisOutletin the dataflow graph. Used to recursively clean up chains of combinators originating from thisInlet.- Specified by:
disconnectOutputsin interfaceOutlet<O>
-
disconnectInputs
public void disconnectInputs()
Description copied from interface:OutletDisconnects allInlets dominated by thisOutletin the dataflow dependency graph. Used to recursively clean up chains of combinators passing through thisOutlet.- Specified by:
disconnectInputsin interfaceOutlet<O>
-
decohereInput
public void decohereInput()
Description copied from interface:OutletMarks thisOutlet—and alloutputsthat depend on the state of thisOutlet—as having decoherent state.- Specified by:
decohereInputin interfaceOutlet<O>
-
recohereInput
public void recohereInput(int version)
Description copied from interface:OutletUpdates the state of thisOutletto make it consistent with the targetversion. TheOutletonly needs to update if its currentversiondiffers from the targetversion. To update its state, theOutletfirst invokesStreamlet.recohere(int)on theStreamletto which it's attached. It then invokesInlet.recohereOutput(int)on each of its dependentoutputs.- Specified by:
recohereInputin interfaceOutlet<O>
-
willDecohereInput
protected void willDecohereInput()
-
onDecohereInput
protected void onDecohereInput()
-
didDecohereInput
protected void didDecohereInput()
-
willRecohereInput
protected void willRecohereInput(int version)
-
onRecohereInput
protected void onRecohereInput(int version)
-
didRecohereInput
protected void didRecohereInput(int version)
-
-