public interface SourceQueue<T>
Modifier and Type | Method and Description |
---|---|
scala.concurrent.Future<QueueOfferResult> |
offer(T elem)
Method offers next element to a stream and returns future that:
- completes with
Enqueued if element is consumed by a stream
- completes with Dropped when stream dropped offered element
- completes with QueueClosed when stream is completed during future is active
- completes with Failure(f) when failure to enqueue element from upstream
- fails when stream is completed or you cannot call offer in this moment because of implementation rules
(like for backpressure mode and full buffer you need to wait for last offer call Future completion) |
scala.concurrent.Future<Done> |
watchCompletion()
Method returns future that completes when stream is completed and fails when stream failed
|
scala.concurrent.Future<QueueOfferResult> offer(T elem)
Enqueued
if element is consumed by a stream
- completes with Dropped
when stream dropped offered element
- completes with QueueClosed
when stream is completed during future is active
- completes with Failure(f)
when failure to enqueue element from upstream
- fails when stream is completed or you cannot call offer in this moment because of implementation rules
(like for backpressure mode and full buffer you need to wait for last offer call Future completion)
elem
- element to send to a streamscala.concurrent.Future<Done> watchCompletion()