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)
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)
element to send to a stream
Method returns a CompletionStage that will be completed if the stream completes, or will be failed when the stage faces an internal failure.
This trait allows to have the queue as a data source for some stream.