Top Description Inners Fields Constructors Methods
io.reactivex.rxjava3.internal.operators.mixed

public final Class FlowableConcatMapSingle<T, R>

extends Flowable<R>
Class Inheritance
Type Parameters
<T>
the upstream element type
<R>
the output element type
Imports
java.util.Objects, java.util.concurrent.atomic.*, org.reactivestreams.*, io.reactivex.rxjava3.core.*, io.reactivex.rxjava3.disposables.Disposable, io.reactivex.rxjava3.exceptions.Exceptions, io.reactivex.rxjava3.functions.Function, io.reactivex.rxjava3.internal.disposables.DisposableHelper, io.reactivex.rxjava3.internal.util.*, io.reactivex.rxjava3.operators.SimpleQueue

Maps each upstream item into a SingleSource, subscribes to them one after the other terminates and relays their success values, optionally delaying any errors till the main and inner sources terminate.

History: 2.1.11 - experimental

Since
2.2

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class

Field Summary

Modifier and TypeField and Description
pack-priv final ErrorMode
pack-priv final Function<? super T, ? extends SingleSource<? extends R>>
pack-priv final int
pack-priv final Flowable<T>

Constructor Summary

AccessConstructor and Description
public
FlowableConcatMapSingle(Flowable<T> source, Function<? super T, ? extends SingleSource<? extends R>> mapper, ErrorMode errorMode, int prefetch)

Method Summary

