java.lang.Object
swim.streamlet.AbstractInlet<I>
- All Implemented Interfaces:
Inlet<I>
- Direct Known Subclasses:
OutletInlet
,RecordFieldUpdater
,StreamletInlet
,ValueOutput
,WatchValueOperator
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Connects thisInlet
to anOutlet
from which it will acquire its state.void
Marks thisInlet
—and theStreamlet
to which thisInlet
is attached—as having decoherent state.protected void
protected void
didRecohereOutput
(int version) void
Disconnects allInlet
s dominated by thisInlet
in the dataflow dependency graph.void
Disconnects allOutlet
s dominated by thisInlet
in the dataflow graph.input()
Returns theOutlet
from which thisInlet
acquires its state; returnsnull
if thisInlet
is disconnected.protected void
protected void
onRecohereOutput
(int version) void
recohereOutput
(int version) Updates the state of thisInlet
to make it consistent with thetarget
version.void
Disconnects thisInlet
from its inputOutlet
, if connected.protected void
protected void
willRecohereOutput
(int version)
-
Field Details
-
input
-
version
protected int version
-
-
Constructor Details
-
AbstractInlet
public AbstractInlet()
-
-
Method Details
-
input
Description copied from interface:Inlet
Returns theOutlet
from which thisInlet
acquires its state; returnsnull
if thisInlet
is disconnected. -
bindInput
Description copied from interface:Inlet
Connects thisInlet
to anOutlet
from which it will acquire its state. If thisInlet
is already connected, it will first disconnect from its existing input. Then, after updating itsinput
property, theInlet
will invokeOutlet.bindOutput(Inlet)
on its newinput
. -
unbindInput
public void unbindInput()Description copied from interface:Inlet
Disconnects thisInlet
from its inputOutlet
, if connected. After setting itsinput
property tonull
, theInlet
will invokeOutlet.unbindOutput(Inlet)
on its old input, if defined.- Specified by:
unbindInput
in interfaceInlet<I>
-
disconnectInputs
public void disconnectInputs()Description copied from interface:Inlet
Disconnects allInlet
s dominated by thisInlet
in the dataflow dependency graph. Used to recursively clean up chains of combinators terminating at thisInlet
.- Specified by:
disconnectInputs
in interfaceInlet<I>
-
disconnectOutputs
public void disconnectOutputs()Description copied from interface:Inlet
Disconnects allOutlet
s dominated by thisInlet
in the dataflow graph. Used to recursively clean up chains of combinators passing through thisInlet
.- Specified by:
disconnectOutputs
in interfaceInlet<I>
-
decohereOutput
public void decohereOutput()Description copied from interface:Inlet
Marks thisInlet
—and theStreamlet
to which thisInlet
is attached—as having decoherent state. Decohering anInlet
will recursively decohere all streamlets that transitively depend on the state of thisInlet
. Decohering anInlet
does not cause its state to be recomputed. A subsequentInlet.recohereOutput(int)
call will eventually make the state of theInlet
coherent again.- Specified by:
decohereOutput
in interfaceInlet<I>
-
recohereOutput
public void recohereOutput(int version) Description copied from interface:Inlet
Updates the state of thisInlet
to make it consistent with thetarget
version. TheInlet
only needs to update if its currentversion
differs from the targetversion
. To update its state, theInlet
first invokesOutlet.recohereInput(int)
on itsinput
, to ensure that its input is coherent. It then invokesStreamlet.recohere(int)
on theStreamlet
to which it's attached, causing theStreamlet
to make its own state coherent again.- Specified by:
recohereOutput
in 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)
-