- 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 void
bindInput(Outlet<? extends I> input)
Connects thisInlet
to anOutlet
from which it will acquire its state.protected void
didInvalidateOutput()
protected void
didReconcileOutput(int version)
void
disconnectInputs()
Disconnects allInlet
s dominated by thisInlet
in the dataflow dependency graph.void
disconnectOutputs()
Disconnects allOutlet
s dominated by thisInlet
in the dataflow graph.Outlet<? extends I>
input()
Returns theOutlet
from which thisInlet
acquires its state; returnsnull
if thisInlet
is disconnected.void
invalidateOutput()
Marks thisInlet
—and theStreamlet
to which thisInlet
is attached—as having stale state.protected void
onInvalidateOutput()
protected void
onReconcileOutput(int version)
void
reconcileOutput(int version)
Reconciles the state of thisInlet
, if the version of thisInlet
's state differs from the targetversion
.void
unbindInput()
Disconnects thisInlet
from its inputOutlet
, if connected.protected void
willInvalidateOutput()
protected void
willReconcileOutput(int version)
-
-
-
Method Detail
-
input
public Outlet<? extends I> input()
Description copied from interface:Inlet
Returns theOutlet
from which thisInlet
acquires its state; returnsnull
if thisInlet
is disconnected.
-
bindInput
public void bindInput(Outlet<? extends I> input)
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>
-
invalidateOutput
public void invalidateOutput()
Description copied from interface:Inlet
Marks thisInlet
—and theStreamlet
to which thisInlet
is attached—as having stale state. Invalidating anInlet
will recursively invalidate all streamlets that transitively depend on the state of thisInlet
. Invalidating anInlet
does not cause its state to be recomputed. A subsequentInlet.reconcileOutput(int)
call will reconcile the state of theInlet
.- Specified by:
invalidateOutput
in interfaceInlet<I>
-
reconcileOutput
public void reconcileOutput(int version)
Description copied from interface:Inlet
Reconciles the state of thisInlet
, if the version of thisInlet
's state differs from the targetversion
. To reconcile its state, theInlet
first invokesOutlet.reconcileInput(int)
on itsinput
, to ensure that its input is up-to-date. It then invokesStreamlet.reconcile(int)
on theStreamlet
to which it's attached, causing theStreamlet
to reconcile its own state.- Specified by:
reconcileOutput
in 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)
-
-