- 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 void
bindOutput(Inlet<? super O> output)
Adds anoutput
to the set ofInlet
s that depend on the state of thisOutlet
.void
decohereInput()
Marks thisOutlet
—and alloutputs
that depend on the state of thisOutlet
—as having decoherent state.protected void
didDecohereInput()
protected void
didRecohereInput(int version)
void
disconnectInputs()
Disconnects allInlet
s dominated by thisOutlet
in the dataflow dependency graph.void
disconnectOutputs()
Disconnects allOutlet
s dominated by thisOutlet
in the dataflow graph.abstract O
get()
Returns the current state of thisOutlet
.protected void
onDecohereInput()
protected void
onRecohereInput(int version)
Iterator<Inlet<? super O>>
outputIterator()
Returns anIterator
over the set ofInlet
s that depend on the state of thisOutlet
.void
recohereInput(int version)
Updates the state of thisOutlet
to make it consistent with the targetversion
.void
unbindOutput(Inlet<? super O> output)
Removes anoutput
from the set ofInlet
s that depend on the state of thisOutlet
.void
unbindOutputs()
Disconnects all outputs from thisOutlet
by invokingInlet.unbindInput()
on eachInelt
that depends on the state of thisOutlet
.protected void
willDecohereInput()
protected void
willRecohereInput(int version)
-
-
-
Method Detail
-
get
public abstract O get()
Description copied from interface:Outlet
Returns the current state of thisOutlet
.
-
outputIterator
public Iterator<Inlet<? super O>> outputIterator()
Description copied from interface:Outlet
Returns anIterator
over the set ofInlet
s that depend on the state of thisOutlet
.- Specified by:
outputIterator
in interfaceOutlet<O>
-
bindOutput
public void bindOutput(Inlet<? super O> output)
Description copied from interface:Outlet
Adds anoutput
to the set ofInlet
s that depend on the state of thisOutlet
. Theoutput
will be decohered when the state of thisOutlet
is decohered, and recohered when thisOutlet
is recohered.- Specified by:
bindOutput
in interfaceOutlet<O>
-
unbindOutput
public void unbindOutput(Inlet<? super O> output)
Description copied from interface:Outlet
Removes anoutput
from the set ofInlet
s that depend on the state of thisOutlet
.- Specified by:
unbindOutput
in interfaceOutlet<O>
-
unbindOutputs
public void unbindOutputs()
Description copied from interface:Outlet
Disconnects all outputs from thisOutlet
by invokingInlet.unbindInput()
on eachInelt
that depends on the state of thisOutlet
.- Specified by:
unbindOutputs
in interfaceOutlet<O>
-
disconnectOutputs
public void disconnectOutputs()
Description copied from interface:Outlet
Disconnects allOutlet
s dominated by thisOutlet
in the dataflow graph. Used to recursively clean up chains of combinators originating from thisInlet
.- Specified by:
disconnectOutputs
in interfaceOutlet<O>
-
disconnectInputs
public void disconnectInputs()
Description copied from interface:Outlet
Disconnects allInlet
s dominated by thisOutlet
in the dataflow dependency graph. Used to recursively clean up chains of combinators passing through thisOutlet
.- Specified by:
disconnectInputs
in interfaceOutlet<O>
-
decohereInput
public void decohereInput()
Description copied from interface:Outlet
Marks thisOutlet
—and alloutputs
that depend on the state of thisOutlet
—as having decoherent state.- Specified by:
decohereInput
in interfaceOutlet<O>
-
recohereInput
public void recohereInput(int version)
Description copied from interface:Outlet
Updates the state of thisOutlet
to make it consistent with the targetversion
. TheOutlet
only needs to update if its currentversion
differs from the targetversion
. To update its state, theOutlet
first invokesStreamlet.recohere(int)
on theStreamlet
to which it's attached. It then invokesInlet.recohereOutput(int)
on each of its dependentoutputs
.- Specified by:
recohereInput
in 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)
-
-