Interface QueueFuseable<T>
-
- Type Parameters:
T
- the value type returned by the SimpleQueue.poll()
- All Superinterfaces:
SimpleQueue<T>
- All Known Subinterfaces:
QueueDisposable<T>
,QueueSubscription<T>
- All Known Implementing Classes:
AbstractEmptyQueueFuseable
,AsyncProcessor.AsyncSubscription
,AsyncSubject.AsyncDisposable
,BasicFuseableConditionalSubscriber
,BasicFuseableObserver
,BasicFuseableSubscriber
,BasicIntQueueDisposable
,BasicIntQueueSubscription
,BasicQueueDisposable
,BasicQueueSubscription
,CancellableQueueFuseable
,DeferredScalarDisposable
,DeferredScalarObserver
,DeferredScalarSubscriber
,DeferredScalarSubscription
,EmptyDisposable
,EmptySubscription
,FlowableAll.AllSubscriber
,FlowableAny.AnySubscriber
,FlowableCollect.CollectSubscriber
,FlowableCollectWithCollector.CollectorSubscriber
,FlowableCombineLatest.CombineLatestCoordinator
,FlowableCount.CountSubscriber
,FlowableDistinct.DistinctSubscriber
,FlowableDistinctUntilChanged.DistinctUntilChangedConditionalSubscriber
,FlowableDistinctUntilChanged.DistinctUntilChangedSubscriber
,FlowableDoAfterNext.DoAfterConditionalSubscriber
,FlowableDoAfterNext.DoAfterSubscriber
,FlowableDoFinally.DoFinallyConditionalSubscriber
,FlowableDoFinally.DoFinallySubscriber
,FlowableDoOnEach.DoOnEachConditionalSubscriber
,FlowableDoOnEach.DoOnEachSubscriber
,FlowableElementAt.ElementAtSubscriber
,FlowableFilter.FilterConditionalSubscriber
,FlowableFilter.FilterSubscriber
,FlowableFlatMapCompletable.FlatMapCompletableMainSubscriber
,FlowableFlattenIterable.FlattenIterableSubscriber
,FlowableFromArray.ArrayConditionalSubscription
,FlowableFromArray.ArraySubscription
,FlowableFromArray.BaseArraySubscription
,FlowableFromCompletable.FromCompletableObserver
,FlowableFromCompletionStage.CompletionStageHandler
,FlowableFromIterable.BaseRangeSubscription
,FlowableFromIterable.IteratorConditionalSubscription
,FlowableFromIterable.IteratorSubscription
,FlowableFromStream.AbstractStreamSubscription
,FlowableFromStream.StreamConditionalSubscription
,FlowableFromStream.StreamSubscription
,FlowableGroupBy.State
,FlowableIgnoreElements.IgnoreElementsSubscriber
,FlowableMap.MapConditionalSubscriber
,FlowableMap.MapSubscriber
,FlowableMapOptional.MapOptionalConditionalSubscriber
,FlowableMapOptional.MapOptionalSubscriber
,FlowableObserveOn.BaseObserveOnSubscriber
,FlowableObserveOn.ObserveOnConditionalSubscriber
,FlowableObserveOn.ObserveOnSubscriber
,FlowableOnBackpressureBuffer.BackpressureBufferSubscriber
,FlowableRange.BaseRangeSubscription
,FlowableRange.RangeConditionalSubscription
,FlowableRange.RangeSubscription
,FlowableRangeLong.BaseRangeSubscription
,FlowableRangeLong.RangeConditionalSubscription
,FlowableRangeLong.RangeSubscription
,FlowableReduce.ReduceSubscriber
,FlowableSequenceEqual.EqualCoordinator
,FlowableSingle.SingleElementSubscriber
,FlowableTakeLastOne.TakeLastOneSubscriber
,FlowableToList.ToListSubscriber
,MaybeFlatMapIterableFlowable.FlatMapIterableObserver
,MaybeFlatMapIterableObservable.FlatMapIterableObserver
,MaybeFlattenStreamAsFlowable.FlattenStreamMultiObserver
,MaybeFlattenStreamAsObservable.FlattenStreamMultiObserver
,MaybeMergeArray.MergeMaybeObserver
,MaybeToFlowable.MaybeToFlowableSubscriber
,MaybeToObservable.MaybeToObservableObserver
,ObservableCollectWithCollector.CollectorObserver
,ObservableDistinct.DistinctObserver
,ObservableDistinctUntilChanged.DistinctUntilChangedObserver
,ObservableDoAfterNext.DoAfterObserver
,ObservableDoFinally.DoFinallyObserver
,ObservableFilter.FilterObserver
,ObservableFlatMapCompletable.FlatMapCompletableMainObserver
,ObservableFromArray.FromArrayDisposable
,ObservableFromCompletable.FromCompletableObserver
,ObservableFromCompletionStage.CompletionStageHandler
,ObservableFromIterable.FromIterableDisposable
,ObservableFromStream.StreamDisposable
,ObservableMap.MapObserver
,ObservableMapOptional.MapOptionalObserver
,ObservableObserveOn.ObserveOnObserver
,ObservableRange.RangeDisposable
,ObservableRangeLong.RangeDisposable
,ObservableScalarXMap.ScalarDisposable
,ParallelCollect.ParallelCollectSubscriber
,ParallelCollector.ParallelCollectorSubscriber
,ParallelReduce.ParallelReduceSubscriber
,ParallelReduceFull.ParallelReduceFullMainSubscriber
,ScalarSubscription
,SingleFlatMapIterableFlowable.FlatMapIterableObserver
,SingleFlatMapIterableObservable.FlatMapIterableObserver
,SingleToFlowable.SingleToFlowableObserver
,SingleToObservable.SingleToObservableObserver
,UnicastProcessor.UnicastQueueSubscription
,UnicastSubject.UnicastQueueDisposable
public interface QueueFuseable<@NonNull T> extends SimpleQueue<T>
Represents aSimpleQueue
plus the means and constants for requesting a fusion mode.- Since:
- 3.1.1
-
-
Field Summary
Fields Modifier and Type Field Description static int
ANY
static int
ASYNC
Request an asynchronous fusion mode and can be returned byrequestFusion(int)
for an accepted mode.static int
BOUNDARY
Used in binary or combination with the other constants as an input torequestFusion(int)
indicating that theSimpleQueue.poll()
will be called behind an asynchronous boundary and thus may change the non-trivial computation locations attached to theSimpleQueue.poll()
chain of fused operators.static int
NONE
Returned by therequestFusion(int)
if the upstream doesn't support the requested mode.static int
SYNC
Request a synchronous fusion mode and can be returned byrequestFusion(int)
for an accepted mode.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
requestFusion(int mode)
Request a fusion mode from the upstream.
-
-
-
Field Detail
-
NONE
static final int NONE
Returned by therequestFusion(int)
if the upstream doesn't support the requested mode.- See Also:
- Constant Field Values
-
SYNC
static final int SYNC
Request a synchronous fusion mode and can be returned byrequestFusion(int)
for an accepted mode.In synchronous fusion, all upstream values are either already available or is generated when
SimpleQueue.poll()
is called synchronously. When theSimpleQueue.poll()
returns null, that is the indication if a terminated stream. In this mode, the upstream won't call the onXXX methods and callers ofSimpleQueue.poll()
should be prepared to catch exceptions. Note thatSimpleQueue.poll()
has to be called sequentially (from within a serializing drain-loop).- See Also:
- Constant Field Values
-
ASYNC
static final int ASYNC
Request an asynchronous fusion mode and can be returned byrequestFusion(int)
for an accepted mode.In asynchronous fusion, upstream values may become available to
SimpleQueue.poll()
eventually. Upstream signals onError() and onComplete() as usual but onNext may not actually contain the upstream value but havenull
instead. Downstream should treat such onNext as indication thatSimpleQueue.poll()
can be called. Note thatSimpleQueue.poll()
has to be called sequentially (from within a serializing drain-loop). In addition, callers ofSimpleQueue.poll()
should be prepared to catch exceptions.- See Also:
- Constant Field Values
-
ANY
static final int ANY
- See Also:
- Constant Field Values
-
BOUNDARY
static final int BOUNDARY
Used in binary or combination with the other constants as an input torequestFusion(int)
indicating that theSimpleQueue.poll()
will be called behind an asynchronous boundary and thus may change the non-trivial computation locations attached to theSimpleQueue.poll()
chain of fused operators.For example, fusing map() and observeOn() may move the computation of the map's function over to the thread run after the observeOn(), which is generally unexpected.
- See Also:
- Constant Field Values
-
-