Top Description Fields Methods
io.reactivex.internal.fuseable

public Interface QueueSubscription<T>

extends QueueFuseable<T>, Subscription
Known Direct Implementers
io.reactivex.internal.operators.flowable.FlowableIgnoreElements.IgnoreElementsSubscriber, io.reactivex.internal.subscribers.BasicFuseableConditionalSubscriber, io.reactivex.internal.subscribers.BasicFuseableSubscriber, io.reactivex.internal.subscriptions.BasicIntQueueSubscription, io.reactivex.internal.subscriptions.BasicQueueSubscription, io.reactivex.internal.subscriptions.EmptySubscription, io.reactivex.internal.subscriptions.ScalarSubscription
Type Parameters
<T>
the value type transmitted through the queue
Imports
java.util.Queue, org.reactivestreams.Subscription

An interface extending Queue and Subscription and allows negotiating the fusion mode between subsequent operators of the Flowable base reactive type.

The negotiation happens in subscription time when the upstream calls the onSubscribe with an instance of this interface. The downstream has then the obligation to call requestFusion(int) with the appropriate mode before calling request().

In synchronous fusion, all upstream values are either already available or is generated when poll() is called synchronously. When the poll() returns null, that is the indication if a terminated stream. Downstream should not call request(long) in this mode. In this mode, the upstream won't call the onXXX methods.

In asynchronous fusion, upstream values may become available to poll() eventually. Upstream signals onError() and onComplete() as usual but onNext may not actually contain the upstream value but have null instead. Downstream should treat such onNext as indication that poll() can be called. In this mode, the downstream still has to call request(long) to indicate it is prepared to receive more values.

The general rules for consuming the Queue interface:

Implementations should only allow calling the following methods and the rest of the Queue interface methods should throw UnsupportedOperationException:

Field Summary

Inherited from io.reactivex.internal.fuseable.QueueFuseable:
ANYASYNCBOUNDARYNONESYNC

Method Summary

Inherited from io.reactivex.internal.fuseable.QueueFuseable:
requestFusion
Inherited from org.reactivestreams.Subscription:
cancelrequest