Interface MapOutlet<K,V,O>

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 a Streamlet for a key-value map state.
  • Method Details

    • containsKey

      boolean containsKey(K key)
      Returns true if the current state of this MapOutlet contains the given key; otherwise returns false.
    • get

      V get(K key)
      Returns the value assocaited with the given key in the current state of this MapOutlet, if defined; otherwise returns null.
    • keyIterator

      Iterator<K> keyIterator()
      Returns an Iterator over the keys in the current state of this MapOutlet.
    • outlet

      Outlet<V> outlet(K key)
      Returns an Outlet that updates when the specified key updates.
    • decohereInputKey

      void decohereInputKey(K key, KeyEffect effect)
      Marks this MapOutlet as needing an effect applied to a given key. Decohering an individual key decoheres the entire state of the Outlet. But only the decoherent keys need to be updated in order to recohere the overall state of the Outlet.
    • recohereInputKey

      void recohereInputKey(K key, int version)
      Updates the state of an individual key in this MapOutlet to make it consistent with the target version. The MapOutlet only needs to update if its current version differs from the target version. To update the state of a key, the MapOutlet first invokes Streamlet.recohere(int) on its attached streamlets. Then, for each dependent output, it invokes MapInlet.recohereOutputKey(Object, int), if the dependent output is a MapInlet, or it invokes Inlet.recohereOutput(int), if the dependent output is not a MapInlet.
    • memoize

      default MapOutlet<K,V,O> memoize()
      Specified by:
      memoize in interface Outlet<K>
    • 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)
    • watch

      default MapOutlet<K,V,O> watch(WatchFieldsFunction<? super K,? super V> func)