Class AbstractInoutlet<I,​O>

    • Method Summary

      Modifier and Type Method Description
      void bindInput​(Outlet<? extends I> input)
      Connects this Inlet to an Outlet from which it will acquire its state.
      void bindOutput​(Inlet<? super O> output)
      Adds an output to the set of Inlets that depend on the state of this Outlet.
      protected void didInvalidate()  
      protected void didReconcile​(int version)  
      void disconnectInputs()
      Disconnects all Inlets dominated by this Inoutlet in the dataflow dependency graph.
      void disconnectOutputs()
      Disconnects all Inletss dominated by this Inoutlet in the dataflow graph.
      abstract O get()
      Returns the current state of this Outlet.
      Outlet<? extends I> input()
      Returns the Outlet from which this Inlet acquires its state; returns null if this Inlet is disconnected.
      void invalidate()  
      void invalidateInput()
      Marks this Outlet—and all outputs that depend on the state of this Outlet—as having stale state.
      void invalidateOutput()
      Marks this Inlet—and the Streamlet to which this Inlet is attached—as having stale state.
      protected void onInvalidate()  
      protected void onReconcile​(int version)  
      Iterator<Inlet<? super O>> outputIterator()
      Returns an Iterator over the set of Inlets that depend on the state of this Outlet.
      void reconcile​(int version)  
      void reconcileInput​(int version)
      Reconciles the state of this Outlet, if the version of this Outlet's state differs from the target version.
      void reconcileOutput​(int version)
      Reconciles the state of this Inlet, if the version of this Inlet's state differs from the target version.
      void unbindInput()
      Disconnects this Inlet from its input Outlet, if connected.
      void unbindOutput​(Inlet<? super O> output)
      Removes an output from the set of Inlets that depend on the state of this Outlet.
      void unbindOutputs()
      Disconnects all outputs from this Outlet by invoking Inlet.unbindInput() on each Inelt that depends on the state of this Outlet.
      protected void willInvalidate()  
      protected void willReconcile​(int version)  
    • Field Detail

      • input

        protected Outlet<? extends I> input
      • outputs

        protected Inlet<? super O>[] outputs
      • version

        protected int version
    • Constructor Detail

      • AbstractInoutlet

        public AbstractInoutlet()
    • Method Detail

      • get

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

        public Outlet<? 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<I>
      • 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<I>
      • 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<I>
      • 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<I>
        Specified by:
        disconnectInputs in interface Inoutlet<I,​O>
        Specified by:
        disconnectInputs in interface Outlet<I>
      • 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<I>
      • 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<I>
      • 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<I>
      • 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<I>
      • 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<I>
        Specified by:
        disconnectOutputs in interface Inoutlet<I,​O>
        Specified by:
        disconnectOutputs in interface Outlet<I>
      • 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<I>
      • 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<I>
      • invalidate

        public void invalidate()
      • 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<I>
      • 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<I>
      • reconcile

        public void reconcile​(int version)
      • willInvalidate

        protected void willInvalidate()
      • onInvalidate

        protected void onInvalidate()
      • didInvalidate

        protected void didInvalidate()
      • willReconcile

        protected void willReconcile​(int version)
      • onReconcile

        protected void onReconcile​(int version)
      • didReconcile

        protected void didReconcile​(int version)