Package org.apache.pekko.stream.scaladsl
Interface SourceQueueWithComplete<T>
-
- All Superinterfaces:
SourceQueue<T>
public interface SourceQueueWithComplete<T> extends SourceQueue<T>
This trait adds completion support toSourceQueue
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
SourceQueueWithComplete.QueueOps<T>
static class
SourceQueueWithComplete.QueueOps$
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
complete()
Completes the stream normally.void
fail(java.lang.Throwable ex)
Completes the stream with a failure.scala.concurrent.Future<Done>
watchCompletion()
Method returns aFuture
that will be completed if this operator completes, or will be failed when the stream fails, for example whenSourceQueueWithComplete.fail
is invoked.-
Methods inherited from interface org.apache.pekko.stream.scaladsl.SourceQueue
offer
-
-
-
-
Method Detail
-
complete
void complete()
Completes the stream normally. UsewatchCompletion
to 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
void fail(java.lang.Throwable ex)
Completes the stream with a failure. UsewatchCompletion
to be notified of this operation’s success.
-
watchCompletion
scala.concurrent.Future<Done> watchCompletion()
Method returns aFuture
that will be completed if this operator completes, or will be failed when the stream fails, for example whenSourceQueueWithComplete.fail
is invoked.Note that this only means the elements have been passed downstream, not that downstream has successfully processed them.
- Specified by:
watchCompletion
in interfaceSourceQueue<T>
-
-