-
- All Superinterfaces:
Outlet<O>
- All Known Subinterfaces:
MapDownlink<K,V>,MapInletMapOutlet<KI,KO,VI,VO,I,O>,MapInoutlet<K,VI,VO,I,O>,MapLane<K,V>,RecordOutlet
- All Known Implementing Classes:
AbstractMapInletMapOutlet,AbstractMapInoutlet,AbstractMapOutlet,AbstractRecordOutlet,DownlinkRecord,FilterFieldsCombinator,FilterFieldsOperator,JoinMapLaneDownlink,ListDownlinkRecord,MapDownlinkRecord,MapDownlinkView,MapFieldValuesCombinator,MapFieldValuesOperator,MapInput,MapLaneView,MemoizeMapCombinator,RecordModel,RecordScope,ValueDownlinkRecord
public interface MapOutlet<K,V,O> extends Outlet<O>
Output connector from aStreamletfor a key-value map state.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description booleancontainsKey(K key)Returnstrueif the current state of thisMapOutletcontains the givenkey; otherwise returnsfalse.voiddecohereInputKey(K key, KeyEffect effect)Marks thisMapOutletas needing aneffectapplied to a givenkey.default MapOutlet<K,V,? extends Map<K,V>>filter(FilterFieldsFunction<? super K,? super V> func)Vget(K key)Returns the value assocaited with the givenkeyin the current state of thisMapOutlet, if defined; otherwise returnsnull.Iterator<K>keyIterator()Returns anIteratorover the keys in the current state of thisMapOutlet.default <V2> MapOutlet<K,V2,? extends Map<K,V2>>map(MapFieldValuesFunction<? super K,? super V,V2> func)default MapOutlet<K,V,O>memoize()Outlet<V>outlet(K key)Returns anOutletthat updates when the specifiedkeyupdates.voidrecohereInputKey(K key, int version)Updates the state of an individualkeyin thisMapOutletto make it consistent with the targetversion.default <U> Outlet<U>reduce(U identity, CombinerFunction<? super V,U> accumulator, CombinerFunction<U,U> combiner)default MapOutlet<K,V,O>watch(WatchFieldsFunction<? super K,? super V> func)-
Methods inherited from interface swim.streamlet.Outlet
bindOutput, decohereInput, disconnectInputs, disconnectOutputs, get, map, outputIterator, recohereInput, unbindOutput, unbindOutputs, watch
-
-
-
-
Method Detail
-
containsKey
boolean containsKey(K key)
Returnstrueif the current state of thisMapOutletcontains the givenkey; otherwise returnsfalse.
-
get
V get(K key)
Returns the value assocaited with the givenkeyin the current state of thisMapOutlet, if defined; otherwise returnsnull.
-
keyIterator
Iterator<K> keyIterator()
Returns anIteratorover the keys in the current state of thisMapOutlet.
-
decohereInputKey
void decohereInputKey(K key, KeyEffect effect)
Marks 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.
-
recohereInputKey
void recohereInputKey(K key, int version)
Updates 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.
-
filter
default MapOutlet<K,V,? extends Map<K,V>> filter(FilterFieldsFunction<? super K,? super V> func)
-
map
default <V2> MapOutlet<K,V2,? extends Map<K,V2>> map(MapFieldValuesFunction<? super K,? super V,V2> func)
-
reduce
default <U> Outlet<U> reduce(U identity, CombinerFunction<? super V,U> accumulator, CombinerFunction<U,U> combiner)
-
-