T- the value type transmitted through the queue
public interface QueueDisposable<T> extends QueueFuseable<T>, Disposable
Disposableand allows negotiating the fusion mode between subsequent operators of the
Observablebase reactive type.
The negotiation happens in subscription time when the upstream
onSubscribe with an instance of this interface. The
downstream has then the obligation to call
with the appropriate mode before calling
In synchronous fusion, all upstream values are either already available or is generated
SimpleQueue.poll() is called synchronously. When the
that is the indication if a terminated stream. In this mode, the upstream won't call the onXXX methods.
In asynchronous fusion, upstream values may become available to
onComplete() as usual, however,
onNext will be called with
null instead of the actual value.
Downstream should treat such onNext as indication that
SimpleQueue.poll() can be called.
The general rules for consuming the
SimpleQueue.clear()has to be called sequentially (from within a serializing drain-loop).
SimpleQueue.poll()should be prepared to catch exceptions.
nulleven if a preceding
clear, isEmpty, offer, offer, poll