Interface BlockingStream<E>

  • Type Parameters:
    E - The type of the elements, usually a TransferableBlock

    public interface BlockingStream<E>
    An interface that represents an abstract blocking stream of elements that can be consumed. These streams are designed to be consumed by a single thread and do not support null elements.
    • Method Detail

      • getId

        Object getId()
        The id of the stream. Mostly used for logging. Implementations of this method must be thread safe.
      • get

        E get()
        Returns the next element on the stream, blocking if there is no element ready.
      • cancel

        void cancel()
        Cancels the stream. This method can be called by any thread.