Interface BlockingIterable.Processor<T>

    • Method Detail

      • next

        void next​(@Nullable
                  T nextItem)
           throws java.lang.Exception
        Emits the passed nextItem from the BlockingIterator when called.
        Parameters:
        nextItem - to emit from the BlockingIterator when called.
        Throws:
        java.lang.Exception - If the item could not be emitted.
      • fail

        void fail​(java.lang.Throwable cause)
           throws java.lang.Exception
        Terminates this BlockingIterable and all the current or future BlockingIterators with a failure.

        After this method returns, any subsequent calls to next(Object) MUST throw an Exception. All current and future BlockingIterators created by this BlockingIterable MUST eventually throw an Exception which is the same as passed cause or wraps the same.

        Parameters:
        cause - for the failure.
        Throws:
        java.lang.Exception - If this BlockingIterable can not be terminated with a failure.
      • close

        void close()
            throws java.lang.Exception
        Closes this BlockingIterable and all the current or future BlockingIterators.

        After this method returns, any subsequent calls to next(Object) MUST throw an Exception. All current and future BlockingIterators created by this BlockingIterable MUST eventually return false from the various hasNext methods.

        Specified by:
        close in interface java.lang.AutoCloseable
        Throws:
        java.lang.Exception - If closure failed.