- All Superinterfaces:
StreamletScope<O>
- All Known Subinterfaces:
GenericStreamlet<I,O>
- All Known Implementing Classes:
AbstractRecordStreamlet,AbstractStreamlet,DownlinkStreamlet,RecordStreamlet
-
Method Summary
Modifier and TypeMethodDescriptionvoidConnects theInletof thisStreamlet, identified by the givenkey, to theinputfrom which theInletshould acquire its state.voiddecohere()Marks thisStreamlet—and all of its outlets—as having inconsistent state.voidDisconnects allInlets dominated by thisStreamletin the dataflow dependency graph.voidDisconnects allInletss dominated by thisStreamletin the dataflow graph.Returns theInletto thisStreamletidentified by the givenkey; returnsnullif thisStreamlethas no suchInlet.Returns theOutletof thisStreamletidentified by the givenkey; returnsnullif thisStreamlethas no suchOutlet.voidrecohere(int version) Updates the state of thisStreamletto make it consistent with the targetversion.voidsetStreamletContext(StreamletContext context) Sets the environment in which thisStreamletoperates.voidsetStreamletScope(StreamletScope<? extends O> scope) Sets the lexically scoped parent of thisStreamlet.Returns the environment in which thisStreamletoperates.StreamletScope<? extends O>Returns the lexically scoped parent of thisStreamlet.voidunbindInput(String key) Disconnects theInletof thisStreamlet, identified by the givenkey, from itsinputOutlet, if connected.
-
Method Details
-
streamletScope
StreamletScope<? extends O> streamletScope()Returns the lexically scoped parent of thisStreamlet. Returnsnullif thisStreamlethas no lexical parent.- Specified by:
streamletScopein interfaceStreamletScope<I>
-
setStreamletScope
Sets the lexically scoped parent of thisStreamlet. -
streamletContext
StreamletContext streamletContext()Returns the environment in which thisStreamletoperates.- Specified by:
streamletContextin interfaceStreamletScope<I>
-
setStreamletContext
Sets the environment in which thisStreamletoperates. -
inlet
Returns theInletto thisStreamletidentified by the givenkey; returnsnullif thisStreamlethas no suchInlet. -
bindInput
Connects theInletof thisStreamlet, identified by the givenkey, to theinputfrom which theInletshould acquire its state. Delegates toInlet.bindInput(Outlet)on the identifiedInlet.- Throws:
IllegalArgumentException- if thisStreamlethas noInletwith the givenkey.
-
unbindInput
Disconnects theInletof thisStreamlet, identified by the givenkey, from itsinputOutlet, if connected. Delegates toInlet.unbindInput()on the identifiedInlet.- Throws:
IllegalArgumentException- if thisStreamlethas noInletwith the givenkey.
-
outlet
Returns theOutletof thisStreamletidentified by the givenkey; returnsnullif thisStreamlethas no suchOutlet.- Specified by:
outletin interfaceStreamletScope<I>
-
disconnectInputs
void disconnectInputs()Disconnects allInlets dominated by thisStreamletin the dataflow dependency graph. Used to recursively clean up chains of combinators terminating at thisStreamlet. -
disconnectOutputs
void disconnectOutputs()Disconnects allInletss dominated by thisStreamletin the dataflow graph. Used to recursively clean up chains of combinators originating from thisStreamlet. -
decohere
void decohere()Marks thisStreamlet—and all of its outlets—as having inconsistent state. Decohering aStreamletwill recursively decohere all streamlets that transitively depend on the state of thisStreamlet. Decohering aStreamletdoes not cause its state to be recomputed. A subsequentrecohere(int)call will eventually make the state of theStreamletcoherent again. -
recohere
void recohere(int version) Updates the state of thisStreamletto make it consistent with the targetversion. TheStreamletonly needs to update if its currentversiondiffers from the targetversion. To update its state, theStreamletfirst invokesInlet.recohereOutput(int)on each of its inlets, to ensure that its input states are coherent. It then recomputes its own state in an implementation defined manner. Finally, it invokesOutlet.recohereInput(int)on its outlets, causing all transitively dependent streamlets to make their own states coherent again.
-