Modifier and TypeMethod and Description
protected void
Inherited from io.reactivex.rxjava3.core.Flowable:
allambambArrayambWithanyblockingFirstblockingFirstblockingForEachblockingForEachblockingIterableblockingIterableblockingLastblockingLastblockingLatestblockingMostRecentblockingNextblockingSingleblockingSingleblockingStreamblockingStreamblockingSubscribeblockingSubscribeblockingSubscribeblockingSubscribeblockingSubscribeblockingSubscribeblockingSubscribeblockingSubscribebufferbufferbufferbufferbufferbufferbufferbufferbufferbufferbufferbufferbufferbufferbufferbufferbufferbufferSizecachecacheWithInitialCapacitycastcollectcollectcollectIntocombineLatestcombineLatestcombineLatestcombineLatestcombineLatestcombineLatestcombineLatestcombineLatestcombineLatestcombineLatestcombineLatestArraycombineLatestArraycombineLatestArrayDelayErrorcombineLatestArrayDelayErrorcombineLatestDelayErrorcombineLatestDelayErrorcomposeconcatconcatconcatconcatconcatconcatconcatArrayconcatArrayDelayErrorconcatArrayEagerconcatArrayEagerconcatArrayEagerDelayErrorconcatArrayEagerDelayErrorconcatDelayErrorconcatDelayErrorconcatDelayErrorconcatEagerconcatEagerconcatEagerconcatEagerconcatEagerDelayErrorconcatEagerDelayErrorconcatEagerDelayErrorconcatEagerDelayErrorconcatMapconcatMapconcatMapconcatMapCompletableconcatMapCompletableconcatMapCompletableDelayErrorconcatMapCompletableDelayErrorconcatMapCompletableDelayErrorconcatMapDelayErrorconcatMapDelayErrorconcatMapDelayErrorconcatMapEagerconcatMapEagerconcatMapEagerDelayErrorconcatMapEagerDelayErrorconcatMapIterableconcatMapIterableconcatMapMaybeconcatMapMaybeconcatMapMaybeDelayErrorconcatMapMaybeDelayErrorconcatMapMaybeDelayErrorconcatMapSingleconcatMapSingleconcatMapSingleDelayErrorconcatMapSingleDelayErrorconcatMapSingleDelayErrorconcatMapStreamconcatMapStreamconcatWithconcatWithconcatWithconcatWithcontainscountcreatedebouncedebouncedebouncedebouncedefaultIfEmptydeferdelaydelaydelaydelaydelaydelaydelaySubscriptiondelaySubscriptiondelaySubscriptiondematerializedistinctdistinctdistinctdistinctUntilChangeddistinctUntilChangeddistinctUntilChangeddoAfterNextdoAfterTerminatedoFinallydoOnCanceldoOnCompletedoOnEachdoOnEachdoOnErrordoOnLifecycledoOnNextdoOnRequestdoOnSubscribedoOnTerminateelementAtelementAtelementAtOrErroremptyerrorerrorfilterfirstfirstElementfirstOrErrorfirstOrErrorStagefirstStageflatMapflatMapflatMapflatMapflatMapflatMapflatMapflatMapflatMapflatMapflatMapflatMapflatMapCompletableflatMapCompletableflatMapIterableflatMapIterableflatMapIterableflatMapIterableflatMapMaybeflatMapMaybeflatMapSingleflatMapSingleflatMapStreamflatMapStreamforEachforEachWhileforEachWhileforEachWhilefromActionfromArrayfromCallablefromCompletablefromCompletionStagefromFuturefromFuturefromIterablefromMaybefromObservablefromOptionalfromPublisherfromRunnablefromSinglefromStreamfromSuppliergenerategenerategenerategenerategenerategroupBygroupBygroupBygroupBygroupBygroupBygroupJoinhideignoreElementsintervalintervalintervalintervalintervalRangeintervalRangeisEmptyjoinjustjustjustjustjustjustjustjustjustjustlastlastElementlastOrErrorlastOrErrorStagelastStageliftmapmapOptionalmaterializemergemergemergemergemergemergemergemergemergeArraymergeArraymergeArrayDelayErrormergeArrayDelayErrormergeDelayErrormergeDelayErrormergeDelayErrormergeDelayErrormergeDelayErrormergeDelayErrormergeDelayErrormergeDelayErrormergeWithmergeWithmergeWithmergeWithneverobserveOnobserveOnobserveOnofTypeonBackpressureBufferonBackpressureBufferonBackpressureBufferonBackpressureBufferonBackpressureBufferonBackpressureBufferonBackpressureBufferonBackpressureBufferonBackpressureBufferonBackpressureBufferonBackpressureDroponBackpressureDroponBackpressureLatestonBackpressureLatestonBackpressureReduceonBackpressureReduceonErrorCompleteonErrorCompleteonErrorResumeNextonErrorResumeWithonErrorReturnonErrorReturnItemonTerminateDetachparallelparallelparallelpublishpublishpublishpublishrangerangeLongrebatchRequestsreducereducereduceWithrepeatrepeatrepeatUntilrepeatWhenreplayreplayreplayreplayreplayreplayreplayreplayreplayreplayreplayreplayreplayreplayreplayreplayreplayreplayretryretryretryretryretryretryUntilretryWhensafeSubscribesamplesamplesamplesamplesamplesamplesamplescanscanscanWithsequenceEqualsequenceEqualsequenceEqualsequenceEqualserializesharesinglesingleElementsingleOrErrorsingleOrErrorStagesingleStageskipskipskipskipLastskipLastskipLastskipLastskipLastskipLastskipUntilskipWhilesortedsortedstartWithstartWithstartWithstartWithstartWithArraystartWithItemstartWithIterablesubscribesubscribesubscribesubscribesubscribesubscribesubscribesubscribeActualsubscribeOnsubscribeOnsubscribeWithswitchIfEmptyswitchMapswitchMapswitchMapCompletableswitchMapCompletableDelayErrorswitchMapDelayErrorswitchMapDelayErrorswitchMapMaybeswitchMapMaybeDelayErrorswitchMapSingleswitchMapSingleDelayErrorswitchOnNextswitchOnNextswitchOnNextDelayErrorswitchOnNextDelayErrortaketaketaketakeLasttakeLasttakeLasttakeLasttakeLasttakeLasttakeLasttakeLasttakeLasttakeUntiltakeUntiltakeWhiletesttesttestthrottleFirstthrottleFirstthrottleFirstthrottleLastthrottleLastthrottleLastthrottleLatestthrottleLatestthrottleLatestthrottleLatestthrottleLatestthrottleWithTimeoutthrottleWithTimeoutthrottleWithTimeouttimeIntervaltimeIntervaltimeIntervaltimeIntervaltimeouttimeouttimeouttimeouttimeouttimeouttimeouttimeouttimertimertimestamptimestamptimestamptimestamptotoFuturetoListtoListtoListtoMaptoMaptoMaptoMultimaptoMultimaptoMultimaptoMultimaptoObservabletoSortedListtoSortedListtoSortedListtoSortedListunsafeCreateunsubscribeOnusingusingwindowwindowwindowwindowwindowwindowwindowwindowwindowwindowwindowwindowwindowwindowwindowwindowwindowwithLatestFromwithLatestFromwithLatestFromwithLatestFromwithLatestFromwithLatestFromzipzipzipzipzipzipzipzipzipzipzipzipzipArrayzipWithzipWithzipWithzipWith

Field Detail

errorModeback to summary
pack-priv final ErrorMode errorMode
mapperback to summary
pack-priv final Function<? super T, ? extends SingleSource<? extends R>> mapper
prefetchback to summary
pack-priv final int prefetch
sourceback to summary
pack-priv final Flowable<T> source

