Package org.apache.pekko.stream.javadsl
Interface SourceQueueWithComplete<T>
- All Superinterfaces:
SourceQueue<T>
This trait adds completion support to
SourceQueue.-
Method Summary
Modifier and TypeMethodDescriptionvoidcomplete()Completes the stream normally.voidCompletes the stream with a failure.Method returns aCompletionStagethat will be completed if this operator completes, or will be failed when the stream fails, for example whenSourceQueueWithComplete.failis invoked.Methods inherited from interface org.apache.pekko.stream.javadsl.SourceQueue
offer
-
Method Details
-
complete
void complete()Completes the stream normally. UsewatchCompletionto be notified of this operation’s success.Note that this only means the elements have been passed downstream, not that downstream has successfully processed them.
-
fail
Completes the stream with a failure. UsewatchCompletionto be notified of this operation’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 aCompletionStagethat will be completed if this operator completes, or will be failed when the stream fails, for example whenSourceQueueWithComplete.failis invoked.- Specified by:
watchCompletionin interfaceSourceQueue<T>
-