trait SourceQueue[T] extends AnyRef
- Alphabetic
- By Inheritance
- SourceQueue
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def offer(elem: T): [QueueOfferResult]
Offers an element to a stream and returns a Future that: - completes with
Enqueued
if the element is consumed by a stream - completes withDropped
when the stream dropped the offered element - completes withQueueClosed
when the stream is completed whilst the Future is active - completes withFailure(f)
in case of failure to enqueue element from upstream - fails when stream is already completedOffers an element to a stream and returns a Future that: - completes with
Enqueued
if the element is consumed by a stream - completes withDropped
when the stream dropped the offered element - completes withQueueClosed
when the stream is completed whilst the Future is active - completes withFailure(f)
in case of failure to enqueue element from upstream - fails when stream is already completedAdditionally when using the backpressure overflowStrategy: - If the buffer is full the Future won't be completed until there is space in the buffer - Calling offer before the Future is completed, in this case it will return a failed Future
- elem
element to send to a stream
- abstract def watchCompletion(): [Done]
Returns a Future that will be completed if this operator completes, or will be failed when the operator faces an internal failure.
Returns a Future that will be completed if this operator completes, or will be failed when the operator faces an internal failure.
Note that this only means the elements have been passed downstream, not that downstream has successfully processed them.
This trait allows to have a queue as a data source for some stream.