-
- 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
Modifier and Type Method Description booleancontainsKey(K key)Returnstrueif the current state of thisMapOutletcontains the givenkey; otherwise returnsfalse.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.voidinvalidateInputKey(K key, KeyEffect effect)Marks thisMapOutletas needing aneffectapplied to a givenkey.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.voidreconcileInputKey(K key, int version)Reconciles the state of an individualkeyin thisMapOutlet, if the version of thisMapOutlet's state differs from 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, disconnectInputs, disconnectOutputs, get, invalidateInput, map, outputIterator, reconcileInput, 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.
-
invalidateInputKey
void invalidateInputKey(K key, KeyEffect effect)
Marks thisMapOutletas needing aneffectapplied to a givenkey. Invalidating an individual key invalidates the entire state of theOutlet. But only the invalidated keys need to be updated in order to reconcile the overall state of theOutlet.
-
reconcileInputKey
void reconcileInputKey(K key, int version)
Reconciles the state of an individualkeyin thisMapOutlet, if the version of thisMapOutlet's state differs from the targetversion. To reconcile the state of a key, theMapOutletfirst invokesStreamlet.reconcile(int)on its attached streamlets. Then, for each dependent output, it invokesMapInlet.reconcileOutputKey(Object, int), if the dependent output is aMapInlet, or it invokesInlet.reconcileOutput(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)
-
-