Constructor Detail

FlowableConcatMapSingleback to summary
public FlowableConcatMapSingle(Flowable<T> source, Function<? super T, ? extends SingleSource<? extends R>> mapper, ErrorMode errorMode, int prefetch)

Method Detail

subscribeActualback to summary
protected void subscribeActual(Subscriber<? super R> s)
Annotations
@Override
io.reactivex.rxjava3.internal.operators.mixed back to summary

pack-priv final Class FlowableConcatMapSingle.ConcatMapSingleSubscriber<T, R>

extends ConcatMapXMainSubscriber<T>
implements Subscription
Class Inheritance
All Implemented Interfaces
org.reactivestreams.Subscription

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class

Field Summary

Modifier and TypeField and Description
pack-priv int
pack-priv final Subscriber<? super R>
pack-priv long
pack-priv final FlowableConcatMapSingle.ConcatMapSingleSubscriber.ConcatMapSingleObserver<R>
pack-priv R
pack-priv final Function<? super T, ? extends SingleSource<? extends R>>
pack-priv final AtomicLong
private static final long
pack-priv volatile int
pack-priv static final int
STATE_ACTIVE

An inner SingleSource is running but there are no results yet.

pack-priv static final int
STATE_INACTIVE

No inner SingleSource is running.

pack-priv static final int
STATE_RESULT_VALUE

The inner SingleSource succeeded with a value in item.

Inherited from io.reactivex.rxjava3.internal.operators.mixed.ConcatMapXMainSubscriber:
cancelleddoneerrorModeerrorsprefetchqueuesyncFusedupstream

Constructor Summary

AccessConstructor and Description
pack-priv
ConcatMapSingleSubscriber(Subscriber<? super R> downstream, Function<? super T, ? extends SingleSource<? extends R>> mapper, int prefetch, ErrorMode errorMode)

Method Summary

Modifier and TypeMethod and Description
public void
cancel()

Implements org.reactivestreams.Subscription.cancel.

Request the Publisher to stop sending data and clean up resources.
pack-priv void
clearValue()

Overrides io.reactivex.rxjava3.internal.operators.mixed.ConcatMapXMainSubscriber.clearValue.

Override this to clear values when the downstream disposes.
pack-priv void
disposeInner()

Implements abstract io.reactivex.rxjava3.internal.operators.mixed.ConcatMapXMainSubscriber.disposeInner.

Typically, this should be inner.dispose().
pack-priv void
drain()

Implements abstract io.reactivex.rxjava3.internal.operators.mixed.ConcatMapXMainSubscriber.drain.

Implement the serialized inner subscribing and value emission here.
pack-priv void
pack-priv void
innerSuccess(R item)

pack-priv void
onSubscribeDownstream()

Implements abstract io.reactivex.rxjava3.internal.operators.mixed.ConcatMapXMainSubscriber.onSubscribeDownstream.

Typically, this should be downstream.onSubscribe(this);.
public void
request(long
the strictly positive number of elements to requests to the upstream Publisher
n
)

Implements org.reactivestreams.Subscription.request.

No events will be sent by a Publisher until demand is signaled via this method.
Inherited from io.reactivex.rxjava3.internal.operators.mixed.ConcatMapXMainSubscriber:
onCompleteonErroronNextonSubscribestop

Field Detail

consumedback to summary
pack-priv int consumed
downstreamback to summary
pack-priv final Subscriber<? super R> downstream
emittedback to summary
pack-priv long emitted
innerback to summary
pack-priv final FlowableConcatMapSingle.ConcatMapSingleSubscriber.ConcatMapSingleObserver<R> inner
itemback to summary
pack-priv R item
mapperback to summary
pack-priv final Function<? super T, ? extends SingleSource<? extends R>> mapper
requestedback to summary
pack-priv final AtomicLong requested
serialVersionUIDback to summary
private static final long serialVersionUID

Hides io.reactivex.rxjava3.internal.operators.mixed.ConcatMapXMainSubscriber.serialVersionUID.

stateback to summary
pack-priv volatile int state
STATE_ACTIVEback to summary
pack-priv static final int STATE_ACTIVE

An inner SingleSource is running but there are no results yet.

STATE_INACTIVEback to summary
pack-priv static final int STATE_INACTIVE

No inner SingleSource is running.

STATE_RESULT_VALUEback to summary
pack-priv static final int STATE_RESULT_VALUE

The inner SingleSource succeeded with a value in item.

Constructor Detail

