java.lang.Object
swim.streamlet.AbstractMapOutlet<K,V,O>
- Direct Known Subclasses:
MapInput
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbindOutput(Inlet<? super O> output) Adds anoutputto the set ofInlets that depend on the state of thisOutlet.abstract booleancontainsKey(K key) Returnstrueif the current state of thisMapOutletcontains the givenkey; otherwise returnsfalse.voidMarks thisOutlet—and alloutputsthat depend on the state of thisOutlet—as having decoherent state.voiddecohereInputKey(K key, KeyEffect effect) Marks thisMapOutletas needing aneffectapplied to a givenkey.protected voidprotected voiddidDecohereInputKey(K key, KeyEffect effect) protected voiddidRecohereInput(int version) protected voiddidRecohereInputKey(K key, KeyEffect effect, int version) voidDisconnects allInlets dominated by thisOutletin the dataflow dependency graph.voidDisconnects allOutlets dominated by thisOutletin the dataflow graph.abstract Oget()Returns the current state of thisOutlet.abstract VReturns the value assocaited with the givenkeyin the current state of thisMapOutlet, if defined; otherwise returnsnull.Returns anIteratorover the keys in the current state of thisMapOutlet.protected voidprotected voidonDecohereInputKey(K key, KeyEffect effect) protected voidonRecohereInput(int version) protected voidonRecohereInputKey(K key, KeyEffect effect, int version) Returns anOutletthat updates when the specifiedkeyupdates.Returns anIteratorover the set ofInlets that depend on the state of thisOutlet.voidrecohereInput(int version) Updates the state of thisOutletto make it consistent with the targetversion.voidrecohereInputKey(K key, int version) Updates the state of an individualkeyin thisMapOutletto make it consistent with the targetversion.voidunbindOutput(Inlet<? super O> output) Removes anoutputfrom the set ofInlets that depend on the state of thisOutlet.voidDisconnects all outputs from thisOutletby invokingInlet.unbindInput()on eachIneltthat depends on the state of thisOutlet.protected voidprotected voidwillDecohereInputKey(K key, KeyEffect effect) protected voidwillRecohereInput(int version) protected voidwillRecohereInputKey(K key, KeyEffect effect, int version)
-
Field Details
-
effects
-
outlets
-
outputs
-
version
protected int version
-
-
Constructor Details
-
AbstractMapOutlet
public AbstractMapOutlet()
-
-
Method Details
-
containsKey
Description copied from interface:MapOutletReturnstrueif the current state of thisMapOutletcontains the givenkey; otherwise returnsfalse.- Specified by:
containsKeyin interfaceMapOutlet<K,V, O>
-
get
Description copied from interface:MapOutletReturns the value assocaited with the givenkeyin the current state of thisMapOutlet, if defined; otherwise returnsnull. -
get
Description copied from interface:OutletReturns the current state of thisOutlet. -
keyIterator
Description copied from interface:MapOutletReturns anIteratorover the keys in the current state of thisMapOutlet.- Specified by:
keyIteratorin interfaceMapOutlet<K,V, O>
-
outlet
Description copied from interface:MapOutletReturns anOutletthat updates when the specifiedkeyupdates. -
outputIterator
Description copied from interface:OutletReturns anIteratorover the set ofInlets that depend on the state of thisOutlet.- Specified by:
outputIteratorin interfaceOutlet<K>
-
bindOutput
Description copied from interface:OutletAdds anoutputto the set ofInlets that depend on the state of thisOutlet. Theoutputwill be decohered when the state of thisOutletis decohered, and recohered when thisOutletis recohered.- Specified by:
bindOutputin interfaceOutlet<K>
-
unbindOutput
Description copied from interface:OutletRemoves anoutputfrom the set ofInlets that depend on the state of thisOutlet.- Specified by:
unbindOutputin interfaceOutlet<K>
-
unbindOutputs
public void unbindOutputs()Description copied from interface:OutletDisconnects all outputs from thisOutletby invokingInlet.unbindInput()on eachIneltthat depends on the state of thisOutlet.- Specified by:
unbindOutputsin interfaceOutlet<K>
-
disconnectOutputs
public void disconnectOutputs()Description copied from interface:OutletDisconnects allOutlets dominated by thisOutletin the dataflow graph. Used to recursively clean up chains of combinators originating from thisInlet.- Specified by:
disconnectOutputsin interfaceOutlet<K>
-
disconnectInputs
public void disconnectInputs()Description copied from interface:OutletDisconnects allInlets dominated by thisOutletin the dataflow dependency graph. Used to recursively clean up chains of combinators passing through thisOutlet.- Specified by:
disconnectInputsin interfaceOutlet<K>
-
decohereInputKey
Description copied from interface:MapOutletMarks thisMapOutletas needing aneffectapplied to a givenkey. Decohering an individual key decoheres the entire state of theOutlet. But only the decoherent keys need to be updated in order to recohere the overall state of theOutlet.- Specified by:
decohereInputKeyin interfaceMapOutlet<K,V, O>
-
decohereInput
public void decohereInput()Description copied from interface:OutletMarks thisOutlet—and alloutputsthat depend on the state of thisOutlet—as having decoherent state.- Specified by:
decohereInputin interfaceOutlet<K>
-
recohereInputKey
Description copied from interface:MapOutletUpdates the state of an individualkeyin thisMapOutletto make it consistent with the targetversion. TheMapOutletonly needs to update if its currentversiondiffers from the targetversion. To update the state of a key, theMapOutletfirst invokesStreamlet.recohere(int)on its attached streamlets. Then, for each dependent output, it invokesMapInlet.recohereOutputKey(Object, int), if the dependent output is aMapInlet, or it invokesInlet.recohereOutput(int), if the dependent output is not aMapInlet.- Specified by:
recohereInputKeyin interfaceMapOutlet<K,V, O>
-
recohereInput
public void recohereInput(int version) Description copied from interface:OutletUpdates the state of thisOutletto make it consistent with the targetversion. TheOutletonly needs to update if its currentversiondiffers from the targetversion. To update its state, theOutletfirst invokesStreamlet.recohere(int)on theStreamletto which it's attached. It then invokesInlet.recohereOutput(int)on each of its dependentoutputs.- Specified by:
recohereInputin interfaceOutlet<K>
-
willDecohereInputKey
-
onDecohereInputKey
-
didDecohereInputKey
-
willDecohereInput
protected void willDecohereInput() -
onDecohereInput
protected void onDecohereInput() -
didDecohereInput
protected void didDecohereInput() -
willRecohereInputKey
-
onRecohereInputKey
-
didRecohereInputKey
-
willRecohereInput
protected void willRecohereInput(int version) -
onRecohereInput
protected void onRecohereInput(int version) -
didRecohereInput
protected void didRecohereInput(int version)
-