-
- All Known Subinterfaces:
Inoutlet<I,O>
,MapDownlink<K,V>
,MapInlet<K,V,I>
,MapInletMapOutlet<KI,KO,VI,VO,I,O>
,MapInletOutlet<K,V,I,O>
,MapInoutlet<K,VI,VO,I,O>
,MapLane<K,V>
,ValueDownlink<V>
,ValueLane<V>
- All Known Implementing Classes:
AbstractInlet
,AbstractInoutlet
,AbstractMapInlet
,AbstractMapInletMapOutlet
,AbstractMapInletOutlet
,AbstractMapInoutlet
,FilterFieldsCombinator
,FilterFieldsOperator
,JoinMapLaneDownlink
,JoinValueLaneDownlink
,MapDownlinkView
,MapFieldValuesCombinator
,MapFieldValuesOperator
,MapLaneView
,MapOutput
,MapValueCombinator
,MapValueOperator
,MemoizeMapCombinator
,MemoizeValueCombinator
,OutletInlet
,OutletMapInlet
,RecordFieldUpdater
,ReduceFieldsCombinator
,ReduceFieldsOperator
,StreamletInlet
,StreamletInoutlet
,ValueDownlinkView
,ValueLaneView
,ValueOutput
,WatchFieldsCombinator
,WatchFieldsOperator
,WatchValueCombinator
,WatchValueOperator
public interface Inlet<I>
Input connector into aStreamlet
. AnInlet
represents a source from which aStreamlet
acquires state.In order for an
Inlet
to provide state to itsStreamlet
, it must bind to aninput
source. The input source of anInlet
is anOutlet
of some otherStreamlet
. ThebindInput(Outlet)
method "plugs" theInlet
into anOutlet
. TheunbindInput()
method "unplugs" theInlet
from its connectedOutlet
.The state of an
Inlet
has an integral version. When its version is negative, the state of theInlet
is considered invalid. When any state on which anInlet
transitively depends changes, theInlet
will beinvalidated
. Invalidation does not immediately cause anInlet
to recompute its state. Instead, a separatereconcileOutput(int)
step causes all of the invalid paths in the dataflow graph passing through theInlet
to reconcile their state.
-
-
Method Summary
Modifier and Type Method Description void
bindInput(Outlet<? extends I> input)
Connects thisInlet
to anOutlet
from which it will acquire its state.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.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.
-
-
-
Method Detail
-
input
Outlet<? extends I> input()
Returns theOutlet
from which thisInlet
acquires its state; returnsnull
if thisInlet
is disconnected.
-
bindInput
void bindInput(Outlet<? extends I> input)
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
void unbindInput()
Disconnects thisInlet
from its inputOutlet
, if connected. After setting itsinput
property tonull
, theInlet
will invokeOutlet.unbindOutput(Inlet)
on its old input, if defined.
-
disconnectInputs
void disconnectInputs()
Disconnects allInlet
s dominated by thisInlet
in the dataflow dependency graph. Used to recursively clean up chains of combinators terminating at thisInlet
.
-
disconnectOutputs
void disconnectOutputs()
Disconnects allOutlet
s dominated by thisInlet
in the dataflow graph. Used to recursively clean up chains of combinators passing through thisInlet
.
-
invalidateOutput
void invalidateOutput()
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 subsequentreconcileOutput(int)
call will reconcile the state of theInlet
.
-
reconcileOutput
void reconcileOutput(int version)
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.
-
-