Interface SourceQueueWithComplete<T>

  • All Superinterfaces:
    SourceQueue<T>
    All Known Implementing Classes:
    SourceQueueAdapter

    public interface SourceQueueWithComplete<T>
    extends SourceQueue<T>
    Complete the stream normally. Use watchCompletion to be notified of this operation&rsquo;s success.

    Note that this only means the elements have been passed downstream, not that downstream has successfully processed them.

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void complete()
      Complete the stream normally.
      void fail​(java.lang.Throwable ex)
      Complete the stream with a failure.
      java.util.concurrent.CompletionStage<Done> watchCompletion()
      Method returns a CompletionStage that will be completed if this operator completes, or will be failed when the stream fails, for example when SourceQueueWithComplete.fail is invoked.
    • Method Detail

      • complete

        void complete()
        Complete the stream normally. Use watchCompletion to be notified of this operation&rsquo;s success.

        Note that this only means the elements have been passed downstream, not that downstream has successfully processed them.

      • fail

        void fail​(java.lang.Throwable ex)
        Complete the stream with a failure. Use watchCompletion to be notified of this operation&rsquo;s success.

        Note that this only means the elements have been passed downstream, not that downstream has successfully processed them.

        Parameters:
        ex - (undocumented)
      • watchCompletion

        java.util.concurrent.CompletionStage<Done> watchCompletion()
        Method returns a CompletionStage that will be completed if this operator completes, or will be failed when the stream fails, for example when SourceQueueWithComplete.fail is invoked.
        Specified by:
        watchCompletion in interface SourceQueue<T>
        Returns:
        (undocumented)