ConcatMapSingleSubscriberback to summary
pack-priv ConcatMapSingleSubscriber(Subscriber<? super R> downstream, Function<? super T, ? extends SingleSource<? extends R>> mapper, int prefetch, ErrorMode errorMode)

Method Detail

cancelback to summary
public void cancel()

Implements org.reactivestreams.Subscription.cancel.

Doc from org.reactivestreams.Subscription.cancel.

Request the Publisher to stop sending data and clean up resources.

Data may still be sent to meet previously signalled demand after calling cancel.

Annotations
@Override
clearValueback to summary
pack-priv void clearValue()

Overrides io.reactivex.rxjava3.internal.operators.mixed.ConcatMapXMainSubscriber.clearValue.

Doc from io.reactivex.rxjava3.internal.operators.mixed.ConcatMapXMainSubscriber.clearValue.

Override this to clear values when the downstream disposes.

Annotations
@Override
disposeInnerback to summary
pack-priv void disposeInner()

Implements abstract io.reactivex.rxjava3.internal.operators.mixed.ConcatMapXMainSubscriber.disposeInner.

Doc from io.reactivex.rxjava3.internal.operators.mixed.ConcatMapXMainSubscriber.disposeInner.

Typically, this should be inner.dispose().

Annotations
@Override
drainback to summary
pack-priv void drain()

Implements abstract io.reactivex.rxjava3.internal.operators.mixed.ConcatMapXMainSubscriber.drain.

Doc from io.reactivex.rxjava3.internal.operators.mixed.ConcatMapXMainSubscriber.drain.

Implement the serialized inner subscribing and value emission here.

Annotations
@Override
innerErrorback to summary
pack-priv void innerError(Throwable ex)
innerSuccessback to summary
pack-priv void innerSuccess(R item)
onSubscribeDownstreamback to summary
pack-priv void onSubscribeDownstream()

Implements abstract io.reactivex.rxjava3.internal.operators.mixed.ConcatMapXMainSubscriber.onSubscribeDownstream.

Doc from io.reactivex.rxjava3.internal.operators.mixed.ConcatMapXMainSubscriber.onSubscribeDownstream.

Typically, this should be downstream.onSubscribe(this);.

Annotations
@Override
requestback to summary
public void request(long n)

Implements org.reactivestreams.Subscription.request.

Doc from org.reactivestreams.Subscription.request.

No events will be sent by a Publisher until demand is signaled via this method.

It can be called however often and whenever needed—but if the outstanding cumulative demand ever becomes Long.MAX_VALUE or more, it may be treated by the Publisher as "effectively unbounded".

Whatever has been requested can be sent by the Publisher so only signal demand for what can be safely handled.

A Publisher can send less than is requested if the stream ends but then must emit either Subscriber#onError(Throwable) or Subscriber#onComplete().

Parameters
n:long

the strictly positive number of elements to requests to the upstream Publisher

Annotations
@Override
io.reactivex.rxjava3.internal.operators.mixed back to summary

pack-priv final Class FlowableConcatMapSingle.ConcatMapSingleSubscriber.ConcatMapSingleObserver<R>

extends AtomicReference<Disposable>
implements SingleObserver<R>
Class Inheritance
All Implemented Interfaces
io.reactivex.rxjava3.core.SingleObserver

Field Summary

Modifier and TypeField and Description
pack-priv final FlowableConcatMapSingle.ConcatMapSingleSubscriber<?, R>
private static final long

Constructor Summary

AccessConstructor and Description
pack-priv

Field Detail

parentback to summary
pack-priv final FlowableConcatMapSingle.ConcatMapSingleSubscriber<?, R> parent
serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.util.concurrent.atomic.AtomicReference.serialVersionUID.

Constructor Detail

ConcatMapSingleObserverback to summary
pack-priv ConcatMapSingleObserver(FlowableConcatMapSingle.ConcatMapSingleSubscriber<?, R> parent)

Method Detail

disposeback to summary
pack-priv void dispose()
onErrorback to summary
public void onError(Throwable e)
Annotations
@Override
onSubscribeback to summary
public void onSubscribe(Disposable d)
Annotations
@Override
onSuccessback to summary
public void onSuccess(R t)

Implements io.reactivex.rxjava3.core.SingleObserver.onSuccess.

Doc from io.reactivex.rxjava3.core.SingleObserver.onSuccess.

Notifies the SingleObserver with a single item and that the Single has finished sending push-based notifications.

The Single will not call this method if it calls onError.

Parameters
t:R

the item emitted by the Single

Annotations
@Override