Class AbstractMapInoutlet<K,​VI,​VO,​I,​O>

    • Constructor Detail

      • AbstractMapInoutlet

        public AbstractMapInoutlet()
    • Method Detail

      • containsKey

        public abstract boolean containsKey​(K key)
        Description copied from interface: MapOutlet
        Returns true if the current state of this MapOutlet contains the given key; otherwise returns false.
        Specified by:
        containsKey in interface MapOutlet<K,​VI,​VO>
      • get

        public abstract VO get​(K key)
        Description copied from interface: MapOutlet
        Returns the value assocaited with the given key in the current state of this MapOutlet, if defined; otherwise returns null.
        Specified by:
        get in interface MapOutlet<K,​VI,​VO>
      • get

        public abstract O get()
        Description copied from interface: Outlet
        Returns the current state of this Outlet.
        Specified by:
        get in interface Outlet<K>
      • keyIterator

        public abstract Iterator<K> keyIterator()
        Description copied from interface: MapOutlet
        Returns an Iterator over the keys in the current state of this MapOutlet.
        Specified by:
        keyIterator in interface MapOutlet<K,​VI,​VO>
      • input

        public MapOutlet<K,​VI,​? extends I> input()
        Description copied from interface: Inlet
        Returns the Outlet from which this Inlet acquires its state; returns null if this Inlet is disconnected.
        Specified by:
        input in interface Inlet<K>
      • bindInput

        public void bindInput​(Outlet<? extends I> input)
        Description copied from interface: Inlet
        Connects this Inlet to an Outlet from which it will acquire its state. If this Inlet is already connected, it will first disconnect from its existing input. Then, after updating its input property, the Inlet will invoke Outlet.bindOutput(Inlet) on its new input.
        Specified by:
        bindInput in interface Inlet<K>
      • bindInput

        public void bindInput​(MapOutlet<K,​VI,​? extends I> input)
      • unbindInput

        public void unbindInput()
        Description copied from interface: Inlet
        Disconnects this Inlet from its input Outlet, if connected. After setting its input property to null, the Inlet will invoke Outlet.unbindOutput(Inlet) on its old input, if defined.
        Specified by:
        unbindInput in interface Inlet<K>
      • disconnectInputs

        public void disconnectInputs()
        Description copied from interface: Inoutlet
        Disconnects all Inlets dominated by this Inoutlet in the dataflow dependency graph. Used to recursively clean up chains of combinators passing through this Inoutlet.
        Specified by:
        disconnectInputs in interface Inlet<K>
        Specified by:
        disconnectInputs in interface Inoutlet<K,​VI>
        Specified by:
        disconnectInputs in interface Outlet<K>
      • outlet

        public Outlet<VO> outlet​(K key)
        Description copied from interface: MapOutlet
        Returns an Outlet that updates when the specified key updates.
        Specified by:
        outlet in interface MapOutlet<K,​VI,​VO>
      • outputIterator

        public Iterator<Inlet<? super O>> outputIterator()
        Description copied from interface: Outlet
        Returns an Iterator over the set of Inlets that depend on the state of this Outlet.
        Specified by:
        outputIterator in interface Outlet<K>
      • bindOutput

        public void bindOutput​(Inlet<? super O> output)
        Description copied from interface: Outlet
        Adds an output to the set of Inlets that depend on the state of this Outlet. The output will be invalidated when the state of this Outlet is invalidated, and updated when this Outlet is updated.
        Specified by:
        bindOutput in interface Outlet<K>
      • unbindOutput

        public void unbindOutput​(Inlet<? super O> output)
        Description copied from interface: Outlet
        Removes an output from the set of Inlets that depend on the state of this Outlet.
        Specified by:
        unbindOutput in interface Outlet<K>
      • unbindOutputs

        public void unbindOutputs()
        Description copied from interface: Outlet
        Disconnects all outputs from this Outlet by invoking Inlet.unbindInput() on each Inelt that depends on the state of this Outlet.
        Specified by:
        unbindOutputs in interface Outlet<K>
      • disconnectOutputs

        public void disconnectOutputs()
        Description copied from interface: Inoutlet
        Disconnects all Inletss dominated by this Inoutlet in the dataflow graph. Used to recursively clean up chains of combinators passing through this Inoutlet.
        Specified by:
        disconnectOutputs in interface Inlet<K>
        Specified by:
        disconnectOutputs in interface Inoutlet<K,​VI>
        Specified by:
        disconnectOutputs in interface Outlet<K>
      • invalidateOutputKey

        public void invalidateOutputKey​(K key,
                                        KeyEffect effect)
        Description copied from interface: MapInlet
        Marks this MapInlet as needing an effect applied to a given key. Invalidating an individual key invalidates the entire state of the Inlet. But only the invalidated keys need to be updated in order to reconcile the overall state of the Inlet.
        Specified by:
        invalidateOutputKey in interface MapInlet<K,​VI,​VO>
      • invalidateInputKey

        public void invalidateInputKey​(K key,
                                       KeyEffect effect)
        Description copied from interface: MapOutlet
        Marks this MapOutlet as needing an effect applied to a given key. Invalidating an individual key invalidates the entire state of the Outlet. But only the invalidated keys need to be updated in order to reconcile the overall state of the Outlet.
        Specified by:
        invalidateInputKey in interface MapOutlet<K,​VI,​VO>
      • invalidateKey

        public void invalidateKey​(K key,
                                  KeyEffect effect)
      • invalidateOutput

        public void invalidateOutput()
        Description copied from interface: Inlet
        Marks this Inlet—and the Streamlet to which this Inlet is attached—as having stale state. Invalidating an Inlet will recursively invalidate all streamlets that transitively depend on the state of this Inlet. Invalidating an Inlet does not cause its state to be recomputed. A subsequent Inlet.reconcileOutput(int) call will reconcile the state of the Inlet.
        Specified by:
        invalidateOutput in interface Inlet<K>
      • invalidateInput

        public void invalidateInput()
        Description copied from interface: Outlet
        Marks this Outlet—and all outputs that depend on the state of this Outlet—as having stale state.
        Specified by:
        invalidateInput in interface Outlet<K>
      • invalidate

        public void invalidate()
      • reconcileKey

        public void reconcileKey​(K key,
                                 int version)
      • reconcileOutput

        public void reconcileOutput​(int version)
        Description copied from interface: Inlet
        Reconciles the state of this Inlet, if the version of this Inlet's state differs from the target version. To reconcile its state, the Inlet first invokes Outlet.reconcileInput(int) on its input, to ensure that its input is up-to-date. It then invokes Streamlet.reconcile(int) on the Streamlet to which it's attached, causing the Streamlet to reconcile its own state.
        Specified by:
        reconcileOutput in interface Inlet<K>
      • reconcileInput

        public void reconcileInput​(int version)
        Description copied from interface: Outlet
        Reconciles the state of this Outlet, if the version of this Outlet's state differs from the target version. To reconcile its state, the Outlet first invokes Streamlet.reconcile(int) on the Streamlet to which it's attached. It then invokes Inlet.reconcileOutput(int) on each of its dependent outputs.
        Specified by:
        reconcileInput in interface Outlet<K>
      • reconcile

        public void reconcile​(int version)
      • willInvalidateKey

        protected void willInvalidateKey​(K key,
                                         KeyEffect effect)
      • onInvalidateKey

        protected void onInvalidateKey​(K key,
                                       KeyEffect effect)
      • didInvalidateKey

        protected void didInvalidateKey​(K key,
                                        KeyEffect effect)
      • willInvalidate

        protected void willInvalidate()
      • onInvalidate

        protected void onInvalidate()
      • didInvalidate

        protected void didInvalidate()
      • willReconcileKey

        protected void willReconcileKey​(K key,
                                        KeyEffect effect,
                                        int version)
      • onReconcileKey

        protected void onReconcileKey​(K key,
                                      KeyEffect effect,
                                      int version)
      • didReconcileKey

        protected void didReconcileKey​(K key,
                                       KeyEffect effect,
                                       int version)
      • willReconcile

        protected void willReconcile​(int version)
      • onReconcile

        protected void onReconcile​(int version)
      • didReconcile

        protected void didReconcile​(int version)