Interface SourceQueueWithComplete<T>

All Superinterfaces:
SourceQueue<T>

public interface SourceQueueWithComplete<T> extends SourceQueue<T>
This trait adds completion support to SourceQueue.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Completes the stream normally.
    void
    Completes the stream with a failure.
    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.

    Methods inherited from interface org.apache.pekko.stream.javadsl.SourceQueue

    offer
  • Method Details

    • complete

      void complete()
      Completes 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(Throwable ex)
      Completes 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.

    • watchCompletion

      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>