Class AbstractStreamlet<I,​O>

    • Constructor Detail

      • AbstractStreamlet

        public AbstractStreamlet​(StreamletScope<? extends O> scope)
      • AbstractStreamlet

        public AbstractStreamlet()
    • Method Detail

      • disconnectInputs

        public static <I,​O> void disconnectInputs​(Streamlet<I,​O> streamlet,
                                                        Class<?> streamletClass)
      • disconnectOutputs

        public static <I,​O> void disconnectOutputs​(Streamlet<I,​O> streamlet,
                                                         Class<?> streamletClass)
      • invalidateOutlets

        public static <I,​O> void invalidateOutlets​(Streamlet<I,​O> streamlet,
                                                         Class<?> streamletClass)
      • reconcileInlets

        public static <I,​O> void reconcileInlets​(int version,
                                                       Streamlet<I,​O> streamlet,
                                                       Class<?> streamletClass)
      • reconcileOutlets

        public static <I,​O> void reconcileOutlets​(int version,
                                                        Streamlet<I,​O> streamlet,
                                                        Class<?> streamletClass)
      • reflectInletCount

        public static <I,​O> int reflectInletCount​(Class<?> streamletClass)
      • reflectOutletCount

        public static <I,​O> int reflectOutletCount​(Class<?> streamletClass)
      • reflectInletKey

        public static <I,​O> Inlet<I> reflectInletKey​(String key,
                                                           Streamlet<I,​O> streamlet,
                                                           Class<?> streamletClass)
      • reflectOutletKey

        public static <I,​O> Outlet<O> reflectOutletKey​(String key,
                                                             Streamlet<I,​O> streamlet,
                                                             Class<?> streamletClass)
      • reflectInletField

        public static <I,​O> Inlet<I> reflectInletField​(Streamlet<I,​O> streamlet,
                                                             Field field)
      • reflectOutletField

        public static <I,​O> Outlet<O> reflectOutletField​(Streamlet<I,​O> streamlet,
                                                               Field field)
      • reflectInoutletField

        public static <I,​O> Inoutlet<I,​O> reflectInoutletField​(Streamlet<I,​O> streamlet,
                                                                           Field field)
      • inlet

        public Inlet<I> inlet​(String key)
        Description copied from interface: Streamlet
        Returns the Inlet to this Streamlet identified by the given key; returns null if this Streamlet has no such Inlet.
        Specified by:
        inlet in interface Streamlet<I,​O>
      • inlet

        protected <I2 extends IInlet<I2> inlet()
      • bindInput

        public void bindInput​(String key,
                              Outlet<? extends I> input)
        Description copied from interface: Streamlet
        Connects the Inlet of this Streamlet, identified by the given key, to the input from which the Inlet should acquire its state. Delegates to Inlet.bindInput(Outlet) on the identified Inlet.
        Specified by:
        bindInput in interface Streamlet<I,​O>
      • unbindInput

        public void unbindInput​(String key)
        Description copied from interface: Streamlet
        Disconnects the Inlet of this Streamlet, identified by the given key, from its input Outlet, if connected. Delegates to Inlet.unbindInput() on the identified Inlet.
        Specified by:
        unbindInput in interface Streamlet<I,​O>
      • outlet

        public Outlet<O> outlet​(String key)
        Description copied from interface: Streamlet
        Returns the Outlet of this Streamlet identified by the given key; returns null if this Streamlet has no such Outlet.
        Specified by:
        outlet in interface Streamlet<I,​O>
        Specified by:
        outlet in interface StreamletScope<I>
      • outlet

        protected <O2> Outlet<O2> outlet()
      • inoutlet

        protected <I2 extends I,​O2> Inoutlet<I2,​O2> inoutlet()
      • invalidate

        public void invalidate()
        Description copied from interface: Streamlet
        Marks this Streamlet—and all of its outlets—as having stale state. Invalidating a Streamlet will recursively invalidate all streamlets that transitively depend on the state of this Streamlet. Invalidating a Streamlet does not cause its state to be recomputed. A subsequent Streamlet.reconcile(int) call will reconcile the state of the Streamlet.
        Specified by:
        invalidate in interface Streamlet<I,​O>
      • reconcile

        public void reconcile​(int version)
        Description copied from interface: Streamlet
        Reconciles the state of this Streamlet, if the version of this Streamlet's state differs from the target version. To reconcile its state, the Streamlet first invokes Inlet.reconcileOutput(int) on each of its inlets, to ensure that its input states are up-to-date. It then recomputes its own state, in an implementation defined manner. Finally, it invokes Outlet.reconcileInput(int) on its outlets, causing all transitively dependent streamlets to reconcile their own state.
        Specified by:
        reconcile in interface Streamlet<I,​O>
      • getInput

        public <I2 extends I> I2 getInput​(Inlet<I2> inlet)
      • getInput

        public <I2 extends I> I2 getInput​(String key)
      • getInput

        public <I2 extends I> I2 getInput​(Inlet<I2> inlet,
                                          I2 orElse)
      • getInput

        public <I2 extends I> I2 getInput​(String key,
                                          I2 orElse)
      • getOutput

        public O getOutput​(String key)
      • disconnectInputs

        public void disconnectInputs()
        Description copied from interface: Streamlet
        Disconnects all Inlets dominated by this Streamlet in the dataflow dependency graph. Used to recursively clean up chains of combinators terminating at this Streamlet.
        Specified by:
        disconnectInputs in interface Streamlet<I,​O>
      • disconnectOutputs

        public void disconnectOutputs()
        Description copied from interface: Streamlet
        Disconnects all Inletss dominated by this Streamlet in the dataflow graph. Used to recursively clean up chains of combinators originating from this Streamlet.
        Specified by:
        disconnectOutputs in interface Streamlet<I,​O>
      • willInvalidate

        protected void willInvalidate()
      • onInvalidate

        protected void onInvalidate()
      • onInvalidateOutlets

        protected void onInvalidateOutlets()
      • didInvalidate

        protected void didInvalidate()
      • willReconcile

        protected void willReconcile​(int version)
      • onReconcileInlets

        protected void onReconcileInlets​(int version)
      • onReconcile

        protected void onReconcile​(int version)
      • onReconcileOutlets

        protected void onReconcileOutlets​(int version)
      • didReconcile

        protected void didReconcile​(int version)