Class MulticastProcessor<T>
- Type Parameters:
T- the input and output value type
- All Implemented Interfaces:
FlowableDocBasic<T>, FlowableSubscriber<T>, Flow.Processor<T,T>, Flow.Publisher<T>, Flow.Subscriber<T>
FlowableProcessor implementation that coordinates downstream requests through
a front-buffer and stable-prefetching, optionally canceling the upstream if all
subscribers have cancelled.
This processor does not have a public constructor by design; a new empty instance of this
MulticastProcessor can be created via the following create methods that
allow configuring it:
create(): create an emptyMulticastProcessorwithFlowable.bufferSize()prefetch amount and no reference counting behavior.create(int): create an emptyMulticastProcessorwith the given prefetch amount and no reference counting behavior.create(boolean): create an emptyMulticastProcessorwithFlowable.bufferSize()prefetch amount and an optional reference counting behavior.create(int, boolean): create an emptyMulticastProcessorwith the given prefetch amount and an optional reference counting behavior.
When the reference counting behavior is enabled, the MulticastProcessor cancels its
upstream when all Flow.Subscribers have cancelled. Late Subscribers will then be
immediately completed.
Because MulticastProcessor implements the Flow.Subscriber interface, calling
onSubscribe is mandatory (Rule 2.12).
If MulticastProcessor should run standalone, i.e., without subscribing the MulticastProcessor to another Flow.Publisher,
use start() or startUnbounded() methods to initialize the internal buffer.
Failing to do so will lead to a NullPointerException at runtime.
Use offer(Object) to try and offer/emit items but don't fail if the
internal buffer is full.
A MulticastProcessor is a Flow.Processor type in the Reactive Streams specification,
nulls are not allowed (Rule 2.13) as
parameters to onSubscribe(Subscription), offer(Object), onNext(Object) and onError(Throwable).
Such calls will result in a NullPointerException being thrown and the processor's state is not changed.
Since a MulticastProcessor is a Flowable, it supports backpressure.
The backpressure from the currently subscribed Flow.Subscribers are coordinated by emitting upstream
items only if all of those Subscribers have requested at least one item. This behavior
is also called lockstep-mode because even if some Subscribers can take any number
of items, other Subscribers requesting less or infrequently will slow down the overall
throughput of the flow.
Calling onNext(Object), offer(Object), onError(Throwable) and onComplete()
is required to be serialized (called from the same thread or called non-overlappingly from different threads
through external means of serialization). The FlowableProcessor.toSerialized() method available to all FlowableProcessors
provides such serialization and also protects against reentrance (i.e., when a downstream Subscriber
consuming this processor also wants to call onNext(Object) on this processor recursively).
This MulticastProcessor supports the standard state-peeking methods hasComplete(), hasThrowable(),
getThrowable() and hasSubscribers(). This processor doesn't allow peeking into its buffer.
When this MulticastProcessor is terminated via onError(Throwable) or onComplete(),
all previously signaled but not yet consumed items will be still available to Subscribers and the respective
terminal even is only emitted when all previous items have been successfully delivered to Subscribers.
If there are no Subscribers, the remaining items will be buffered indefinitely.
The MulticastProcessor does not support clearing its cached events (to appear empty again).
- Backpressure:
- The backpressure from the currently subscribed
Subscribers are coordinated by emitting upstream items only if all of thoseSubscribers have requested at least one item. This behavior is also called lockstep-mode because even if someSubscribers can take any number of items, otherSubscribers requesting less or infrequently will slow down the overall throughput of the flow. - Scheduler:
MulticastProcessordoes not operate by default on a particularSchedulerand theSubscribers get notified on an arbitrary thread in a serialized fashion.
Example:
MulticastProcessor<Integer> mp = Flowable.range(1, 10)
.subscribeWith(MulticastProcessor.create());
mp.test().assertResult(1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
// --------------------
MulticastProcessor<Integer> mp2 = MulticastProcessor.create(4);
mp2.start();
assertTrue(mp2.offer(1));
assertTrue(mp2.offer(2));
assertTrue(mp2.offer(3));
assertTrue(mp2.offer(4));
assertFalse(mp2.offer(5));
mp2.onComplete();
mp2.test().assertResult(1, 2, 3, 4);
History: 2.1.14 - experimental
- Since:
- 2.2
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> @NonNull MulticastProcessor<T> create()Constructs a fresh instance with the default Flowable.bufferSize() prefetch amount and no refCount-behavior.static <T> @NonNull MulticastProcessor<T> create(boolean refCount) Constructs a fresh instance with the default Flowable.bufferSize() prefetch amount and the optional refCount-behavior.static <T> @NonNull MulticastProcessor<T> create(int bufferSize) Constructs a fresh instance with the given prefetch amount and no refCount behavior.static <T> @NonNull MulticastProcessor<T> create(int bufferSize, boolean refCount) Constructs a fresh instance with the given prefetch amount and the optional refCount-behavior.Returns the error that caused the FlowableProcessor to terminate or null if the FlowableProcessor hasn't terminated yet.booleanReturns true if the FlowableProcessor has reached a terminal state through a complete event.booleanReturns true if the FlowableProcessor has subscribers.booleanReturns true if the FlowableProcessor has reached a terminal state through an error event.booleanTries to offer an item into the internal queue and returns false if the queue is full.voidvoidvoidvoidImplementors of this method should make sure everything that needs to be visible inFlow.Subscriber.onNext(Object)is established before callingFlow.Subscription.request(long).voidstart()Initializes this Processor by setting an upstream Subscription that ignores request amounts, uses a fixed buffer and allows using the onXXX and offer methods afterwards.voidInitializes this Processor by setting an upstream Subscription that ignores request amounts, uses an unbounded buffer and allows using the onXXX and offer methods afterwards.protected voidsubscribeActual(@NonNull Flow.Subscriber<? super @NonNull T> s) Operator implementations (both source and intermediate) should implement this method that performs the necessary business logic and handles the incomingFlow.Subscribers.Methods inherited from class FlowableProcessor
toSerializedModifier and TypeMethodDescriptionfinal @NonNull FlowableProcessor<T> Wraps this FlowableProcessor and serializes the calls to the onSubscribe, onNext, onError and onComplete methods, making them thread-safe.Methods inherited from class Flowable
all, amb, ambArray, ambWith, any, blockingFirst, blockingFirst, blockingForEach, blockingForEach, blockingIterable, blockingIterable, blockingLast, blockingLast, blockingLatest, blockingMostRecent, blockingNext, blockingSingle, blockingSingle, blockingStream, blockingStream, blockingSubscribe, blockingSubscribe, blockingSubscribe, blockingSubscribe, blockingSubscribe, blockingSubscribe, blockingSubscribe, blockingSubscribe, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, bufferSize, cache, cacheWithInitialCapacity, cast, collect, collect, collectInto, combineLatest, combineLatest, combineLatest, combineLatest, combineLatest, combineLatest, combineLatest, combineLatest, combineLatest, combineLatest, combineLatestArray, combineLatestArray, combineLatestArrayDelayError, combineLatestArrayDelayError, combineLatestDelayError, combineLatestDelayError, compose, concat, concat, concat, concat, concat, concat, concatArray, concatArrayDelayError, concatArrayEager, concatArrayEager, concatArrayEagerDelayError, concatArrayEagerDelayError, concatDelayError, concatDelayError, concatDelayError, concatEager, concatEager, concatEager, concatEager, concatEagerDelayError, concatEagerDelayError, concatEagerDelayError, concatEagerDelayError, concatMap, concatMap, concatMap, concatMapCompletable, concatMapCompletable, concatMapCompletableDelayError, concatMapCompletableDelayError, concatMapCompletableDelayError, concatMapDelayError, concatMapDelayError, concatMapDelayError, concatMapEager, concatMapEager, concatMapEagerDelayError, concatMapEagerDelayError, concatMapIterable, concatMapIterable, concatMapMaybe, concatMapMaybe, concatMapMaybeDelayError, concatMapMaybeDelayError, concatMapMaybeDelayError, concatMapSingle, concatMapSingle, concatMapSingleDelayError, concatMapSingleDelayError, concatMapSingleDelayError, concatMapStream, concatMapStream, concatWith, concatWith, concatWith, concatWith, contains, count, create, debounce, debounce, debounce, debounce, defaultIfEmpty, defer, delay, delay, delay, delay, delay, delay, delaySubscription, delaySubscription, delaySubscription, dematerialize, distinct, distinct, distinct, distinctUntilChanged, distinctUntilChanged, distinctUntilChanged, doAfterNext, doAfterTerminate, doFinally, doOnCancel, doOnComplete, doOnEach, doOnEach, doOnError, doOnLifecycle, doOnNext, doOnRequest, doOnSubscribe, doOnTerminate, elementAt, elementAt, elementAtOrError, empty, error, error, filter, first, firstElement, firstOrError, firstOrErrorStage, firstStage, flatMap, flatMap, flatMap, flatMap, flatMap, flatMap, flatMap, flatMap, flatMap, flatMapCompletable, flatMapCompletable, flatMapIterable, flatMapIterable, flatMapIterable, flatMapIterable, flatMapMaybe, flatMapMaybe, flatMapSingle, flatMapSingle, flatMapStream, flatMapStream, forEach, forEachWhile, forEachWhile, forEachWhile, fromAction, fromArray, fromCallable, fromCompletable, fromCompletionStage, fromFuture, fromFuture, fromIterable, fromMaybe, fromObservable, fromOptional, fromPublisher, fromRunnable, fromSingle, fromStream, fromSupplier, generate, generate, generate, generate, generate, groupBy, groupBy, groupBy, groupBy, groupBy, groupBy, groupJoin, hide, ignoreElements, interval, interval, interval, interval, intervalRange, intervalRange, isEmpty, join, just, just, just, just, just, just, just, just, just, just, last, lastElement, lastOrError, lastOrErrorStage, lastStage, lift, map, mapOptional, materialize, merge, merge, merge, merge, merge, merge, merge, merge, mergeArray, mergeArray, mergeArrayDelayError, mergeArrayDelayError, mergeDelayError, mergeDelayError, mergeDelayError, mergeDelayError, mergeDelayError, mergeDelayError, mergeDelayError, mergeDelayError, mergeWith, mergeWith, mergeWith, mergeWith, never, observeOn, observeOn, observeOn, ofType, onBackpressureBuffer, onBackpressureBuffer, onBackpressureBuffer, onBackpressureBuffer, onBackpressureBuffer, onBackpressureBuffer, onBackpressureBuffer, onBackpressureBuffer, onBackpressureBuffer, onBackpressureBuffer, onBackpressureDrop, onBackpressureDrop, onBackpressureLatest, onBackpressureLatest, onBackpressureReduce, onBackpressureReduce, onErrorComplete, onErrorComplete, onErrorResumeNext, onErrorResumeWith, onErrorReturn, onErrorReturnItem, onTerminateDetach, parallel, parallel, parallel, publish, publish, publish, publish, range, rangeLong, rebatchRequests, reduce, reduce, reduceWith, repeat, repeat, repeatUntil, repeatWhen, replay, replay, replay, replay, replay, replay, replay, replay, replay, replay, replay, replay, replay, replay, replay, replay, replay, replay, retry, retry, retry, retry, retry, retryUntil, retryWhen, safeSubscribe, sample, sample, sample, sample, sample, sample, sample, scan, scan, scanWith, sequenceEqual, sequenceEqual, sequenceEqual, sequenceEqual, serialize, share, single, singleElement, singleOrError, singleOrErrorStage, singleStage, skip, skip, skip, skipLast, skipLast, skipLast, skipLast, skipLast, skipLast, skipUntil, skipWhile, sorted, sorted, startWith, startWith, startWith, startWith, startWithArray, startWithItem, startWithIterable, subscribe, subscribe, subscribe, subscribe, subscribe, subscribe, subscribe, subscribeOn, subscribeOn, subscribeWith, switchIfEmpty, switchMap, switchMap, switchMapCompletable, switchMapCompletableDelayError, switchMapDelayError, switchMapDelayError, switchMapMaybe, switchMapMaybeDelayError, switchMapSingle, switchMapSingleDelayError, switchOnNext, switchOnNext, switchOnNextDelayError, switchOnNextDelayError, take, take, take, takeLast, takeLast, takeLast, takeLast, takeLast, takeLast, takeLast, takeLast, takeLast, takeUntil, takeUntil, takeWhile, test, test, test, throttleFirst, throttleFirst, throttleFirst, throttleLast, throttleLast, throttleLast, throttleLatest, throttleLatest, throttleLatest, throttleLatest, throttleLatest, throttleWithTimeout, throttleWithTimeout, throttleWithTimeout, timeInterval, timeInterval, timeInterval, timeInterval, timeout, timeout, timeout, timeout, timeout, timeout, timeout, timeout, timer, timer, timestamp, timestamp, timestamp, timestamp, to, toFuture, toList, toList, toList, toMap, toMap, toMap, toMultimap, toMultimap, toMultimap, toMultimap, toObservable, toSortedList, toSortedList, toSortedList, toSortedList, toStreamable, toStreamable, unsafeCreate, unsubscribeOn, using, using, virtualCreate, virtualCreate, virtualCreate, virtualTransform, virtualTransform, virtualTransform, virtualTransform, window, window, window, window, window, window, window, window, window, window, window, window, window, window, window, window, window, withLatestFrom, withLatestFrom, withLatestFrom, withLatestFrom, withLatestFrom, withLatestFrom, zip, zip, zip, zip, zip, zip, zip, zip, zip, zip, zip, zip, zipArray, zipWith, zipWith, zipWith, zipWithModifier and TypeMethodDescriptionMirrors the oneFlow.Publisherin anIterableof severalPublishers that first either emits an item or sends a termination notification.ambArray(@NonNull Flow.Publisher<? extends @NonNull T>... sources) Mirrors the oneFlow.Publisherin an array of severalPublishers that first either emits an item or sends a termination notification.ambWith(@NonNull Flow.Publisher<? extends @NonNull T> other) Mirrors theFlow.Publisher(current or provided) that first either emits an item or sends a termination notification.Returns aSinglethat emitstrueif any item emitted by the currentFlowablesatisfies a specified condition, otherwisefalse.final TReturns the first item emitted by thisFlowable, or throwsNoSuchElementExceptionif it emits no items.final TblockingFirst(@NonNull T defaultItem) Returns the first item emitted by thisFlowable, or a default value if it emits no items.final voidblockingForEach(@NonNull Consumer<? super @NonNull T> onNext) Consumes the currentFlowablein a blocking fashion and invokes the givenConsumerwith each upstream item on the current thread until the upstream terminates.final voidblockingForEach(@NonNull Consumer<? super @NonNull T> onNext, int bufferSize) Consumes the currentFlowablein a blocking fashion and invokes the givenConsumerwith each upstream item on the current thread until the upstream terminates.Converts thisFlowableinto anIterable.blockingIterable(int bufferSize) Converts thisFlowableinto anIterable.final TReturns the last item emitted by thisFlowable, or throwsNoSuchElementExceptionif thisFlowableemits no items.final TblockingLast(@NonNull T defaultItem) Returns the last item emitted by thisFlowable, or a default value if it emits no items.Returns anIterablethat returns the latest item emitted by thisFlowable, waiting if necessary for one to become available.blockingMostRecent(@NonNull T initialItem) Returns anIterablethat always returns the item most recently emitted by thisFlowable.Returns anIterablethat blocks until thisFlowableemits another item, then returns that item.final TIf thisFlowablecompletes after emitting a single item, return that item, otherwise throw aNoSuchElementException.final TblockingSingle(@NonNull T defaultItem) If thisFlowablecompletes after emitting a single item, return that item; if it emits more than one item, throw anIllegalArgumentException; if it emits no items, return a default value.Creates a sequentialStreamto consume or process thisFlowablein a blocking manner via the JavaStreamAPI.blockingStream(int prefetch) Creates a sequentialStreamto consume or process thisFlowablein a blocking manner via the JavaStreamAPI.final voidRuns the currentFlowableto a terminal event, ignoring any values and rethrowing any exception.final voidblockingSubscribe(@NonNull Consumer<? super @NonNull T> onNext) Subscribes to the source and calls the given callbacks on the current thread.final voidblockingSubscribe(@NonNull Consumer<? super @NonNull T> onNext, int bufferSize) Subscribes to the source and calls the given callbacks on the current thread.final voidblockingSubscribe(@NonNull Consumer<? super @NonNull T> onNext, @NonNull Consumer<? super Throwable> onError) Subscribes to the source and calls the given callbacks on the current thread.final voidblockingSubscribe(@NonNull Consumer<? super @NonNull T> onNext, @NonNull Consumer<? super Throwable> onError, int bufferSize) Subscribes to the source and calls the given callbacks on the current thread.final voidblockingSubscribe(@NonNull Consumer<? super @NonNull T> onNext, @NonNull Consumer<? super Throwable> onError, @NonNull Action onComplete) Subscribes to the source and calls the given callbacks on the current thread.final voidblockingSubscribe(@NonNull Consumer<? super @NonNull T> onNext, @NonNull Consumer<? super Throwable> onError, @NonNull Action onComplete, int bufferSize) Subscribes to the source and calls the given callbacks on the current thread.final voidblockingSubscribe(@NonNull Flow.Subscriber<? super @NonNull T> subscriber) Subscribes to the source and calls theFlow.Subscribermethods on the current thread.buffer(int count) Returns aFlowablethat emits buffers of items it collects from the currentFlowable.buffer(int count, int skip) Returns aFlowablethat emits buffers of items it collects from the currentFlowable.Returns aFlowablethat emits buffers of items it collects from the currentFlowable.Returns aFlowablethat emits buffers of items it collects from the currentFlowable.Returns aFlowablethat emits buffers of items it collects from the currentFlowable.Returns aFlowablethat emits buffers of items it collects from the currentFlowable.buffer(long timespan, long timeskip, @NonNull TimeUnit unit, @NonNull Scheduler scheduler, @NonNull Supplier<@NonNull U> bufferSupplier) Returns aFlowablethat emits buffers of items it collects from the currentFlowable.Returns aFlowablethat emits buffers of items it collects from the currentFlowable.Returns aFlowablethat emits buffers of items it collects from the currentFlowable.Returns aFlowablethat emits buffers of items it collects from the currentFlowable.Returns aFlowablethat emits buffers of items it collects from the currentFlowable.buffer(long timespan, @NonNull TimeUnit unit, @NonNull Scheduler scheduler, int count, @NonNull Supplier<@NonNull U> bufferSupplier, boolean restartTimerOnMaxSize) Returns aFlowablethat emits buffers of items it collects from the currentFlowable.buffer(@NonNull Flow.Publisher<? extends @NonNull TOpening> openingIndicator, @NonNull Function<? super @NonNull TOpening, @NonNull ? extends Flow.Publisher<? extends @NonNull TClosing>> closingIndicator) Returns aFlowablethat emits buffers of items it collects from the currentFlowable.final <@NonNull TOpening, @NonNull TClosing, @NonNull U extends Collection<? super @NonNull T>>
@NonNull Flowable<U> buffer(@NonNull Flow.Publisher<? extends @NonNull TOpening> openingIndicator, @NonNull Function<? super @NonNull TOpening, @NonNull ? extends Flow.Publisher<? extends @NonNull TClosing>> closingIndicator, @NonNull Supplier<@NonNull U> bufferSupplier) Returns aFlowablethat emits buffers of items it collects from the currentFlowable.buffer(@NonNull Flow.Publisher<@NonNull B> boundaryIndicator) Returns aFlowablethat emits non-overlapping buffered items from the currentFlowableeach time the specified boundaryFlow.Publisheremits an item.buffer(@NonNull Flow.Publisher<@NonNull B> boundaryIndicator, int initialCapacity) Returns aFlowablethat emits non-overlapping buffered items from the currentFlowableeach time the specified boundaryFlow.Publisheremits an item.buffer(@NonNull Flow.Publisher<@NonNull B> boundaryIndicator, @NonNull Supplier<@NonNull U> bufferSupplier) Returns aFlowablethat emits non-overlapping buffered items from the currentFlowableeach time the specified boundaryFlow.Publisheremits an item.static intReturns the default internal buffer size used by most async operators.cache()Returns aFlowablethat subscribes to thisFlow.Publisherlazily, caches all of its events and replays them, in the same order as received, to all the downstream subscribers.cacheWithInitialCapacity(int initialCapacity) Returns aFlowablethat subscribes to thisFlow.Publisherlazily, caches all of its events and replays them, in the same order as received, to all the downstream subscribers.Returns aFlowablethat emits the upstream items while they can be cast viaClass.cast(Object)until the upstream terminates, or until the upstream signals an item which can't be cast, resulting in aClassCastExceptionto be signaled to the downstream.collect(@NonNull Supplier<? extends @NonNull U> initialItemSupplier, @NonNull BiConsumer<? super @NonNull U, ? super @NonNull T> collector) Collects items emitted by the finite sourceFlow.Publisherinto a single mutable data structure and returns aSinglethat emits this structure.collectInto(@NonNull U initialItem, @NonNull BiConsumer<? super @NonNull U, ? super @NonNull T> collector) Collects items emitted by the finite sourceFlow.Publisherinto a single mutable data structure and returns aSinglethat emits this structure.combineLatest(@NonNull Iterable<@NonNull ? extends Flow.Publisher<? extends @NonNull T>> sources, @NonNull Function<? super Object[], ? extends @NonNull R> combiner) Combines a collection of sourceFlow.Publishers by emitting an item that aggregates the latest values of each of the sourcePublishers each time an item is received from any of the sourcePublishers, where this aggregation is defined by a specified function.combineLatest(@NonNull Iterable<@NonNull ? extends Flow.Publisher<? extends @NonNull T>> sources, @NonNull Function<? super Object[], ? extends @NonNull R> combiner, int bufferSize) Combines a collection of sourceFlow.Publishers by emitting an item that aggregates the latest values of each of the sourcePublishers each time an item is received from any of the sourcePublishers, where this aggregation is defined by a specified function.combineLatest(@NonNull Flow.Publisher<? extends @NonNull T1> source1, @NonNull Flow.Publisher<? extends @NonNull T2> source2, @NonNull BiFunction<? super @NonNull T1, ? super @NonNull T2, ? extends @NonNull R> combiner) Combines two sourceFlow.Publishers by emitting an item that aggregates the latest values of each of the sourcePublishers each time an item is received from either of the sourcePublishers, where this aggregation is defined by a specified function.combineLatest(@NonNull Flow.Publisher<? extends @NonNull T1> source1, @NonNull Flow.Publisher<? extends @NonNull T2> source2, @NonNull Flow.Publisher<? extends @NonNull T3> source3, @NonNull Function3<? super @NonNull T1, ? super @NonNull T2, ? super @NonNull T3, ? extends @NonNull R> combiner) Combines three sourceFlow.Publishers by emitting an item that aggregates the latest values of each of the sourcePublishers each time an item is received from any of the sourcePublishers, where this aggregation is defined by a specified function.combineLatest(@NonNull Flow.Publisher<? extends @NonNull T1> source1, @NonNull Flow.Publisher<? extends @NonNull T2> source2, @NonNull Flow.Publisher<? extends @NonNull T3> source3, @NonNull Flow.Publisher<? extends @NonNull T4> source4, @NonNull Function4<? super @NonNull T1, ? super @NonNull T2, ? super @NonNull T3, ? super @NonNull T4, ? extends @NonNull R> combiner) Combines four sourceFlow.Publishers by emitting an item that aggregates the latest values of each of the sourcePublishers each time an item is received from any of the sourcePublishers, where this aggregation is defined by a specified function.static <@NonNull T1, @NonNull T2, @NonNull T3, @NonNull T4, @NonNull T5, @NonNull R>
@NonNull Flowable<R> combineLatest(@NonNull Flow.Publisher<? extends @NonNull T1> source1, @NonNull Flow.Publisher<? extends @NonNull T2> source2, @NonNull Flow.Publisher<? extends @NonNull T3> source3, @NonNull Flow.Publisher<? extends @NonNull T4> source4, @NonNull Flow.Publisher<? extends @NonNull T5> source5, @NonNull Function5<? super @NonNull T1, ? super @NonNull T2, ? super @NonNull T3, ? super @NonNull T4, ? super @NonNull T5, ? extends @NonNull R> combiner) Combines five sourceFlow.Publishers by emitting an item that aggregates the latest values of each of the sourcePublishers each time an item is received from any of the sourcePublishers, where this aggregation is defined by a specified function.static <@NonNull T1, @NonNull T2, @NonNull T3, @NonNull T4, @NonNull T5, @NonNull T6, @NonNull R>
@NonNull Flowable<R> combineLatest(@NonNull Flow.Publisher<? extends @NonNull T1> source1, @NonNull Flow.Publisher<? extends @NonNull T2> source2, @NonNull Flow.Publisher<? extends @NonNull T3> source3, @NonNull Flow.Publisher<? extends @NonNull T4> source4, @NonNull Flow.Publisher<? extends @NonNull T5> source5, @NonNull Flow.Publisher<? extends @NonNull T6> source6, @NonNull Function6<? super @NonNull T1, ? super @NonNull T2, ? super @NonNull T3, ? super @NonNull T4, ? super @NonNull T5, ? super @NonNull T6, ? extends @NonNull R> combiner) Combines six sourceFlow.Publishers by emitting an item that aggregates the latest values of each of the sourcePublishers each time an item is received from any of the sourcePublishers, where this aggregation is defined by a specified function.static <@NonNull T1, @NonNull T2, @NonNull T3, @NonNull T4, @NonNull T5, @NonNull T6, @NonNull T7, @NonNull R>
@NonNull Flowable<R> combineLatest(@NonNull Flow.Publisher<? extends @NonNull T1> source1, @NonNull Flow.Publisher<? extends @NonNull T2> source2, @NonNull Flow.Publisher<? extends @NonNull T3> source3, @NonNull Flow.Publisher<? extends @NonNull T4> source4, @NonNull Flow.Publisher<? extends @NonNull T5> source5, @NonNull Flow.Publisher<? extends @NonNull T6> source6, @NonNull Flow.Publisher<? extends @NonNull T7> source7, @NonNull Function7<? super @NonNull T1, ? super @NonNull T2, ? super @NonNull T3, ? super @NonNull T4, ? super @NonNull T5, ? super @NonNull T6, ? super @NonNull T7, ? extends @NonNull R> combiner) Combines seven sourceFlow.Publishers by emitting an item that aggregates the latest values of each of the sourcePublishers each time an item is received from any of the sourcePublishers, where this aggregation is defined by a specified function.static <@NonNull T1, @NonNull T2, @NonNull T3, @NonNull T4, @NonNull T5, @NonNull T6, @NonNull T7, @NonNull T8, @NonNull R>
@NonNull Flowable<R> combineLatest(@NonNull Flow.Publisher<? extends @NonNull T1> source1, @NonNull Flow.Publisher<? extends @NonNull T2> source2, @NonNull Flow.Publisher<? extends @NonNull T3> source3, @NonNull Flow.Publisher<? extends @NonNull T4> source4, @NonNull Flow.Publisher<? extends @NonNull T5> source5, @NonNull Flow.Publisher<? extends @NonNull T6> source6, @NonNull Flow.Publisher<? extends @NonNull T7> source7, @NonNull Flow.Publisher<? extends @NonNull T8> source8, @NonNull Function8<? super @NonNull T1, ? super @NonNull T2, ? super @NonNull T3, ? super @NonNull T4, ? super @NonNull T5, ? super @NonNull T6, ? super @NonNull T7, ? super @NonNull T8, ? extends @NonNull R> combiner) Combines eight sourceFlow.Publishers by emitting an item that aggregates the latest values of each of the sourcePublishers each time an item is received from any of the sourcePublishers, where this aggregation is defined by a specified function.static <@NonNull T1, @NonNull T2, @NonNull T3, @NonNull T4, @NonNull T5, @NonNull T6, @NonNull T7, @NonNull T8, @NonNull T9, @NonNull R>
@NonNull Flowable<R> combineLatest(@NonNull Flow.Publisher<? extends @NonNull T1> source1, @NonNull Flow.Publisher<? extends @NonNull T2> source2, @NonNull Flow.Publisher<? extends @NonNull T3> source3, @NonNull Flow.Publisher<? extends @NonNull T4> source4, @NonNull Flow.Publisher<? extends @NonNull T5> source5, @NonNull Flow.Publisher<? extends @NonNull T6> source6, @NonNull Flow.Publisher<? extends @NonNull T7> source7, @NonNull Flow.Publisher<? extends @NonNull T8> source8, @NonNull Flow.Publisher<? extends @NonNull T9> source9, @NonNull Function9<? super @NonNull T1, ? super @NonNull T2, ? super @NonNull T3, ? super @NonNull T4, ? super @NonNull T5, ? super @NonNull T6, ? super @NonNull T7, ? super @NonNull T8, ? super @NonNull T9, ? extends @NonNull R> combiner) Combines nine sourceFlow.Publishers by emitting an item that aggregates the latest values of each of the sourcePublishers each time an item is received from any of the sourcePublishers, where this aggregation is defined by a specified function.combineLatestArray(@NonNull Flow.Publisher<? extends @NonNull T>[] sources, @NonNull Function<? super Object[], ? extends @NonNull R> combiner) Combines a collection of sourceFlow.Publishers by emitting an item that aggregates the latest values of each of the sourcePublishers each time an item is received from any of the sourcePublishers, where this aggregation is defined by a specified function.combineLatestArray(@NonNull Flow.Publisher<? extends @NonNull T>[] sources, @NonNull Function<? super Object[], ? extends @NonNull R> combiner, int bufferSize) Combines a collection of sourceFlow.Publishers by emitting an item that aggregates the latest values of each of the sourcePublishers each time an item is received from any of the sourcePublishers, where this aggregation is defined by a specified function.combineLatestArrayDelayError(@NonNull Flow.Publisher<? extends @NonNull T>[] sources, @NonNull Function<? super Object[], ? extends @NonNull R> combiner) Combines a collection of sourceFlow.Publishers by emitting an item that aggregates the latest values of each of the sourcePublishers each time an item is received from any of the sourcePublishers, where this aggregation is defined by a specified function.combineLatestArrayDelayError(@NonNull Flow.Publisher<? extends @NonNull T>[] sources, @NonNull Function<? super Object[], ? extends @NonNull R> combiner, int bufferSize) Combines a collection of sourceFlow.Publishers by emitting an item that aggregates the latest values of each of the sourcePublishers each time an item is received from any of the sourcePublishers, where this aggregation is defined by a specified function and delays any error from the sources until all sourcePublishers terminate.combineLatestDelayError(@NonNull Iterable<@NonNull ? extends Flow.Publisher<? extends @NonNull T>> sources, @NonNull Function<? super Object[], ? extends @NonNull R> combiner) Combines a collection of sourceFlow.Publishers by emitting an item that aggregates the latest values of each of the sourcePublishers each time an item is received from any of the sourcePublishers, where this aggregation is defined by a specified function and delays any error from the sources until all sourcePublishers terminate.combineLatestDelayError(@NonNull Iterable<@NonNull ? extends Flow.Publisher<? extends @NonNull T>> sources, @NonNull Function<? super Object[], ? extends @NonNull R> combiner, int bufferSize) Combines a collection of sourceFlow.Publishers by emitting an item that aggregates the latest values of each of the sourcePublishers each time an item is received from any of the sourcePublishers, where this aggregation is defined by a specified function and delays any error from the sources until all sourcePublishers terminate.Transform the currentFlowableby applying a particularFlowableTransformerfunction to it.Concatenates elements of eachFlow.Publisherprovided via anIterablesequence into a single sequence of elements without interleaving them.concat(@NonNull Flow.Publisher<? extends @NonNull T> source1, @NonNull Flow.Publisher<? extends @NonNull T> source2) Returns aFlowablethat emits the items emitted by twoFlow.Publishers, one after the other, without interleaving them.concat(@NonNull Flow.Publisher<? extends @NonNull T> source1, @NonNull Flow.Publisher<? extends @NonNull T> source2, @NonNull Flow.Publisher<? extends @NonNull T> source3) Returns aFlowablethat emits the items emitted by threeFlow.Publishers, one after the other, without interleaving them.concat(@NonNull Flow.Publisher<? extends @NonNull T> source1, @NonNull Flow.Publisher<? extends @NonNull T> source2, @NonNull Flow.Publisher<? extends @NonNull T> source3, @NonNull Flow.Publisher<? extends @NonNull T> source4) Returns aFlowablethat emits the items emitted by fourFlow.Publishers, one after the other, without interleaving them.concat(@NonNull Flow.Publisher<@NonNull ? extends Flow.Publisher<? extends @NonNull T>> sources) Returns aFlowablethat emits the items emitted by each of theFlow.Publishers emitted by the sourcePublisher, one after the other, without interleaving them.concat(@NonNull Flow.Publisher<@NonNull ? extends Flow.Publisher<? extends @NonNull T>> sources, int prefetch) Returns aFlowablethat emits the items emitted by each of theFlow.Publishers emitted by the sourcePublisher, one after the other, without interleaving them.concatArray(@NonNull Flow.Publisher<? extends @NonNull T>... sources) Concatenates a variable number ofFlow.Publishersources.concatArrayDelayError(@NonNull Flow.Publisher<? extends @NonNull T>... sources) Concatenates a variable number ofFlow.Publishersources and delays errors from any of them till all terminate.concatArrayEager(int maxConcurrency, int prefetch, @NonNull Flow.Publisher<? extends @NonNull T>... sources) Concatenates an array ofFlow.Publishers eagerly into a single stream of values.concatArrayEager(@NonNull Flow.Publisher<? extends @NonNull T>... sources) Concatenates an array ofFlow.Publishers eagerly into a single stream of values.concatArrayEagerDelayError(int maxConcurrency, int prefetch, @NonNull Flow.Publisher<? extends @NonNull T>... sources) Concatenates an array ofFlow.Publishers eagerly into a single stream of values and delaying any errors until all sources terminate.concatArrayEagerDelayError(@NonNull Flow.Publisher<? extends @NonNull T>... sources) Concatenates an array ofFlow.Publishers eagerly into a single stream of values and delaying any errors until all sources terminate.concatDelayError(@NonNull Iterable<@NonNull ? extends Flow.Publisher<? extends @NonNull T>> sources) Concatenates theIterablesequence ofFlow.Publishers into a single sequence by subscribing to eachPublisher, one after the other, one at a time and delays any errors till the all innerPublishers terminate.concatDelayError(@NonNull Flow.Publisher<@NonNull ? extends Flow.Publisher<? extends @NonNull T>> sources) Concatenates theFlow.Publishersequence ofPublishers into a single sequence by subscribing to each innerPublisher, one after the other, one at a time and delays any errors till the all inner and the outerPublishers terminate.concatDelayError(@NonNull Flow.Publisher<@NonNull ? extends Flow.Publisher<? extends @NonNull T>> sources, int prefetch, boolean tillTheEnd) Concatenates theFlow.Publishersequence ofPublishers into a single sequence by subscribing to each innerPublisher, one after the other, one at a time and delays any errors till the all inner and the outerPublishers terminate.concatEager(@NonNull Iterable<@NonNull ? extends Flow.Publisher<? extends @NonNull T>> sources) Concatenates a sequence ofFlow.Publishers eagerly into a single stream of values.concatEager(@NonNull Iterable<@NonNull ? extends Flow.Publisher<? extends @NonNull T>> sources, int maxConcurrency, int prefetch) Concatenates a sequence ofFlow.Publishers eagerly into a single stream of values and runs a limited number of inner sequences at once.concatEager(@NonNull Flow.Publisher<@NonNull ? extends Flow.Publisher<? extends @NonNull T>> sources) Concatenates aFlow.Publishersequence ofPublishers eagerly into a single stream of values.concatEager(@NonNull Flow.Publisher<@NonNull ? extends Flow.Publisher<? extends @NonNull T>> sources, int maxConcurrency, int prefetch) Concatenates aFlow.Publishersequence ofPublishers eagerly into a single stream of values and runs a limited number of inner sequences at once.concatEagerDelayError(@NonNull Iterable<@NonNull ? extends Flow.Publisher<? extends @NonNull T>> sources) Concatenates a sequence ofFlow.Publishers eagerly into a single stream of values, delaying errors until all the inner sequences terminate.concatEagerDelayError(@NonNull Iterable<@NonNull ? extends Flow.Publisher<? extends @NonNull T>> sources, int maxConcurrency, int prefetch) Concatenates a sequence ofFlow.Publishers eagerly into a single stream of values, delaying errors until all the inner sequences terminate and runs a limited number of inner sequences at once.concatEagerDelayError(@NonNull Flow.Publisher<@NonNull ? extends Flow.Publisher<? extends @NonNull T>> sources) Concatenates aFlow.Publishersequence ofPublishers eagerly into a single stream of values, delaying errors until all the inner and the outer sequences terminate.concatEagerDelayError(@NonNull Flow.Publisher<@NonNull ? extends Flow.Publisher<? extends @NonNull T>> sources, int maxConcurrency, int prefetch) Concatenates aFlow.Publishersequence ofPublishers eagerly into a single stream of values, delaying errors until all the inner and outer sequences terminate and runs a limited number of inner sequences at once.concatMap(@NonNull Function<? super @NonNull T, @NonNull ? extends Flow.Publisher<? extends @NonNull R>> mapper) Returns a newFlowablethat emits items resulting from applying a function that you supply to each item emitted by the currentFlowable, where that function returns aFlow.Publisher, and then emitting the items that result from concatenating those returnedPublishers.concatMap(@NonNull Function<? super @NonNull T, @NonNull ? extends Flow.Publisher<? extends @NonNull R>> mapper, int prefetch) Returns a newFlowablethat emits items resulting from applying a function that you supply to each item emitted by the currentFlowable, where that function returns aFlow.Publisher, and then emitting the items that result from concatenating those returnedPublishers.concatMap(@NonNull Function<? super @NonNull T, @NonNull ? extends Flow.Publisher<? extends @NonNull R>> mapper, int prefetch, @NonNull Scheduler scheduler) Returns a newFlowablethat emits items resulting from applying a function (on a designated scheduler) that you supply to each item emitted by the currentFlowable, where that function returns aFlow.Publisher, and then emitting the items that result from concatenating those returnedPublishers.final @NonNull CompletableconcatMapCompletable(@NonNull Function<? super @NonNull T, ? extends CompletableSource> mapper) Maps the upstream items intoCompletableSources and subscribes to them one after the other completes.final @NonNull CompletableconcatMapCompletable(@NonNull Function<? super @NonNull T, ? extends CompletableSource> mapper, int prefetch) Maps the upstream items intoCompletableSources and subscribes to them one after the other completes.final @NonNull CompletableconcatMapCompletableDelayError(@NonNull Function<? super @NonNull T, ? extends CompletableSource> mapper) Maps the upstream items intoCompletableSources and subscribes to them one after the other terminates, delaying all errors till both thisFlowableand all innerCompletableSources terminate.final @NonNull CompletableconcatMapCompletableDelayError(@NonNull Function<? super @NonNull T, ? extends CompletableSource> mapper, boolean tillTheEnd) Maps the upstream items intoCompletableSources and subscribes to them one after the other terminates, optionally delaying all errors till both thisFlowableand all innerCompletableSources terminate.final @NonNull CompletableconcatMapCompletableDelayError(@NonNull Function<? super @NonNull T, ? extends CompletableSource> mapper, boolean tillTheEnd, int prefetch) Maps the upstream items intoCompletableSources and subscribes to them one after the other terminates, optionally delaying all errors till both thisFlowableand all innerCompletableSources terminate.concatMapDelayError(@NonNull Function<? super @NonNull T, @NonNull ? extends Flow.Publisher<? extends @NonNull R>> mapper) Maps each of the items into aFlow.Publisher, subscribes to them one after the other, one at a time and emits their values in order while delaying any error from either this or any of the innerPublishers till all of them terminate.concatMapDelayError(@NonNull Function<? super @NonNull T, @NonNull ? extends Flow.Publisher<? extends @NonNull R>> mapper, boolean tillTheEnd, int prefetch) Maps each of the items into aFlow.Publisher, subscribes to them one after the other, one at a time and emits their values in order while delaying any error from either this or any of the innerPublishers till all of them terminate.concatMapDelayError(@NonNull Function<? super @NonNull T, @NonNull ? extends Flow.Publisher<? extends @NonNull R>> mapper, boolean tillTheEnd, int prefetch, @NonNull Scheduler scheduler) Maps each of the upstream items into aFlow.Publisher, subscribes to them one after the other, one at a time and emits their values in order while executing the mapper function on the designated scheduler, delaying any error from either this or any of the innerPublishers till all of them terminate.concatMapEager(@NonNull Function<? super @NonNull T, @NonNull ? extends Flow.Publisher<? extends @NonNull R>> mapper) Maps a sequence of values intoFlow.Publishers and concatenates thesePublishers eagerly into a singlePublisher.concatMapEager(@NonNull Function<? super @NonNull T, @NonNull ? extends Flow.Publisher<? extends @NonNull R>> mapper, int maxConcurrency, int prefetch) Maps a sequence of values intoFlow.Publishers and concatenates thesePublishers eagerly into a singlePublisher.concatMapEagerDelayError(@NonNull Function<? super @NonNull T, @NonNull ? extends Flow.Publisher<? extends @NonNull R>> mapper, boolean tillTheEnd) Maps a sequence of values intoFlow.Publishers and concatenates thesePublishers eagerly into a singlePublisher.concatMapEagerDelayError(@NonNull Function<? super @NonNull T, @NonNull ? extends Flow.Publisher<? extends @NonNull R>> mapper, boolean tillTheEnd, int maxConcurrency, int prefetch) Maps a sequence of values intoFlow.Publishers and concatenates thesePublishers eagerly into a singleFlowablesequence.concatMapIterable(@NonNull Function<? super @NonNull T, @NonNull ? extends Iterable<? extends @NonNull U>> mapper) Returns aFlowablethat concatenate each item emitted by the currentFlowablewith the values in anIterablecorresponding to that item that is generated by a selector.concatMapIterable(@NonNull Function<? super @NonNull T, @NonNull ? extends Iterable<? extends @NonNull U>> mapper, int prefetch) Returns aFlowablethat concatenate each item emitted by the currentFlowablewith the values in anIterablecorresponding to that item that is generated by a selector.concatMapMaybe(@NonNull Function<? super @NonNull T, ? extends MaybeSource<? extends @NonNull R>> mapper) Maps the upstream items intoMaybeSources and subscribes to them one after the other succeeds or completes, emits their success value if available or terminates immediately if either thisFlowableor the current innerMaybeSourcefail.concatMapMaybe(@NonNull Function<? super @NonNull T, ? extends MaybeSource<? extends @NonNull R>> mapper, int prefetch) Maps the upstream items intoMaybeSources and subscribes to them one after the other succeeds or completes, emits their success value if available or terminates immediately if either thisFlowableor the current innerMaybeSourcefail.concatMapMaybeDelayError(@NonNull Function<? super @NonNull T, ? extends MaybeSource<? extends @NonNull R>> mapper) Maps the upstream items intoMaybeSources and subscribes to them one after the other terminates, emits their success value if available and delaying all errors till both thisFlowableand all innerMaybeSources terminate.concatMapMaybeDelayError(@NonNull Function<? super @NonNull T, ? extends MaybeSource<? extends @NonNull R>> mapper, boolean tillTheEnd) Maps the upstream items intoMaybeSources and subscribes to them one after the other terminates, emits their success value if available and optionally delaying all errors till both thisFlowableand all innerMaybeSources terminate.concatMapMaybeDelayError(@NonNull Function<? super @NonNull T, ? extends MaybeSource<? extends @NonNull R>> mapper, boolean tillTheEnd, int prefetch) Maps the upstream items intoMaybeSources and subscribes to them one after the other terminates, emits their success value if available and optionally delaying all errors till both thisFlowableand all innerMaybeSources terminate.concatMapSingle(@NonNull Function<? super @NonNull T, ? extends SingleSource<? extends @NonNull R>> mapper) Maps the upstream items intoSingleSources and subscribes to them one after the other succeeds, emits their success values or terminates immediately if either thisFlowableor the current innerSingleSourcefail.concatMapSingle(@NonNull Function<? super @NonNull T, ? extends SingleSource<? extends @NonNull R>> mapper, int prefetch) Maps the upstream items intoSingleSources and subscribes to them one after the other succeeds, emits their success values or terminates immediately if either thisFlowableor the current innerSingleSourcefail.concatMapSingleDelayError(@NonNull Function<? super @NonNull T, ? extends SingleSource<? extends @NonNull R>> mapper) Maps the upstream items intoSingleSources and subscribes to them one after the other succeeds or fails, emits their success values and delays all errors till both thisFlowableand all innerSingleSources terminate.concatMapSingleDelayError(@NonNull Function<? super @NonNull T, ? extends SingleSource<? extends @NonNull R>> mapper, boolean tillTheEnd) Maps the upstream items intoSingleSources and subscribes to them one after the other succeeds or fails, emits their success values and optionally delays all errors till both thisFlowableand all innerSingleSources terminate.concatMapSingleDelayError(@NonNull Function<? super @NonNull T, ? extends SingleSource<? extends @NonNull R>> mapper, boolean tillTheEnd, int prefetch) Maps the upstream items intoSingleSources and subscribes to them one after the other succeeds or fails, emits their success values and optionally delays errors till both thisFlowableand all innerSingleSources terminate.concatMapStream(@NonNull Function<? super @NonNull T, @NonNull ? extends Stream<? extends @NonNull R>> mapper) Maps each upstream item into aStreamand emits theStream's items to the downstream in a sequential fashion.concatMapStream(@NonNull Function<? super @NonNull T, @NonNull ? extends Stream<? extends @NonNull R>> mapper, int prefetch) Maps each upstream item into aStreamand emits theStream's items to the downstream in a sequential fashion.concatWith(@NonNull CompletableSource other) Returns aFlowablethat emits items from thisFlowableand when it completes normally, the otherCompletableSourceis subscribed to and the returnedFlowableemits its terminal events.concatWith(@NonNull MaybeSource<? extends @NonNull T> other) Returns aFlowablethat emits the items from thisFlowablefollowed by the success item or terminal events of the otherMaybeSource.concatWith(@NonNull SingleSource<? extends @NonNull T> other) Returns aFlowablethat emits the items from thisFlowablefollowed by the success item or error event of the otherSingleSource.concatWith(@NonNull Flow.Publisher<? extends @NonNull T> other) Returns aFlowablethat emits the items emitted from the currentFlowable, then the next, one after the other, without interleaving them.count()create(@NonNull FlowableOnSubscribe<@NonNull T> source, @NonNull BackpressureStrategy mode) Provides an API (via a coldFlowable) that bridges the reactive world with the callback-style, generally non-backpressured world.Returns aFlowablethat mirrors the currentFlowable, except that it drops items emitted by the currentFlowablethat are followed by newer items before a timeout value expires.Returns aFlowablethat mirrors the currentFlowable, except that it drops items emitted by the currentFlowablethat are followed by newer items before a timeout value expires on a specifiedScheduler.debounce(long timeout, @NonNull TimeUnit unit, @NonNull Scheduler scheduler, @NonNull Consumer<? super @NonNull T> onDropped) Returns aFlowablethat mirrors the currentFlowable, except that it drops items emitted by the currentFlowablethat are followed by newer items before a timeout value expires on a specifiedScheduler.debounce(@NonNull Function<? super @NonNull T, @NonNull ? extends Flow.Publisher<@NonNull U>> debounceIndicator) Returns aFlowablethat mirrors the currentFlowable, except that it drops items emitted by the currentFlowablethat are followed by another item within a computed debounce duration.defaultIfEmpty(@NonNull T defaultItem) Returns aFlowablethat emits the items emitted by the currentFlowableor a specified default item if the currentFlowableis empty.Returns aFlowablethat calls aFlow.Publisherfactory to create aPublisherfor each newFlow.Subscriberthat subscribes.Returns aFlowablethat emits the items emitted by the currentFlowableshifted forward in time by a specified delay.Returns aFlowablethat emits the items emitted by the currentFlowableshifted forward in time by a specified delay.Returns aFlowablethat emits the items emitted by the currentFlowableshifted forward in time by a specified delay.Returns aFlowablethat emits the items emitted by the currentFlowableshifted forward in time by a specified delay.delay(@NonNull Function<? super @NonNull T, @NonNull ? extends Flow.Publisher<@NonNull U>> itemDelayIndicator) Returns aFlowablethat delays the emissions of the currentFlowablevia anotherFlow.Publisheron a per-item basis.delay(@NonNull Flow.Publisher<@NonNull U> subscriptionIndicator, @NonNull Function<? super @NonNull T, @NonNull ? extends Flow.Publisher<@NonNull V>> itemDelayIndicator) Returns aFlowablethat delays the subscription to and emissions from the currentFlowablevia anotherFlow.Publisheron a per-item basis.delaySubscription(long time, @NonNull TimeUnit unit) Returns aFlowablethat delays the subscription to the currentFlowableby a given amount of time.delaySubscription(long time, @NonNull TimeUnit unit, @NonNull Scheduler scheduler) Returns aFlowablethat delays the subscription to the currentFlowableby a given amount of time, both waiting and subscribing on a givenScheduler.delaySubscription(@NonNull Flow.Publisher<@NonNull U> subscriptionIndicator) Returns aFlowablethat delays the subscription to thisFlow.Publisheruntil the otherPublisheremits an element or completes normally.dematerialize(@NonNull Function<@NonNull ? super @NonNull T, @NonNull Notification<@NonNull R>> selector) Returns aFlowablethat reverses the effect ofmaterializeby transforming theNotificationobjects extracted from the source items via a selector function into their respectiveFlow.Subscribersignal types.distinct()Returns aFlowablethat emits all items emitted by the currentFlowablethat are distinct based onObject.equals(Object)comparison.Returns aFlowablethat emits all items emitted by the currentFlowablethat are distinct according to a key selector function and based onObject.equals(Object)comparison of the objects returned by the key selector function.distinct(@NonNull Function<? super @NonNull T, @NonNull K> keySelector, @NonNull Supplier<? extends Collection<? super @NonNull K>> collectionSupplier) Returns aFlowablethat emits all items emitted by the currentFlowablethat are distinct according to a key selector function and based onObject.equals(Object)comparison of the objects returned by the key selector function.Returns aFlowablethat emits all items emitted by the currentFlowablethat are distinct from their immediate predecessors based onObject.equals(Object)comparison.distinctUntilChanged(@NonNull BiPredicate<? super @NonNull T, ? super @NonNull T> comparer) Returns aFlowablethat emits all items emitted by the currentFlowablethat are distinct from their immediate predecessors when compared with each other via the provided comparator function.Returns aFlowablethat emits all items emitted by the currentFlowablethat are distinct from their immediate predecessors, according to a key selector function and based onObject.equals(Object)comparison of those objects returned by the key selector function.doAfterNext(@NonNull Consumer<? super @NonNull T> onAfterNext) Calls the specified consumer with the current item after this item has been emitted to the downstream.doAfterTerminate(@NonNull Action onAfterTerminate) Calls the specified action after thisFlowablesignalsonErrororonCompleteor gets canceled by the downstream.doOnCancel(@NonNull Action onCancel) Calls the cancelActionif the downstream cancels the sequence.doOnComplete(@NonNull Action onComplete) Invokes aConsumerwith aNotificationinstances matching the signals emitted by the currentFlowablebefore they are forwarded to the downstream.doOnEach(@NonNull Flow.Subscriber<? super @NonNull T> subscriber) Calls the appropriate methods of the givenFlow.Subscriberwhen the currentFlowablesignals events before forwarding it to the downstream.doOnLifecycle(@NonNull Consumer<? super Flow.Subscription> onSubscribe, @NonNull LongConsumer onRequest, @NonNull Action onCancel) Calls the appropriateonXXXmethod (shared between allFlow.Subscribers) for the lifecycle events of the sequence (subscription, cancellation, requesting).Calls the givenConsumerwith the value emitted by the currentFlowablebefore forwarding it to the downstream.doOnRequest(@NonNull LongConsumer onRequest) Calls the givenLongConsumerwith the request amount from the downstream before forwarding it to the currentFlowable.doOnSubscribe(@NonNull Consumer<? super Flow.Subscription> onSubscribe) Calls the givenConsumerwith theFlow.Subscriptionprovided by the currentFlowableupon subscription from the downstream before forwarding it to the subscriber'sonSubscribemethod.doOnTerminate(@NonNull Action onTerminate) Calls the givenActionwhen the currentFlowablecompletes normally or with an error before those signals are forwarded to the downstream.elementAt(long index) Returns aMaybethat emits the single item at a specified index in a sequence of emissions from thisFlowableor completes if thisFlowablesequence has fewer elements than index.Returns aSinglethat emits the item found at a specified index in a sequence of emissions from thisFlowable, or a default item if that index is out of range.elementAtOrError(long index) Returns aSinglethat emits the item found at a specified index in a sequence of emissions from thisFlowableor signals aNoSuchElementExceptionif thisFlowablehas fewer elements than index.empty()Returns aFlowablethat emits no items to theFlow.Subscriberand immediately invokes itsonCompletemethod.Returns aFlowablethat invokes aFlow.Subscriber'sonErrormethod when theSubscribersubscribes to it.Returns aFlowablethat invokes aFlow.Subscriber'sonErrormethod when theSubscribersubscribes to it.Filters items emitted by the currentFlowableby only emitting those that satisfy a specified predicate.Returns aSinglethat emits only the very first item emitted by thisFlowable, or a default item if thisFlowablecompletes without emitting anything.Returns aMaybethat emits only the very first item emitted by thisFlowableor completes if thisFlowableis empty.Returns aSinglethat emits only the very first item emitted by thisFlowableor signals aNoSuchElementExceptionif thisFlowableis empty.final @NonNull CompletionStage<T> Signals the first upstream item or aNoSuchElementExceptionif the upstream is empty via aCompletionStage.final @NonNull CompletionStage<T> firstStage(@NonNull T defaultItem) Signals the first upstream item (or the default item if the upstream is empty) via aCompletionStage.flatMap(@NonNull Function<? super @NonNull T, @NonNull ? extends Flow.Publisher<? extends @NonNull R>> mapper) Returns aFlowablethat emits items based on applying a function that you supply to each item emitted by the currentFlowable, where that function returns aFlow.Publisher, and then merging those resultingPublishers and emitting the results of this merger.flatMap(@NonNull Function<? super @NonNull T, @NonNull ? extends Flow.Publisher<? extends @NonNull R>> mapper, @NonNull FlatMapConfig config) Returns aFlowablethat emits items based on applying a function that you supply to each item emitted by the currentFlowable, where that function returns aFlow.Publisher, and then merging those resultingPublishers and emitting the results of this merger, while limiting the maximum number of concurrent subscriptions to thesePublishers.flatMap(@NonNull Function<? super @NonNull T, @NonNull ? extends Flow.Publisher<? extends @NonNull R>> onNextMapper, @NonNull Function<? super Throwable, @NonNull ? extends Flow.Publisher<? extends @NonNull R>> onErrorMapper, @NonNull Supplier<? extends Flow.Publisher<? extends @NonNull R>> onCompleteSupplier) Returns aFlowablethat applies a function to each item emitted or notification raised by the currentFlowableand then flattens theFlow.Publishers returned from these functions and emits the resulting items.flatMap(@NonNull Function<? super @NonNull T, @NonNull ? extends Flow.Publisher<? extends @NonNull R>> onNextMapper, @NonNull Function<Throwable, @NonNull ? extends Flow.Publisher<? extends @NonNull R>> onErrorMapper, @NonNull Supplier<? extends Flow.Publisher<? extends @NonNull R>> onCompleteSupplier, int maxConcurrency) Returns aFlowablethat applies a function to each item emitted or notification raised by the currentFlowableand then flattens theFlow.Publishers returned from these functions and emits the resulting items, while limiting the maximum number of concurrent subscriptions to thesePublishers.flatMap(@NonNull Function<? super @NonNull T, @NonNull ? extends Flow.Publisher<? extends @NonNull U>> mapper, @NonNull BiFunction<? super @NonNull T, ? super @NonNull U, ? extends @NonNull R> combiner) Returns aFlowablethat emits the results of a specified function to the pair of values emitted by the currentFlowableand a specified collectionFlow.Publisher.flatMap(@NonNull Function<? super @NonNull T, @NonNull ? extends Flow.Publisher<? extends @NonNull U>> mapper, @NonNull BiFunction<? super @NonNull T, ? super @NonNull U, ? extends @NonNull R> combiner, boolean delayErrors) Returns aFlowablethat emits the results of a specified function to the pair of values emitted by the currentFlowableand a specified innerFlow.Publisher.flatMap(@NonNull Function<? super @NonNull T, @NonNull ? extends Flow.Publisher<? extends @NonNull U>> mapper, @NonNull BiFunction<? super @NonNull T, ? super @NonNull U, ? extends @NonNull R> combiner, boolean delayErrors, int maxConcurrency) Returns aFlowablethat emits the results of a specified function to the pair of values emitted by the currentFlowableand a specified collectionFlow.Publisher, while limiting the maximum number of concurrent subscriptions to thesePublishers.flatMap(@NonNull Function<? super @NonNull T, @NonNull ? extends Flow.Publisher<? extends @NonNull U>> mapper, @NonNull BiFunction<? super @NonNull T, ? super @NonNull U, ? extends @NonNull R> combiner, boolean delayErrors, int maxConcurrency, int bufferSize) Returns aFlowablethat emits the results of a specified function to the pair of values emitted by the currentFlowableand a specified collectionFlow.Publisher, while limiting the maximum number of concurrent subscriptions to thesePublishers.flatMap(@NonNull Function<? super @NonNull T, @NonNull ? extends Flow.Publisher<? extends @NonNull U>> mapper, @NonNull BiFunction<? super @NonNull T, ? super @NonNull U, ? extends @NonNull R> combiner, int maxConcurrency) Returns aFlowablethat emits the results of a specified function to the pair of values emitted by the currentFlowableand a specified collectionFlow.Publisher, while limiting the maximum number of concurrent subscriptions to thesePublishers.final @NonNull CompletableflatMapCompletable(@NonNull Function<? super @NonNull T, ? extends CompletableSource> mapper) Maps each element of the upstreamFlowableintoCompletableSources, subscribes to them and waits until the upstream and allCompletableSources complete.final @NonNull CompletableflatMapCompletable(@NonNull Function<? super @NonNull T, ? extends CompletableSource> mapper, boolean delayErrors, int maxConcurrency) Maps each element of the upstreamFlowableintoCompletableSources, subscribes to them and waits until the upstream and allCompletableSources complete, optionally delaying all errors.flatMapIterable(@NonNull Function<? super @NonNull T, @NonNull ? extends Iterable<? extends @NonNull U>> mapper) flatMapIterable(@NonNull Function<? super @NonNull T, @NonNull ? extends Iterable<? extends @NonNull U>> mapper, int bufferSize) flatMapIterable(@NonNull Function<? super @NonNull T, @NonNull ? extends Iterable<? extends @NonNull U>> mapper, @NonNull BiFunction<? super @NonNull T, ? super @NonNull U, ? extends @NonNull V> combiner) MergesIterables generated by a mapperFunctionfor each individual item emitted by the currentFlowableinto a singleFlowablesequence where the resulting items will be the combination of the original item and each inner item of the respectiveIterableas returned by theresultSelectorBiFunction.flatMapIterable(@NonNull Function<? super @NonNull T, @NonNull ? extends Iterable<? extends @NonNull U>> mapper, @NonNull BiFunction<? super @NonNull T, ? super @NonNull U, ? extends @NonNull V> combiner, int prefetch) MergesIterables generated by a mapperFunctionfor each individual item emitted by the currentFlowableinto a singleFlowablesequence where the resulting items will be the combination of the original item and each inner item of the respectiveIterableas returned by theresultSelectorBiFunction.flatMapMaybe(@NonNull Function<? super @NonNull T, ? extends MaybeSource<? extends @NonNull R>> mapper) Maps each element of the upstreamFlowableintoMaybeSources, subscribes to all of them and merges theironSuccessvalues, in no particular order, into a singleFlowablesequence.flatMapMaybe(@NonNull Function<? super @NonNull T, ? extends MaybeSource<? extends @NonNull R>> mapper, boolean delayErrors, int maxConcurrency) Maps each element of the upstreamFlowableintoMaybeSources, subscribes to at mostmaxConcurrencyMaybeSources at a time and merges theironSuccessvalues, in no particular order, into a singleFlowablesequence, optionally delaying all errors.flatMapSingle(@NonNull Function<? super @NonNull T, ? extends SingleSource<? extends @NonNull R>> mapper) Maps each element of the upstreamFlowableintoSingleSources, subscribes to all of them and merges theironSuccessvalues, in no particular order, into a singleFlowablesequence.flatMapSingle(@NonNull Function<? super @NonNull T, ? extends SingleSource<? extends @NonNull R>> mapper, boolean delayErrors, int maxConcurrency) Maps each element of the upstreamFlowableintoSingleSources, subscribes to at mostmaxConcurrencySingleSources at a time and merges theironSuccessvalues, in no particular order, into a singleFlowablesequence, optionally delaying all errors.flatMapStream(@NonNull Function<? super @NonNull T, @NonNull ? extends Stream<? extends @NonNull R>> mapper) Maps each upstream item into aStreamand emits theStream's items to the downstream in a sequential fashion.flatMapStream(@NonNull Function<? super @NonNull T, @NonNull ? extends Stream<? extends @NonNull R>> mapper, int prefetch) Maps each upstream item into aStreamand emits theStream's items to the downstream in a sequential fashion.final @NonNull DisposableSubscribes to the currentFlowableand receives notifications for each element.final @NonNull DisposableforEachWhile(@NonNull Predicate<? super @NonNull T> onNext) Subscribes to the currentFlowableand receives notifications for each element until theonNextPredicate returnsfalse.final @NonNull DisposableforEachWhile(@NonNull Predicate<? super @NonNull T> onNext, @NonNull Consumer<? super Throwable> onError) Subscribes to the currentFlowableand receives notifications for each element and error events until theonNextPredicate returnsfalse.final @NonNull DisposableforEachWhile(@NonNull Predicate<? super @NonNull T> onNext, @NonNull Consumer<? super Throwable> onError, @NonNull Action onComplete) Subscribes to the currentFlowableand receives notifications for each element and the terminal events until theonNextPredicate returnsfalse.fromAction(@NonNull Action action) Returns aFlowableinstance that runs the givenActionfor eachFlow.Subscriberand emits either its exception or simply completes.Converts an array into aFlow.Publisherthat emits the items in the array.fromCallable(@NonNull Callable<? extends @NonNull T> callable) Returns aFlowablethat, when aFlow.Subscribersubscribes to it, invokes a function you specify and then emits the value returned from that function.fromCompletable(@NonNull CompletableSource completableSource) Wraps aCompletableSourceinto aFlowable.fromCompletionStage(@NonNull CompletionStage<@NonNull T> stage) Signals the completion value or error of the given (hot)CompletionStage-based asynchronous calculation.fromFuture(@NonNull Future<? extends @NonNull T> future) Converts aFutureinto aFlow.Publisher.fromIterable(@NonNull Iterable<? extends @NonNull T> source) Converts anIterablesequence into aFlow.Publisherthat emits the items in the sequence.fromMaybe(@NonNull MaybeSource<@NonNull T> maybe) Returns aFlowableinstance that when subscribed to, subscribes to theMaybeSourceinstance and emitsonSuccessas a single item or forwards anyonCompleteoronErrorsignal.fromObservable(@NonNull ObservableSource<@NonNull T> source, @NonNull BackpressureStrategy strategy) Converts the givenObservableSourceinto aFlowableby applying the specified backpressure strategy.fromOptional(@NonNull Optional<@NonNull T> optional) Converts the existing value of the provided optional into aFlowable.just(Object)or an empty optional into anFlowable.empty()Flowableinstance.fromPublisher(@NonNull Flow.Publisher<? extends @NonNull T> publisher) fromRunnable(@NonNull Runnable run) Returns aFlowableinstance that runs the givenRunnablefor eachFlow.Subscriberand emits either its unchecked exception or simply completes.fromSingle(@NonNull SingleSource<@NonNull T> source) Returns aFlowableinstance that when subscribed to, subscribes to theSingleSourceinstance and emitsonSuccessas a single item or forwards theonErrorsignal.fromStream(@NonNull Stream<@NonNull T> stream) Converts aStreaminto a finiteFlowableand emits its items in the sequence.fromSupplier(@NonNull Supplier<? extends @NonNull T> supplier) Returns aFlowablethat, when aFlow.Subscribersubscribes to it, invokes a supplier function you specify and then emits the value returned from that function.Returns a cold, synchronous, stateless and backpressure-aware generator of values.generate(@NonNull Supplier<@NonNull S> initialState, @NonNull BiConsumer<@NonNull S, Emitter<@NonNull T>> generator) Returns a cold, synchronous, stateful and backpressure-aware generator of values.generate(@NonNull Supplier<@NonNull S> initialState, @NonNull BiConsumer<@NonNull S, Emitter<@NonNull T>> generator, @NonNull Consumer<? super @NonNull S> disposeState) Returns a cold, synchronous, stateful and backpressure-aware generator of values.generate(@NonNull Supplier<@NonNull S> initialState, @NonNull BiFunction<@NonNull S, @NonNull Emitter<@NonNull T>, @NonNull S> generator) Returns a cold, synchronous, stateful and backpressure-aware generator of values.generate(@NonNull Supplier<@NonNull S> initialState, @NonNull BiFunction<@NonNull S, @NonNull Emitter<@NonNull T>, @NonNull S> generator, @NonNull Consumer<? super @NonNull S> disposeState) Returns a cold, synchronous, stateful and backpressure-aware generator of values.final <@NonNull K>
@NonNull Flowable<GroupedFlowable<K, T>> Groups the items emitted by the currentFlowableaccording to a specified criterion, and emits these grouped items asGroupedFlowables.final <@NonNull K>
@NonNull Flowable<GroupedFlowable<K, T>> groupBy(@NonNull Function<? super @NonNull T, ? extends @NonNull K> keySelector, boolean delayError) Groups the items emitted by the currentFlowableaccording to a specified criterion, and emits these grouped items asGroupedFlowables.final <@NonNull K, @NonNull V>
@NonNull Flowable<GroupedFlowable<K, V>> groupBy(@NonNull Function<? super @NonNull T, ? extends @NonNull K> keySelector, @NonNull Function<? super @NonNull T, ? extends @NonNull V> valueSelector) Groups the items emitted by the currentFlowableaccording to a specified criterion, and emits these grouped items asGroupedFlowables.final <@NonNull K, @NonNull V>
@NonNull Flowable<GroupedFlowable<K, V>> groupBy(@NonNull Function<? super @NonNull T, ? extends @NonNull K> keySelector, @NonNull Function<? super @NonNull T, ? extends @NonNull V> valueSelector, boolean delayError) Groups the items emitted by the currentFlowableaccording to a specified criterion, and emits these grouped items asGroupedFlowables.final <@NonNull K, @NonNull V>
@NonNull Flowable<GroupedFlowable<K, V>> groupBy(@NonNull Function<? super @NonNull T, ? extends @NonNull K> keySelector, @NonNull Function<? super @NonNull T, ? extends @NonNull V> valueSelector, boolean delayError, int bufferSize) Groups the items emitted by the currentFlowableaccording to a specified criterion, and emits these grouped items asGroupedFlowables.final <@NonNull K, @NonNull V>
@NonNull Flowable<GroupedFlowable<K, V>> groupBy(@NonNull Function<? super @NonNull T, ? extends @NonNull K> keySelector, @NonNull Function<? super @NonNull T, ? extends @NonNull V> valueSelector, boolean delayError, int bufferSize, @NonNull Function<? super Consumer<Object>, ? extends Map<@NonNull K, Object>> evictingMapFactory) Groups the items emitted by the currentFlowableaccording to a specified criterion, and emits these grouped items asGroupedFlowables.groupJoin(@NonNull Flow.Publisher<? extends @NonNull TRight> other, @NonNull Function<? super @NonNull T, @NonNull ? extends Flow.Publisher<@NonNull TLeftEnd>> leftEnd, @NonNull Function<? super @NonNull TRight, @NonNull ? extends Flow.Publisher<@NonNull TRightEnd>> rightEnd, @NonNull BiFunction<? super @NonNull T, ? super Flowable<@NonNull TRight>, ? extends @NonNull R> resultSelector) Returns aFlowablethat correlates twoFlow.Publishers when they overlap in time and groups the results.hide()Hides the identity of thisFlowableand itsFlow.Subscription.final @NonNull CompletableIgnores all items emitted by the currentFlowableand only callsonCompleteoronError.Returns aFlowablethat emits a0Lafter theinitialDelayand ever-increasing numbers after eachperiodof time thereafter.Returns aFlowablethat emits a0Lafter theinitialDelayand ever-increasing numbers after eachperiodof time thereafter, on a specifiedScheduler.Returns aFlowablethat emits a sequential number every specified interval of time.Returns aFlowablethat emits a sequential number every specified interval of time, on a specifiedScheduler.intervalRange(long start, long count, long initialDelay, long period, @NonNull TimeUnit unit) Signals a range of long values, the first after some initial delay and the rest periodically after.intervalRange(long start, long count, long initialDelay, long period, @NonNull TimeUnit unit, @NonNull Scheduler scheduler) Signals a range of long values, the first after some initial delay and the rest periodically after.isEmpty()join(@NonNull Flow.Publisher<? extends @NonNull TRight> other, @NonNull Function<? super @NonNull T, @NonNull ? extends Flow.Publisher<@NonNull TLeftEnd>> leftEnd, @NonNull Function<? super @NonNull TRight, @NonNull ? extends Flow.Publisher<@NonNull TRightEnd>> rightEnd, @NonNull BiFunction<? super @NonNull T, ? super @NonNull TRight, ? extends @NonNull R> resultSelector) Correlates the items emitted by twoFlow.Publishers based on overlapping durations.Returns aFlowablethat signals the given (constant reference) item and then completes.Converts two items into aFlow.Publisherthat emits those items.Converts three items into aFlow.Publisherthat emits those items.Converts four items into aFlow.Publisherthat emits those items.Converts five items into aFlow.Publisherthat emits those items.just(@NonNull T item1, @NonNull T item2, @NonNull T item3, @NonNull T item4, @NonNull T item5, @NonNull T item6) Converts six items into aFlow.Publisherthat emits those items.just(@NonNull T item1, @NonNull T item2, @NonNull T item3, @NonNull T item4, @NonNull T item5, @NonNull T item6, @NonNull T item7) Converts seven items into aFlow.Publisherthat emits those items.just(@NonNull T item1, @NonNull T item2, @NonNull T item3, @NonNull T item4, @NonNull T item5, @NonNull T item6, @NonNull T item7, @NonNull T item8) Converts eight items into aFlow.Publisherthat emits those items.just(@NonNull T item1, @NonNull T item2, @NonNull T item3, @NonNull T item4, @NonNull T item5, @NonNull T item6, @NonNull T item7, @NonNull T item8, @NonNull T item9) Converts nine items into aFlow.Publisherthat emits those items.just(@NonNull T item1, @NonNull T item2, @NonNull T item3, @NonNull T item4, @NonNull T item5, @NonNull T item6, @NonNull T item7, @NonNull T item8, @NonNull T item9, @NonNull T item10) Converts ten items into aFlow.Publisherthat emits those items.Returns aSinglethat emits only the last item emitted by thisFlowable, or a default item if thisFlowablecompletes without emitting any items.Returns aMaybethat emits the last item emitted by thisFlowableor completes if thisFlowableis empty.Returns aSinglethat emits only the last item emitted by thisFlowableor signals aNoSuchElementExceptionif thisFlowableis empty.final @NonNull CompletionStage<T> Signals the last upstream item or aNoSuchElementExceptionif the upstream is empty via aCompletionStage.final @NonNull CompletionStage<T> Signals the last upstream item (or the default item if the upstream is empty) via aCompletionStage.This method requires advanced knowledge about building operators, please consider other standard composition methods first; Returns aFlowablewhich, when subscribed to, invokes theapply(Subscriber)method of the providedFlowableOperatorfor each individual downstreamFlow.Subscriberand allows the insertion of a custom operator by accessing the downstream'sSubscriberduring this subscription phase and providing a newSubscriber, containing the custom operator's intended business logic, that will be used in the subscription process going further upstream.Returns aFlowablethat applies a specified function to each item emitted by the currentFlowableand emits the results of these function applications.Maps each upstream value into anOptionaland emits the contained item if not empty.final @NonNull Flowable<Notification<T>> Returns aFlowablethat represents all of the emissions and notifications from the currentFlowableinto emissions marked with their original types withinNotificationobjects.merge(@NonNull Iterable<@NonNull ? extends Flow.Publisher<? extends @NonNull T>> sources, int maxConcurrency) Flattens anIterableofFlow.Publishers into onePublisher, without any transformation, while limiting the number of concurrent subscriptions to thesePublishers.merge(@NonNull Iterable<@NonNull ? extends Flow.Publisher<? extends @NonNull T>> sources, int maxConcurrency, int bufferSize) Flattens anIterableofFlow.Publishers into onePublisher, without any transformation, while limiting the number of concurrent subscriptions to thesePublishers.merge(@NonNull Flow.Publisher<? extends @NonNull T> source1, @NonNull Flow.Publisher<? extends @NonNull T> source2) Flattens twoFlow.Publishers into a singlePublisher, without any transformation.merge(@NonNull Flow.Publisher<? extends @NonNull T> source1, @NonNull Flow.Publisher<? extends @NonNull T> source2, @NonNull Flow.Publisher<? extends @NonNull T> source3) Flattens threeFlow.Publishers into a singlePublisher, without any transformation.merge(@NonNull Flow.Publisher<? extends @NonNull T> source1, @NonNull Flow.Publisher<? extends @NonNull T> source2, @NonNull Flow.Publisher<? extends @NonNull T> source3, @NonNull Flow.Publisher<? extends @NonNull T> source4) Flattens fourFlow.Publishers into a singlePublisher, without any transformation.merge(@NonNull Flow.Publisher<@NonNull ? extends Flow.Publisher<? extends @NonNull T>> sources) Flattens aFlow.Publisherthat emitsPublishers into a singlePublisherthat emits the items emitted by thosPublishers , without any transformation.merge(@NonNull Flow.Publisher<@NonNull ? extends Flow.Publisher<? extends @NonNull T>> sources, int maxConcurrency) Flattens aFlow.Publisherthat emitsPublishers into a singlePublisherthat emits the items emitted by thosePublishers, without any transformation, while limiting the maximum number of concurrent subscriptions to thesePublishers.mergeArray(int maxConcurrency, int bufferSize, @NonNull Flow.Publisher<? extends @NonNull T>... sources) Flattens an array ofFlow.Publishers into onePublisher, without any transformation, while limiting the number of concurrent subscriptions to thesePublishers.mergeArray(@NonNull Flow.Publisher<? extends @NonNull T>... sources) Flattens an array ofFlow.Publishers into onePublisher, without any transformation.mergeArrayDelayError(int maxConcurrency, int bufferSize, @NonNull Flow.Publisher<? extends @NonNull T>... sources) Flattens an array ofFlow.Publishers into onePublisher, in a way that allows aFlow.Subscriberto receive all successfully emitted items from each of the sourcePublishers without being interrupted by an error notification from one of them, while limiting the number of concurrent subscriptions to thesePublishers.mergeArrayDelayError(@NonNull Flow.Publisher<? extends @NonNull T>... sources) Flattens an array ofFlow.Publishers into oneFlowable, in a way that allows aFlow.Subscriberto receive all successfully emitted items from each of the sourcePublishers without being interrupted by an error notification from one of them.mergeDelayError(@NonNull Iterable<@NonNull ? extends Flow.Publisher<? extends @NonNull T>> sources) Flattens anIterableofFlow.Publishers into onePublisher, in a way that allows aFlow.Subscriberto receive all successfully emitted items from each of the sourcePublishers without being interrupted by an error notification from one of them.mergeDelayError(@NonNull Iterable<@NonNull ? extends Flow.Publisher<? extends @NonNull T>> sources, int maxConcurrency) Flattens anIterableofFlow.Publishers into onePublisher, in a way that allows aFlow.Subscriberto receive all successfully emitted items from each of the sourcePublishers without being interrupted by an error notification from one of them, while limiting the number of concurrent subscriptions to thesePublishers.mergeDelayError(@NonNull Iterable<@NonNull ? extends Flow.Publisher<? extends @NonNull T>> sources, int maxConcurrency, int bufferSize) Flattens anIterableofFlow.Publishers into onePublisher, in a way that allows aFlow.Subscriberto receive all successfully emitted items from each of the sourcePublishers without being interrupted by an error notification from one of them, while limiting the number of concurrent subscriptions to thesePublishers.mergeDelayError(@NonNull Flow.Publisher<? extends @NonNull T> source1, @NonNull Flow.Publisher<? extends @NonNull T> source2) Flattens twoFlow.Publishers into onePublisher, in a way that allows aFlow.Subscriberto receive all successfully emitted items from each of the sourcePublishers without being interrupted by an error notification from one of them.mergeDelayError(@NonNull Flow.Publisher<? extends @NonNull T> source1, @NonNull Flow.Publisher<? extends @NonNull T> source2, @NonNull Flow.Publisher<? extends @NonNull T> source3) Flattens threeFlow.Publishers into onePublisher, in a way that allows aFlow.Subscriberto receive all successfully emitted items from all of the sourcePublishers without being interrupted by an error notification from one of them.mergeDelayError(@NonNull Flow.Publisher<? extends @NonNull T> source1, @NonNull Flow.Publisher<? extends @NonNull T> source2, @NonNull Flow.Publisher<? extends @NonNull T> source3, @NonNull Flow.Publisher<? extends @NonNull T> source4) Flattens fourFlow.Publishers into onePublisher, in a way that allows aFlow.Subscriberto receive all successfully emitted items from all of the sourcePublishers without being interrupted by an error notification from one of them.mergeDelayError(@NonNull Flow.Publisher<@NonNull ? extends Flow.Publisher<? extends @NonNull T>> sources) Flattens aFlow.Publisherthat emitsPublishers into onePublisher, in a way that allows aFlow.Subscriberto receive all successfully emitted items from all of the sourcePublishers without being interrupted by an error notification from one of them.mergeDelayError(@NonNull Flow.Publisher<@NonNull ? extends Flow.Publisher<? extends @NonNull T>> sources, int maxConcurrency) Flattens aFlow.Publisherthat emitsPublishers into onePublisher, in a way that allows aFlow.Subscriberto receive all successfully emitted items from all of the sourcePublishers without being interrupted by an error notification from one of them, while limiting the number of concurrent subscriptions to thesePublishers.mergeWith(@NonNull CompletableSource other) Relays the items of thisFlowableand completes only when the otherCompletableSourcecompletes as well.mergeWith(@NonNull MaybeSource<? extends @NonNull T> other) Merges the sequence of items of thisFlowablewith the success value of the otherMaybeSourceor waits for both to complete normally if theMaybeSourceis empty.mergeWith(@NonNull SingleSource<? extends @NonNull T> other) Merges the sequence of items of thisFlowablewith the success value of the otherSingleSource.mergeWith(@NonNull Flow.Publisher<? extends @NonNull T> other) Flattens this and anotherFlow.Publisherinto a singlePublisher, without any transformation.never()Returns aFlowablethat never sends any items or notifications to aFlow.Subscriber.Signals the items and terminal signals of the currentFlowableon the specifiedScheduler, asynchronously with a bounded buffer ofFlowable.bufferSize()slots.Signals the items and terminal signals of the currentFlowableon the specifiedScheduler, asynchronously with a bounded buffer and optionally delaysonErrornotifications.Signals the items and terminal signals of the currentFlowableon the specifiedScheduler, asynchronously with a bounded buffer of configurable size and optionally delaysonErrornotifications.Filters the items emitted by the currentFlowable, only emitting those of the specified type.Buffers an unlimited number of items from the currentFlowableand allows it to emit as fast it can while allowing the downstream to consume the items at its own place.onBackpressureBuffer(boolean delayError) Buffers an unlimited number of items from the currentFlowableand allows it to emit as fast it can while allowing the downstream to consume the items at its own place, optionally delaying an error until all buffered items have been consumed.onBackpressureBuffer(int capacity) Buffers an limited number of items from the currentFlowableand allows it to emit as fast it can while allowing the downstream to consume the items at its own place, however, the resultingFlowablewill signal aMissingBackpressureExceptionviaonErroras soon as the buffer's capacity is exceeded, dropping all undelivered items, and canceling the flow.onBackpressureBuffer(int capacity, boolean delayError) Buffers an limited number of items from the currentFlowableand allows it to emit as fast it can while allowing the downstream to consume the items at its own place, however, the resultingFlowablewill signal aMissingBackpressureExceptionviaonErroras soon as the buffer's capacity is exceeded, dropping all undelivered items, and canceling the flow.onBackpressureBuffer(int capacity, boolean delayError, boolean unbounded) Buffers an optionally unlimited number of items from the currentFlowableand allows it to emit as fast it can while allowing the downstream to consume the items at its own place.onBackpressureBuffer(int capacity, boolean delayError, boolean unbounded, @NonNull Action onOverflow) Buffers an optionally unlimited number of items from the currentFlowableand allows it to emit as fast it can while allowing the downstream to consume the items at its own place.onBackpressureBuffer(int capacity, boolean delayError, boolean unbounded, @NonNull Action onOverflow, @NonNull Consumer<? super @NonNull T> onDropped) Buffers an optionally unlimited number of items from the currentFlowableand allows it to emit as fast it can while allowing the downstream to consume the items at its own place.onBackpressureBuffer(int capacity, @NonNull Action onOverflow) Buffers an limited number of items from the currentFlowableand allows it to emit as fast it can while allowing the downstream to consume the items at its own place, however, the resultingFlowablewill signal aMissingBackpressureExceptionviaonErroras soon as the buffer's capacity is exceeded, dropping all undelivered items, canceling the flow and calling theonOverflowaction.onBackpressureBuffer(long capacity, @Nullable Action onOverflow, @NonNull BackpressureOverflowStrategy overflowStrategy) Buffers an optionally unlimited number of items from the currentFlowableand allows it to emit as fast it can while allowing the downstream to consume the items at its own place.onBackpressureBuffer(long capacity, @Nullable Action onOverflow, @NonNull BackpressureOverflowStrategy overflowStrategy, @NonNull Consumer<? super @NonNull T> onDropped) Buffers an optionally unlimited number of items from the currentFlowableand allows it to emit as fast it can while allowing the downstream to consume the items at its own place.Drops items from the currentFlowableif the downstream is not ready to receive new items (indicated by a lack ofFlow.Subscription.request(long)calls from it).onBackpressureDrop(@NonNull Consumer<? super @NonNull T> onDrop) Drops items from the currentFlowableif the downstream is not ready to receive new items (indicated by a lack ofFlow.Subscription.request(long)calls from it) and calls the givenConsumerwith such dropped items.Drops all but the latest item emitted by the currentFlowableif the downstream is not ready to receive new items (indicated by a lack ofFlow.Subscription.request(long)calls from it) and emits this latest item when the downstream becomes ready.onBackpressureLatest(@NonNull Consumer<? super @NonNull T> onDropped) Drops all but the latest item emitted by the currentFlowableif the downstream is not ready to receive new items (indicated by a lack ofFlow.Subscription.request(long)calls from it) and emits this latest item when the downstream becomes ready.onBackpressureReduce(@NonNull BiFunction<@NonNull T, @NonNull T, @NonNull T> reducer) Reduces a sequence of two not emitted values via a function into a single value if the downstream is not ready to receive new items (indicated by a lack ofFlow.Subscription.request(long)calls from it) and emits this latest item when the downstream becomes ready.onBackpressureReduce(@NonNull Supplier<@NonNull R> supplier, @NonNull BiFunction<@NonNull R, ? super @NonNull T, @NonNull R> reducer) Reduces upstream values into an aggregate value, provided by a supplier and combined via a reducer function, while the downstream is not ready to receive items, then emits this aggregate value when the downstream becomes ready.Returns aFlowableinstance that if the currentFlowableemits an error, it will emit anonCompleteand swallow the throwable.onErrorComplete(@NonNull Predicate<? super Throwable> predicate) Returns aFlowableinstance that if the currentFlowableemits an error and the predicate returnstrue, it will emit anonCompleteand swallow the throwable.onErrorResumeNext(@NonNull Function<? super Throwable, @NonNull ? extends Flow.Publisher<? extends @NonNull T>> fallbackSupplier) Resumes the flow with aFlow.Publisherreturned for the failureThrowableof the currentFlowableby a function instead of signaling the error viaonError.onErrorResumeWith(@NonNull Flow.Publisher<? extends @NonNull T> fallback) Resumes the flow with the givenFlow.Publisherwhen the currentFlowablefails instead of signaling the error viaonError.Ends the flow with a last item returned by a function for theThrowableerror signaled by the currentFlowableinstead of signaling the error viaonError.onErrorReturnItem(@NonNull T item) Ends the flow with the given last item when the currentFlowablefails instead of signaling the error viaonError.Nulls out references to the upstream producer and downstreamFlow.Subscriberif the sequence is terminated or downstream cancels.final @NonNull ParallelFlowable<T> parallel()Parallelizes the flow by creating multiple 'rails' (equal to the number of CPUs) and dispatches the upstream items to them in a round-robin fashion.final @NonNull ParallelFlowable<T> parallel(int parallelism) Parallelizes the flow by creating the specified number of 'rails' and dispatches the upstream items to them in a round-robin fashion.final @NonNull ParallelFlowable<T> parallel(int parallelism, int prefetch) Parallelizes the flow by creating the specified number of 'rails' and dispatches the upstream items to them in a round-robin fashion and uses the defined per-'rail' prefetch amount.final @NonNull ConnectableFlowable<T> publish()Returns aConnectableFlowable, which is a variety ofFlow.Publisherthat waits until itsconnectmethod is called before it begins emitting items to thoseFlow.Subscribers that have subscribed to it.final @NonNull ConnectableFlowable<T> publish(int bufferSize) Returns aConnectableFlowable, which is a variety ofFlow.Publisherthat waits until itsconnectmethod is called before it begins emitting items to thoseFlow.Subscribers that have subscribed to it.publish(@NonNull Function<? super Flowable<@NonNull T>, @NonNull ? extends Flow.Publisher<? extends @NonNull R>> selector, int prefetch) Returns aFlowablethat emits the results of invoking a specified selector on items emitted by aConnectableFlowablethat shares a single subscription to the underlying sequence.publish(@NonNull Function<? super Flowable<@NonNull T>, @NonNull ? extends Flow.Publisher<@NonNull R>> selector) Returns aFlowablethat emits the results of invoking a specified selector on items emitted by aConnectableFlowablethat shares a single subscription to the underlying sequence.range(int start, int count) Returns aFlowablethat emits a sequence ofIntegers within a specified range.rangeLong(long start, long count) Returns aFlowablethat emits a sequence ofLongs within a specified range.rebatchRequests(int n) Requestsninitially from the upstream and then 75% ofnsubsequently after 75% ofnvalues have been emitted to the downstream.Returns aMaybethat applies a specified accumulator function to the first item emitted by the currentFlowable, then feeds the result of that function along with the second item emitted by the currentFlowableinto the same function, and so on until all items have been emitted by the current and finiteFlowable, and emits the final result from the final call to your function as its sole item.Returns aSinglethat applies a specified accumulator function to the first item emitted by the currentFlowableand a specified seed value, then feeds the result of that function along with the second item emitted by the currentFlowableinto the same function, and so on until all items have been emitted by the current and finiteFlowable, emitting the final result from the final call to your function as its sole item.reduceWith(@NonNull Supplier<@NonNull R> seedSupplier, @NonNull BiFunction<@NonNull R, ? super @NonNull T, @NonNull R> reducer) Returns aSinglethat applies a specified accumulator function to the first item emitted by the currentFlowableand a seed value derived from calling a specifiedseedSupplier, then feeds the result of that function along with the second item emitted by the currentFlowableinto the same function, and so on until all items have been emitted by the current and finiteFlowable, emitting the final result from the final call to your function as its sole item.repeat()Returns aFlowablethat repeats the sequence of items emitted by the currentFlowableindefinitely.repeat(long times) Returns aFlowablethat repeats the sequence of items emitted by the currentFlowableat mostcounttimes.Returns aFlowablethat repeats the sequence of items emitted by the currentFlowableuntil the provided stop function returnstrue.repeatWhen(@NonNull Function<? super Flowable<Object>, @NonNull ? extends Flow.Publisher<@NonNull ?>> handler) Returns aFlowablethat emits the same values as the currentFlowablewith the exception of anonComplete.final @NonNull ConnectableFlowable<T> replay()Returns aConnectableFlowablethat shares a single subscription to the underlyingFlow.Publisherthat will replay all of its items and notifications to any futureFlow.Subscriber.final @NonNull ConnectableFlowable<T> replay(int bufferSize) Returns aConnectableFlowablethat shares a single subscription to the currentFlowableand replays at mostbufferSizeitems to lateFlow.Subscribers.final @NonNull ConnectableFlowable<T> replay(int bufferSize, boolean eagerTruncate) Returns aConnectableFlowablethat shares a single subscription to the currentFlowableand replays at mostbufferSizeitems to lateFlow.Subscribers.final @NonNull ConnectableFlowable<T> Returns aConnectableFlowablethat shares a single subscription to the currentFlowableand replays at mostbufferSizeitems that were emitted during a specified time window.final @NonNull ConnectableFlowable<T> Returns aConnectableFlowablethat shares a single subscription to the currentFlowableand replays a maximum ofbufferSizeitems that are emitted within a specified time window to lateFlow.Subscribers.final @NonNull ConnectableFlowable<T> replay(int bufferSize, long time, @NonNull TimeUnit unit, @NonNull Scheduler scheduler, boolean eagerTruncate) Returns aConnectableFlowablethat shares a single subscription to the currentFlowableand replays a maximum ofbufferSizeitems that are emitted within a specified time window to lateFlow.Subscribers.final @NonNull ConnectableFlowable<T> Returns aConnectableFlowablethat shares a single subscription to the currentFlowableand replays all items emitted by it within a specified time window to lateFlow.Subscribers.final @NonNull ConnectableFlowable<T> Returns aConnectableFlowablethat shares a single subscription to the currentFlowableand replays all items emitted by it within a specified time window to lateFlow.Subscribers.final @NonNull ConnectableFlowable<T> Returns aConnectableFlowablethat shares a single subscription to the currentFlowableand replays all items emitted by it within a specified time window to lateFlow.Subscribers.replay(@NonNull Function<? super Flowable<@NonNull T>, @NonNull ? extends Flow.Publisher<@NonNull R>> selector) Returns aFlowablethat emits items that are the results of invoking a specified selector on the items emitted by aConnectableFlowablethat shares a single subscription to the currentFlowable.replay(@NonNull Function<? super Flowable<@NonNull T>, @NonNull ? extends Flow.Publisher<@NonNull R>> selector, int bufferSize) Returns aFlowablethat emits items that are the results of invoking a specified selector on items emitted by aConnectableFlowablethat shares a single subscription to the currentFlowable, replayingbufferSizenotifications.replay(@NonNull Function<? super Flowable<@NonNull T>, @NonNull ? extends Flow.Publisher<@NonNull R>> selector, int bufferSize, boolean eagerTruncate) Returns aFlowablethat emits items that are the results of invoking a specified selector on items emitted by aConnectableFlowablethat shares a single subscription to the currentFlowable, replayingbufferSizenotifications.replay(@NonNull Function<? super Flowable<@NonNull T>, @NonNull ? extends Flow.Publisher<@NonNull R>> selector, int bufferSize, long time, @NonNull TimeUnit unit) Returns aFlowablethat emits items that are the results of invoking a specified selector on items emitted by aConnectableFlowablethat shares a single subscription to the currentFlowable, replaying no more thanbufferSizeitems that were emitted within a specified time window.replay(@NonNull Function<? super Flowable<@NonNull T>, @NonNull ? extends Flow.Publisher<@NonNull R>> selector, int bufferSize, long time, @NonNull TimeUnit unit, @NonNull Scheduler scheduler) Returns aFlowablethat emits items that are the results of invoking a specified selector on items emitted by aConnectableFlowablethat shares a single subscription to the currentFlowable, replaying no more thanbufferSizeitems that were emitted within a specified time window.replay(@NonNull Function<? super Flowable<@NonNull T>, @NonNull ? extends Flow.Publisher<@NonNull R>> selector, int bufferSize, long time, @NonNull TimeUnit unit, @NonNull Scheduler scheduler, boolean eagerTruncate) Returns aFlowablethat emits items that are the results of invoking a specified selector on items emitted by aConnectableFlowablethat shares a single subscription to the currentFlowable, replaying no more thanbufferSizeitems that were emitted within a specified time window.replay(@NonNull Function<? super Flowable<@NonNull T>, @NonNull ? extends Flow.Publisher<@NonNull R>> selector, long time, @NonNull TimeUnit unit) Returns aFlowablethat emits items that are the results of invoking a specified selector on items emitted by aConnectableFlowablethat shares a single subscription to the currentFlowable, replaying all items that were emitted within a specified time window.replay(@NonNull Function<? super Flowable<@NonNull T>, @NonNull ? extends Flow.Publisher<@NonNull R>> selector, long time, @NonNull TimeUnit unit, @NonNull Scheduler scheduler) Returns aFlowablethat emits items that are the results of invoking a specified selector on items emitted by aConnectableFlowablethat shares a single subscription to the currentFlowable, replaying all items that were emitted within a specified time window.replay(@NonNull Function<? super Flowable<@NonNull T>, @NonNull ? extends Flow.Publisher<@NonNull R>> selector, long time, @NonNull TimeUnit unit, @NonNull Scheduler scheduler, boolean eagerTruncate) Returns aFlowablethat emits items that are the results of invoking a specified selector on items emitted by aConnectableFlowablethat shares a single subscription to the currentFlowable, replaying all items that were emitted within a specified time window.retry()Returns aFlowablethat mirrors the currentFlowable, resubscribing to it if it callsonError(infinite retry count).retry(long times) Returns aFlowablethat mirrors the currentFlowable, resubscribing to it if it callsonErrorup to a specified number of retries.Retries at most times or until the predicate returnsfalse, whichever happens first.Returns aFlowablethat mirrors the currentFlowable, resubscribing to it if it callsonErrorand the predicate returnstruefor that specific exception and retry count.Retries the currentFlowableif the predicate returnstrue.Retries until the given stop function returnstrue.retryWhen(@NonNull Function<? super Flowable<Throwable>, @NonNull ? extends Flow.Publisher<@NonNull ?>> handler) Returns aFlowablethat emits the same values as the currentFlowablewith the exception of anonError.final voidsafeSubscribe(@NonNull Flow.Subscriber<? super @NonNull T> subscriber) Subscribes to the currentFlowableand wraps the givenFlow.Subscriberinto aSafeSubscriber(if not already aSafeSubscriber) that deals with exceptions thrown by a misbehavingSubscriber(that doesn't follow the Reactive Streams specification).Returns aFlowablethat emits the most recently emitted item (if any) emitted by the currentFlowablewithin periodic time intervals.Returns aFlowablethat emits the most recently emitted item (if any) emitted by the currentFlowablewithin periodic time intervals and optionally emit the very last upstream item when the upstream completes.Returns aFlowablethat emits the most recently emitted item (if any) emitted by the currentFlowablewithin periodic time intervals, where the intervals are defined on a particularScheduler.Returns aFlowablethat emits the most recently emitted item (if any) emitted by the currentFlowablewithin periodic time intervals, where the intervals are defined on a particularSchedulerand optionally emit the very last upstream item when the upstream completes.sample(long period, @NonNull TimeUnit unit, @NonNull Scheduler scheduler, boolean emitLast, @NonNull Consumer<? super @NonNull T> onDropped) Returns aFlowablethat emits the most recently emitted item (if any) emitted by the currentFlowablewithin periodic time intervals, where the intervals are defined on a particularSchedulerand optionally emit the very last upstream item when the upstream completes.sample(@NonNull Flow.Publisher<@NonNull U> sampler) Returns aFlowablethat, when the specifiedsamplerFlow.Publisheremits an item or completes, emits the most recently emitted item (if any) emitted by the currentFlowablesince the previous emission from thesamplerPublisher.sample(@NonNull Flow.Publisher<@NonNull U> sampler, boolean emitLast) Returns aFlowablethat, when the specifiedsamplerFlow.Publisheremits an item or completes, emits the most recently emitted item (if any) emitted by the currentFlowablesince the previous emission from thesamplerPublisherand optionally emit the very last upstream item when the upstream or otherPublishercomplete.Returns aFlowablethat emits the first value emitted by the currentFlowable, then emits one value for each subsequent value emitted by the currentFlowable.scan(@NonNull R initialValue, @NonNull BiFunction<@NonNull R, ? super @NonNull T, @NonNull R> accumulator) Returns aFlowablethat emits the provided initial (seed) value, then emits one value for each value emitted by the currentFlowable.scanWith(@NonNull Supplier<@NonNull R> seedSupplier, @NonNull BiFunction<@NonNull R, ? super @NonNull T, @NonNull R> accumulator) Returns aFlowablethat emits the provided initial (seed) value, then emits one value for each value emitted by the currentFlowable.sequenceEqual(@NonNull Flow.Publisher<? extends @NonNull T> source1, @NonNull Flow.Publisher<? extends @NonNull T> source2) Returns aSinglethat emits aBooleanvalue that indicates whether twoFlow.Publishersequences are the same by comparing the items emitted by eachPublisherpairwise.sequenceEqual(@NonNull Flow.Publisher<? extends @NonNull T> source1, @NonNull Flow.Publisher<? extends @NonNull T> source2, int bufferSize) Returns aSinglethat emits aBooleanvalue that indicates whether twoFlow.Publishersequences are the same by comparing the items emitted by eachPublisherpairwise.sequenceEqual(@NonNull Flow.Publisher<? extends @NonNull T> source1, @NonNull Flow.Publisher<? extends @NonNull T> source2, @NonNull BiPredicate<? super @NonNull T, ? super @NonNull T> isEqual) Returns aSinglethat emits aBooleanvalue that indicates whether twoFlow.Publishersequences are the same by comparing the items emitted by eachPublisherpairwise based on the results of a specified equality function.sequenceEqual(@NonNull Flow.Publisher<? extends @NonNull T> source1, @NonNull Flow.Publisher<? extends @NonNull T> source2, @NonNull BiPredicate<? super @NonNull T, ? super @NonNull T> isEqual, int bufferSize) Returns aSinglethat emits aBooleanvalue that indicates whether twoFlow.Publishersequences are the same by comparing the items emitted by eachPublisherpairwise based on the results of a specified equality function.Forces the currentFlowable's emissions and notifications to be serialized and for it to obey thePublishercontract in other ways.share()Returns a newFlowablethat multicasts (and shares a single subscription to) the currentFlowable.Returns aSinglethat emits the single item emitted by the currentFlowableif it emits only a single item, or a default item if the currentFlowableemits no items.Returns aMaybethat completes if thisFlowableis empty, signals one item if thisFlowablesignals exactly one item or signals anIllegalArgumentExceptionif thisFlowablesignals more than one item.Returns aSinglethat emits the single item emitted by thisFlowable, if thisFlowableemits only a single item, otherwise if thisFlowablecompletes without emitting any items aNoSuchElementExceptionwill be signaled and if thisFlowableemits more than one item, anIllegalArgumentExceptionwill be signaled.final @NonNull CompletionStage<T> Signals the only expected upstream item, aNoSuchElementExceptionif the upstream is empty or signalsIllegalArgumentExceptionif the upstream has more than one item via aCompletionStage.final @NonNull CompletionStage<T> singleStage(@NonNull T defaultItem) Signals the only expected upstream item (or the default item if the upstream is empty) or signalsIllegalArgumentExceptionif the upstream has more than one item via aCompletionStage.skip(long count) Returns aFlowablethat skips the firstcountitems emitted by the currentFlowableand emits the remainder.Returns aFlowablethat skips values emitted by the currentFlowablebefore a specified time window elapses.Returns aFlowablethat skips values emitted by the currentFlowablebefore a specified time window on a specifiedSchedulerelapses.skipLast(int count) Returns aFlowablethat drops a specified number of items from the end of the sequence emitted by the currentFlowable.Returns aFlowablethat drops items emitted by the currentFlowableduring a specified time window before the source completes.Returns aFlowablethat drops items emitted by the currentFlowableduring a specified time window before the source completes.Returns aFlowablethat drops items emitted by the currentFlowableduring a specified time window (defined on a specified scheduler) before the source completes.Returns aFlowablethat drops items emitted by the currentFlowableduring a specified time window (defined on a specified scheduler) before the source completes.skipLast(long time, @NonNull TimeUnit unit, @NonNull Scheduler scheduler, boolean delayError, int bufferSize) Returns aFlowablethat drops items emitted by the currentFlowableduring a specified time window (defined on a specified scheduler) before the source completes.skipUntil(@NonNull Flow.Publisher<@NonNull U> other) Returns aFlowablethat skips items emitted by the currentFlowableuntil a secondFlow.Publisheremits an item.Returns aFlowablethat skips all items emitted by the currentFlowableas long as a specified condition holdstrue, but emits all further source items as soon as the condition becomesfalse.sorted()Returns aFlowablethat emits the events emitted by sourceFlow.Publisher, in a sorted order.Returns aFlowablethat emits the events emitted by sourceFlow.Publisher, in a sorted order based on a specified comparison function.startWith(@NonNull CompletableSource other) Returns aFlowablewhich first runs the otherCompletableSourcethen the currentFlowableif the other completed normally.startWith(@NonNull MaybeSource<@NonNull T> other) Returns aFlowablewhich first runs the otherMaybeSourcethen the currentFlowableif the other succeeded or completed normally.startWith(@NonNull SingleSource<@NonNull T> other) Returns aFlowablewhich first runs the otherSingleSourcethen the currentFlowableif the other succeeded normally.startWith(@NonNull Flow.Publisher<? extends @NonNull T> other) Returns aFlowablethat emits the items in a specifiedFlow.Publisherbefore it begins to emit items emitted by the currentFlowable.startWithArray(@NonNull T... items) Returns aFlowablethat emits the specified items before it begins to emit items emitted by the currentFlowable.startWithItem(@NonNull T item) Returns aFlowablethat emits a specified item before it begins to emit items emitted by the currentFlowable.startWithIterable(@NonNull Iterable<? extends @NonNull T> items) Returns aFlowablethat emits the items in a specifiedIterablebefore it begins to emit items emitted by the currentFlowable.final @NonNull DisposableSubscribes to the currentFlowableand ignoresonNextandonCompleteemissions.final voidsubscribe(@NonNull FlowableSubscriber<? super @NonNull T> subscriber) Establish a connection between thisFlowableand the givenFlowableSubscriberand start streaming events based on the demand of theFlowableSubscriber.final @NonNull DisposableSubscribes to the currentFlowableand provides a callback to handle the items it emits.final @NonNull Disposablesubscribe(@NonNull Consumer<? super @NonNull T> onNext, @NonNull Consumer<? super Throwable> onError) Subscribes to the currentFlowableand provides callbacks to handle the items it emits and any error notification it issues.final @NonNull Disposablesubscribe(@NonNull Consumer<? super @NonNull T> onNext, @NonNull Consumer<? super Throwable> onError, @NonNull Action onComplete) Subscribes to the currentFlowableand provides callbacks to handle the items it emits and any error or completion notification it issues.final @NonNull Disposablesubscribe(@NonNull Consumer<? super @NonNull T> onNext, @NonNull Consumer<? super Throwable> onError, @NonNull Action onComplete, @NonNull DisposableContainer container) Wraps the given onXXX callbacks into aDisposableFlow.Subscriber, adds it to the givenDisposableContainerand ensures, that if the upstream terminates or this particularDisposableis disposed, theSubscriberis removed from the given container.final voidsubscribe(@NonNull Flow.Subscriber<? super @NonNull T> subscriber) subscribeOn(@NonNull Scheduler scheduler) subscribeOn(@NonNull Scheduler scheduler, boolean requestOn) Asynchronously subscribesFlow.Subscribers to the currentFlowableon the specifiedScheduleroptionally reroutes requests from other threads to the sameSchedulerthread.final <@NonNull E extends Flow.Subscriber<? super @NonNull T>>
EsubscribeWith(@NonNull E subscriber) Subscribes a givenFlow.Subscriber(subclass) to thisFlowableand returns the givenSubscriberas is.switchIfEmpty(@NonNull Flow.Publisher<? extends @NonNull T> other) Returns aFlowablethat emits the items emitted by the currentFlowableor the items of an alternateFlow.Publisherif the currentFlowableis empty.switchMap(@NonNull Function<? super @NonNull T, @NonNull ? extends Flow.Publisher<? extends @NonNull R>> mapper) Returns a newFlowableby applying a function that you supply to each item emitted by the currentFlowablethat returns aFlow.Publisher, and then emitting the items emitted by the most recently emitted of thesePublishers.switchMap(@NonNull Function<? super @NonNull T, @NonNull ? extends Flow.Publisher<? extends @NonNull R>> mapper, int bufferSize) Returns a newFlowableby applying a function that you supply to each item emitted by the currentFlowablethat returns aFlow.Publisher, and then emitting the items emitted by the most recently emitted of thesePublishers.final @NonNull CompletableswitchMapCompletable(@NonNull Function<? super @NonNull T, ? extends CompletableSource> mapper) Maps the upstream values intoCompletableSources, subscribes to the newer one while disposing the subscription to the previousCompletableSource, thus keeping at most one activeCompletableSourcerunning.final @NonNull CompletableswitchMapCompletableDelayError(@NonNull Function<? super @NonNull T, ? extends CompletableSource> mapper) Maps the upstream values intoCompletableSources, subscribes to the newer one while disposing the subscription to the previousCompletableSource, thus keeping at most one activeCompletableSourcerunning and delaying any main or inner errors until all of them terminate.switchMapDelayError(@NonNull Function<? super @NonNull T, @NonNull ? extends Flow.Publisher<? extends @NonNull R>> mapper) Returns a newFlowableby applying a function that you supply to each item emitted by the currentFlowablethat returns aFlow.Publisher, and then emitting the items emitted by the most recently emitted of thesePublishers and delays any error until allPublishers terminate.switchMapDelayError(@NonNull Function<? super @NonNull T, @NonNull ? extends Flow.Publisher<? extends @NonNull R>> mapper, int bufferSize) Returns a newFlowableby applying a function that you supply to each item emitted by the currentFlowablethat returns aFlow.Publisher, and then emitting the items emitted by the most recently emitted of thesePublishers and delays any error until allPublishers terminate.switchMapMaybe(@NonNull Function<? super @NonNull T, ? extends MaybeSource<? extends @NonNull R>> mapper) Maps the upstream items intoMaybeSources and switches (subscribes) to the newer ones while disposing the older ones (and ignoring their signals) and emits the latest success value of the current one if available while failing immediately if thisFlowableor any of the active innerMaybeSources fail.switchMapMaybeDelayError(@NonNull Function<? super @NonNull T, ? extends MaybeSource<? extends @NonNull R>> mapper) Maps the upstream items intoMaybeSources and switches (subscribes) to the newer ones while disposing the older ones (and ignoring their signals) and emits the latest success value of the current one if available, delaying errors from thisFlowableor the innerMaybeSources until all terminate.switchMapSingle(@NonNull Function<? super @NonNull T, ? extends SingleSource<? extends @NonNull R>> mapper) Maps the upstream items intoSingleSources and switches (subscribes) to the newer ones while disposing the older ones (and ignoring their signals) and emits the latest success value of the current one while failing immediately if thisFlowableor any of the active innerSingleSources fail.switchMapSingleDelayError(@NonNull Function<? super @NonNull T, ? extends SingleSource<? extends @NonNull R>> mapper) Maps the upstream items intoSingleSources and switches (subscribes) to the newer ones while disposing the older ones (and ignoring their signals) and emits the latest success value of the current one, delaying errors from thisFlowableor the innerSingleSources until all terminate.switchOnNext(@NonNull Flow.Publisher<? extends Flow.Publisher<? extends @NonNull T>> sources, int bufferSize) Converts aFlow.Publisherthat emitsPublishers into aPublisherthat emits the items emitted by the most recently emitted of thosePublishers.switchOnNext(@NonNull Flow.Publisher<@NonNull ? extends Flow.Publisher<? extends @NonNull T>> sources) Converts aFlow.Publisherthat emitsPublishers into aPublisherthat emits the items emitted by the most recently emitted of thosePublishers.switchOnNextDelayError(@NonNull Flow.Publisher<@NonNull ? extends Flow.Publisher<? extends @NonNull T>> sources) Converts aFlow.Publisherthat emitsPublishers into aPublisherthat emits the items emitted by the most recently emitted of thosePublishers and delays any exception until allPublishers terminate.switchOnNextDelayError(@NonNull Flow.Publisher<@NonNull ? extends Flow.Publisher<? extends @NonNull T>> sources, int prefetch) Converts aFlow.Publisherthat emitsPublishers into aPublisherthat emits the items emitted by the most recently emitted of thosePublishers and delays any exception until allPublishers terminate.take(long count) Returns aFlowablethat emits only the firstcountitems emitted by the currentFlowable.Returns aFlowablethat emits those items emitted by sourceFlow.Publisherbefore a specified time runs out.Returns aFlowablethat emits those items emitted by sourceFlow.Publisherbefore a specified time (on a specifiedScheduler) runs out.takeLast(int count) Returns aFlowablethat emits at most the lastcountitems emitted by the currentFlowable.Returns aFlowablethat emits at most a specified number of items from the currentFlowablethat were emitted in a specified window of time before the currentFlowablecompleted.Returns aFlowablethat emits at most a specified number of items from the currentFlowablethat were emitted in a specified window of time before the currentFlowablecompleted, where the timing information is provided by a givenScheduler.takeLast(long count, long time, @NonNull TimeUnit unit, @NonNull Scheduler scheduler, boolean delayError, int bufferSize) Returns aFlowablethat emits at most a specified number of items from the currentFlowablethat were emitted in a specified window of time before the currentFlowablecompleted, where the timing information is provided by a givenScheduler.Returns aFlowablethat emits the items from the currentFlowablethat were emitted in a specified window of time before the currentFlowablecompleted.Returns aFlowablethat emits the items from the currentFlowablethat were emitted in a specified window of time before the currentFlowablecompleted.Returns aFlowablethat emits the items from the currentFlowablethat were emitted in a specified window of time before the currentFlowablecompleted, where the timing information is provided by a specifiedScheduler.Returns aFlowablethat emits the items from the currentFlowablethat were emitted in a specified window of time before the currentFlowablecompleted, where the timing information is provided by a specifiedScheduler.takeLast(long time, @NonNull TimeUnit unit, @NonNull Scheduler scheduler, boolean delayError, int bufferSize) Returns aFlowablethat emits the items from the currentFlowablethat were emitted in a specified window of time before the currentFlowablecompleted, where the timing information is provided by a specifiedScheduler.Returns aFlowablethat emits items emitted by the currentFlowable, checks the specified predicate for each item, and then completes when the condition is satisfied.takeUntil(@NonNull Flow.Publisher<@NonNull U> other) Returns aFlowablethat emits the items emitted by the currentFlowableuntil a secondFlow.Publisheremits an item or completes.Returns aFlowablethat emits items emitted by the currentFlowableso long as each item satisfied a specified condition, and then completes as soon as this condition is not satisfied.final @NonNull TestSubscriber<T> test()final @NonNull TestSubscriber<T> test(long initialRequest) Creates aTestSubscriberwith the given initial request amount and subscribes it to thisFlowable.final @NonNull TestSubscriber<T> test(long initialRequest, boolean cancel) Creates aTestSubscriberwith the given initial request amount, optionally cancels it before the subscription and subscribes it to thisFlowable.throttleFirst(long windowDuration, @NonNull TimeUnit unit) Returns aFlowablethat emits only the first item emitted by the currentFlowableduring sequential time windows of a specified duration.throttleFirst(long skipDuration, @NonNull TimeUnit unit, @NonNull Scheduler scheduler) Returns aFlowablethat emits only the first item emitted by the currentFlowableduring sequential time windows of a specified duration, where the windows are managed by a specifiedScheduler.throttleFirst(long skipDuration, @NonNull TimeUnit unit, @NonNull Scheduler scheduler, @NonNull Consumer<? super @NonNull T> onDropped) Returns aFlowablethat emits only the first item emitted by the currentFlowableduring sequential time windows of a specified duration, where the windows are managed by a specifiedScheduler.throttleLast(long intervalDuration, @NonNull TimeUnit unit) Returns aFlowablethat emits only the last item emitted by the currentFlowableduring sequential time windows of a specified duration.throttleLast(long intervalDuration, @NonNull TimeUnit unit, @NonNull Scheduler scheduler) Returns aFlowablethat emits only the last item emitted by the currentFlowableduring sequential time windows of a specified duration, where the duration is governed by a specifiedScheduler.throttleLast(long intervalDuration, @NonNull TimeUnit unit, @NonNull Scheduler scheduler, @NonNull Consumer<? super @NonNull T> onDropped) Returns aFlowablethat emits only the last item emitted by the currentFlowableduring sequential time windows of a specified duration, where the duration is governed by a specifiedScheduler.throttleLatest(long timeout, @NonNull TimeUnit unit) Throttles items from the upstreamFlowableby first emitting the next item from upstream, then periodically emitting the latest item (if any) when the specified timeout elapses between them.throttleLatest(long timeout, @NonNull TimeUnit unit, boolean emitLast) Throttles items from the upstreamFlowableby first emitting the next item from upstream, then periodically emitting the latest item (if any) when the specified timeout elapses between them.throttleLatest(long timeout, @NonNull TimeUnit unit, @NonNull Scheduler scheduler) Throttles items from the upstreamFlowableby first emitting the next item from upstream, then periodically emitting the latest item (if any) when the specified timeout elapses between them.throttleLatest(long timeout, @NonNull TimeUnit unit, @NonNull Scheduler scheduler, boolean emitLast) Throttles items from the upstreamFlowableby first emitting the next item from upstream, then periodically emitting the latest item (if any) when the specified timeout elapses between them.throttleLatest(long timeout, @NonNull TimeUnit unit, @NonNull Scheduler scheduler, boolean emitLast, @NonNull Consumer<? super @NonNull T> onDropped) Throttles items from the upstreamFlowableby first emitting the next item from upstream, then periodically emitting the latest item (if any) when the specified timeout elapses between them, invoking the consumer for any dropped item.throttleWithTimeout(long timeout, @NonNull TimeUnit unit) Returns aFlowablethat mirrors the currentFlowable, except that it drops items emitted by the currentFlowablethat are followed by newer items before a timeout value expires.throttleWithTimeout(long timeout, @NonNull TimeUnit unit, @NonNull Scheduler scheduler) Returns aFlowablethat mirrors the currentFlowable, except that it drops items emitted by the currentFlowablethat are followed by newer items before a timeout value expires on a specifiedScheduler.throttleWithTimeout(long timeout, @NonNull TimeUnit unit, @NonNull Scheduler scheduler, @NonNull Consumer<? super @NonNull T> onDropped) Returns aFlowablethat mirrors the currentFlowable, except that it drops items emitted by the currentFlowablethat are followed by newer items before a timeout value expires on a specifiedScheduler.Returns aFlowablethat emits records of the time interval between consecutive items emitted by the currentFlowable.timeInterval(@NonNull Scheduler scheduler) Returns aFlowablethat emits records of the time interval between consecutive items emitted by the currentFlowable, where this interval is computed on a specifiedScheduler.timeInterval(@NonNull TimeUnit unit) Returns aFlowablethat emits records of the time interval between consecutive items emitted by the currentFlowable.timeInterval(@NonNull TimeUnit unit, @NonNull Scheduler scheduler) Returns aFlowablethat emits records of the time interval between consecutive items emitted by the currentFlowable, where this interval is computed on a specifiedScheduler.Returns aFlowablethat mirrors the currentFlowablebut applies a timeout policy for each emitted item.Returns aFlowablethat mirrors the currentFlowablebut applies a timeout policy for each emitted item, where this policy is governed by a specifiedScheduler.timeout(long timeout, @NonNull TimeUnit unit, @NonNull Scheduler scheduler, @NonNull Flow.Publisher<? extends @NonNull T> fallback) Returns aFlowablethat mirrors the currentFlowablebut applies a timeout policy for each emitted item using a specifiedScheduler.timeout(long timeout, @NonNull TimeUnit unit, @NonNull Flow.Publisher<? extends @NonNull T> fallback) Returns aFlowablethat mirrors the currentFlowablebut applies a timeout policy for each emitted item.timeout(@NonNull Function<? super @NonNull T, @NonNull ? extends Flow.Publisher<@NonNull V>> itemTimeoutIndicator) Returns aFlowablethat mirrors the currentFlowable, but notifiesFlow.Subscribers of aTimeoutExceptionif an item emitted by the currentFlowabledoesn't arrive within a window of time after the emission of the previous item, where that period of time is measured by aFlow.Publisherthat is a function of the previous item.timeout(@NonNull Function<? super @NonNull T, @NonNull ? extends Flow.Publisher<@NonNull V>> itemTimeoutIndicator, @NonNull Flow.Publisher<? extends @NonNull T> fallback) Returns aFlowablethat mirrors the currentFlowable, but that switches to a fallbackFlow.Publisherif an item emitted by the currentFlowabledoesn't arrive within a window of time after the emission of the previous item, where that period of time is measured by aPublisherthat is a function of the previous item.timeout(@NonNull Flow.Publisher<@NonNull U> firstTimeoutIndicator, @NonNull Function<? super @NonNull T, @NonNull ? extends Flow.Publisher<@NonNull V>> itemTimeoutIndicator) Returns aFlowablethat mirrors the currentFlowable, but notifiesFlow.Subscribers of aTimeoutExceptionif either the first item emitted by the currentFlowableor any subsequent item doesn't arrive within time windows defined by otherFlow.Publishers.timeout(@NonNull Flow.Publisher<@NonNull U> firstTimeoutIndicator, @NonNull Function<? super @NonNull T, @NonNull ? extends Flow.Publisher<@NonNull V>> itemTimeoutIndicator, @NonNull Flow.Publisher<? extends @NonNull T> fallback) Returns aFlowablethat mirrors the currentFlowable, but switches to a fallbackFlow.Publisherif either the first item emitted by the currentFlowableor any subsequent item doesn't arrive within time windows defined by otherPublishers.Returns aFlowablethat emits0Lafter a specified delay, and then completes.Returns aFlowablethat emits0Lafter a specified delay, on a specifiedScheduler, and then completes.final <@NonNull R>
RCalls the specified converter function during assembly time and returns its resulting value.toFuture()Returns aFuturerepresenting the only value emitted by thisFlowable.toList()Returns aSinglethat emits a single item, a list composed of all the items emitted by the finite upstream sourceFlow.Publisher.toList(int capacityHint) Returns aSinglethat emits a single item, a list composed of all the items emitted by the finite sourceFlow.Publisher.Returns aSinglethat emits a single item, a list composed of all the items emitted by the finite sourceFlow.Publisher.Returns aSinglethat emits a singleHashMapcontaining all items emitted by the finite sourceFlow.Publisher, mapped by the keys returned by a specifiedkeySelectorfunction.toMap(@NonNull Function<? super @NonNull T, ? extends @NonNull K> keySelector, @NonNull Function<? super @NonNull T, ? extends @NonNull V> valueSelector) Returns aSinglethat emits a singleHashMapcontaining values corresponding to items emitted by the finite sourceFlow.Publisher, mapped by the keys returned by a specifiedkeySelectorfunction.toMap(@NonNull Function<? super @NonNull T, ? extends @NonNull K> keySelector, @NonNull Function<? super @NonNull T, ? extends @NonNull V> valueSelector, @NonNull Supplier<? extends Map<@NonNull K, @NonNull V>> mapSupplier) Returns aSinglethat emits a singleMap, returned by a specifiedmapFactoryfunction, that contains keys and values extracted from the items emitted by the finite sourceFlow.Publisher.Returns aSinglethat emits a singleHashMapthat contains anArrayListof items emitted by the finite sourceFlow.Publisherkeyed by a specifiedkeySelectorfunction.toMultimap(@NonNull Function<? super @NonNull T, ? extends @NonNull K> keySelector, @NonNull Function<? super @NonNull T, ? extends @NonNull V> valueSelector) Returns aSinglethat emits a singleHashMapthat contains anArrayListof values extracted by a specifiedvalueSelectorfunction from items emitted by the finite sourceFlow.Publisher, keyed by a specifiedkeySelectorfunction.toMultimap(@NonNull Function<? super @NonNull T, ? extends @NonNull K> keySelector, @NonNull Function<? super @NonNull T, ? extends @NonNull V> valueSelector, @NonNull Supplier<? extends Map<@NonNull K, Collection<@NonNull V>>> mapSupplier, @NonNull Function<? super @NonNull K, ? extends Collection<? super @NonNull V>> collectionFactory) Returns aSinglethat emits a singleMap, returned by a specifiedmapFactoryfunction, that contains a custom collection of values, extracted by a specifiedvalueSelectorfunction from items emitted by the finite sourceFlow.Publisher, and keyed by thekeySelectorfunction.toMultimap(@NonNull Function<? super @NonNull T, ? extends @NonNull K> keySelector, @NonNull Function<? super @NonNull T, ? extends @NonNull V> valueSelector, @NonNull Supplier<Map<@NonNull K, Collection<@NonNull V>>> mapSupplier) Returns aSinglethat emits a singleMap, returned by a specifiedmapFactoryfunction, that contains anArrayListof values, extracted by a specifiedvalueSelectorfunction from items emitted by the finite sourceFlow.Publisherand keyed by thekeySelectorfunction.final @NonNull Observable<T> Converts the currentFlowableinto a non-backpressuredObservable.Returns aSinglethat emits aListthat contains the items emitted by the finite sourceFlow.Publisher, in a sorted order.toSortedList(int capacityHint) Returns aSinglethat emits aListthat contains the items emitted by the finite sourceFlow.Publisher, in a sorted order.toSortedList(@NonNull Comparator<? super @NonNull T> comparator) Returns aSinglethat emits aListthat contains the items emitted by the finite sourceFlow.Publisher, in a sorted order based on a specified comparison function.toSortedList(@NonNull Comparator<? super @NonNull T> comparator, int capacityHint) Returns aSinglethat emits aListthat contains the items emitted by the finite sourceFlow.Publisher, in a sorted order based on a specified comparison function.final @NonNull Streamable<T> Converts thisFlowableinto aStreamableinstance, transparently relaying signals between the two async representations of a sequence.final @NonNull Streamable<T> toStreamable(ExecutorService executor) Converts thisFlowableinto aStreamableinstance, transparently relaying signals between the two async representations of a sequence.unsafeCreate(@NonNull Flow.Publisher<@NonNull T> onSubscribe) Create aFlowableby wrapping aFlow.Publisherwhich has to be implemented according to the Reactive Streams specification by handling backpressure and cancellation correctly; no safeguards are provided by theFlowableitself.unsubscribeOn(@NonNull Scheduler scheduler) Cancels the currentFlowableasynchronously by invokingFlow.Subscription.cancel()on the specifiedScheduler.using(@NonNull Supplier<? extends @NonNull D> resourceSupplier, @NonNull Function<? super @NonNull D, @NonNull ? extends Flow.Publisher<? extends @NonNull T>> sourceSupplier, @NonNull Consumer<? super @NonNull D> resourceCleanup) Constructs aFlowablethat creates a dependent resource object, aFlow.Publisherwith that resource and calls the providedresourceDisposerfunction if this inner source terminates or the downstream cancels the flow.using(@NonNull Supplier<? extends @NonNull D> resourceSupplier, @NonNull Function<? super @NonNull D, @NonNull ? extends Flow.Publisher<? extends @NonNull T>> sourceSupplier, @NonNull Consumer<? super @NonNull D> resourceCleanup, boolean eager) Constructs aFlowablethat creates a dependent resource object, aFlow.Publisherwith that resource and calls the providedresourceDisposerfunction if this inner source terminates or the downstream disposes the flow; doing it before these end-states have been reached ifeager == true, after otherwise.virtualCreate(@NonNull VirtualGenerator<@NonNull T> generator) Construct aFlowableand use the givengeneratorto generate items on demand while running on theSchedulers.virtual().virtualCreate(@NonNull VirtualGenerator<@NonNull T> generator, @NonNull Scheduler scheduler) Construct aFlowableand use the givengeneratorto generate items on demand while running on the givenScheduler.virtualCreate(@NonNull VirtualGenerator<@NonNull T> generator, @NonNull ExecutorService executor) Construct aFlowableand use the givengeneratorto generate items on demand while running on the givenExecutorService.virtualTransform(@NonNull VirtualTransformer<@NonNull T, @NonNull R> transformer) Returns aFlowablethat turns an upstream item an upstream item into zero or more downstream values by running on theSchedulers.virtual()scheduler.virtualTransform(@NonNull VirtualTransformer<@NonNull T, @NonNull R> transformer, @NonNull Scheduler scheduler, int prefetch) Returns aFlowablethat turns an upstream item an upstream item into zero or more downstream values by running on the givenScheduler.virtualTransform(@NonNull VirtualTransformer<@NonNull T, @NonNull R> transformer, @NonNull ExecutorService executor) Returns aFlowablethat turns an upstream item an upstream item into zero or more downstream values by running on the givenExecutorService.virtualTransform(@NonNull VirtualTransformer<@NonNull T, @NonNull R> transformer, @NonNull ExecutorService executor, int prefetch) Returns aFlowablethat turns an upstream item into zero or more downstream values by running on the givenExecutorService.window(long count) Returns aFlowablethat emits windows of items it collects from the currentFlowable.window(long count, long skip) Returns aFlowablethat emits windows of items it collects from the currentFlowable.window(long count, long skip, int bufferSize) Returns aFlowablethat emits windows of items it collects from the currentFlowable.Returns aFlowablethat emits windows of items it collects from the currentFlowable.Returns aFlowablethat emits windows of items it collects from the currentFlowable.window(long timespan, long timeskip, @NonNull TimeUnit unit, @NonNull Scheduler scheduler, int bufferSize) Returns aFlowablethat emits windows of items it collects from the currentFlowable.Returns aFlowablethat emits windows of items it collects from the currentFlowable.Returns aFlowablethat emits windows of items it collects from the currentFlowable.Returns aFlowablethat emits windows of items it collects from the currentFlowable.Returns aFlowablethat emits windows of items it collects from the currentFlowable.Returns aFlowablethat emits windows of items it collects from the currentFlowable.window(long timespan, @NonNull TimeUnit unit, @NonNull Scheduler scheduler, long count, boolean restart) Returns aFlowablethat emits windows of items it collects from the currentFlowable.window(long timespan, @NonNull TimeUnit unit, @NonNull Scheduler scheduler, long count, boolean restart, int bufferSize) Returns aFlowablethat emits windows of items it collects from the currentFlowable.window(@NonNull Flow.Publisher<@NonNull B> boundaryIndicator) Returns aFlowablethat emits non-overlapping windows of items it collects from the currentFlowablewhere the boundary of each window is determined by the items emitted from a specified boundary-governingFlow.Publisher.window(@NonNull Flow.Publisher<@NonNull B> boundaryIndicator, int bufferSize) Returns aFlowablethat emits non-overlapping windows of items it collects from the currentFlowablewhere the boundary of each window is determined by the items emitted from a specified boundary-governingFlow.Publisher.window(@NonNull Flow.Publisher<@NonNull U> openingIndicator, @NonNull Function<? super @NonNull U, @NonNull ? extends Flow.Publisher<@NonNull V>> closingIndicator) Returns aFlowablethat emits windows of items it collects from the currentFlowable.window(@NonNull Flow.Publisher<@NonNull U> openingIndicator, @NonNull Function<? super @NonNull U, @NonNull ? extends Flow.Publisher<@NonNull V>> closingIndicator, int bufferSize) Returns aFlowablethat emits windows of items it collects from the currentFlowable.withLatestFrom(@NonNull Iterable<@NonNull ? extends Flow.Publisher<@NonNull ?>> others, @NonNull Function<? super Object[], @NonNull R> combiner) Combines the value emission from the currentFlowablewith the latest emissions from the otherFlow.Publishers via a function to produce the output item.withLatestFrom(@NonNull Flow.Publisher<? extends @NonNull U> other, @NonNull BiFunction<? super @NonNull T, ? super @NonNull U, ? extends @NonNull R> combiner) Merges the specifiedFlow.Publisherinto the currentFlowablesequence by using theresultSelectorfunction only when the currentFlowable(this instance) emits an item.withLatestFrom(@NonNull Flow.Publisher<@NonNull ?>[] others, @NonNull Function<? super Object[], @NonNull R> combiner) Combines the value emission from the currentFlowablewith the latest emissions from the otherFlow.Publishers via a function to produce the output item.withLatestFrom(@NonNull Flow.Publisher<@NonNull T1> source1, @NonNull Flow.Publisher<@NonNull T2> source2, @NonNull Function3<? super @NonNull T, ? super @NonNull T1, ? super @NonNull T2, @NonNull R> combiner) Combines the value emission from the currentFlowablewith the latest emissions from the otherFlow.Publishers via a function to produce the output item.withLatestFrom(@NonNull Flow.Publisher<@NonNull T1> source1, @NonNull Flow.Publisher<@NonNull T2> source2, @NonNull Flow.Publisher<@NonNull T3> source3, @NonNull Function4<? super @NonNull T, ? super @NonNull T1, ? super @NonNull T2, ? super @NonNull T3, @NonNull R> combiner) Combines the value emission from the currentFlowablewith the latest emissions from the otherFlow.Publishers via a function to produce the output item.withLatestFrom(@NonNull Flow.Publisher<@NonNull T1> source1, @NonNull Flow.Publisher<@NonNull T2> source2, @NonNull Flow.Publisher<@NonNull T3> source3, @NonNull Flow.Publisher<@NonNull T4> source4, @NonNull Function5<? super @NonNull T, ? super @NonNull T1, ? super @NonNull T2, ? super @NonNull T3, ? super @NonNull T4, @NonNull R> combiner) Combines the value emission from the currentFlowablewith the latest emissions from the otherFlow.Publishers via a function to produce the output item.zip(@NonNull Iterable<@NonNull ? extends Flow.Publisher<? extends @NonNull T>> sources, @NonNull Function<? super Object[], ? extends @NonNull R> zipper) Returns aFlowablethat emits the results of a specified combiner function applied to combinations of items emitted, in sequence, by anIterableof otherFlow.Publishers.zip(@NonNull Iterable<@NonNull ? extends Flow.Publisher<? extends @NonNull T>> sources, @NonNull Function<? super Object[], ? extends @NonNull R> zipper, boolean delayError, int bufferSize) Returns aFlowablethat emits the results of a specified combiner function applied to combinations of items emitted, in sequence, by anIterableof otherFlow.Publishers.zip(@NonNull Flow.Publisher<? extends @NonNull T1> source1, @NonNull Flow.Publisher<? extends @NonNull T2> source2, @NonNull BiFunction<? super @NonNull T1, ? super @NonNull T2, ? extends @NonNull R> zipper) Returns aFlowablethat emits the results of a specified combiner function applied to combinations of two items emitted, in sequence, by two otherFlow.Publishers.zip(@NonNull Flow.Publisher<? extends @NonNull T1> source1, @NonNull Flow.Publisher<? extends @NonNull T2> source2, @NonNull BiFunction<? super @NonNull T1, ? super @NonNull T2, ? extends @NonNull R> zipper, boolean delayError) Returns aFlowablethat emits the results of a specified combiner function applied to combinations of two items emitted, in sequence, by two otherFlow.Publishers.zip(@NonNull Flow.Publisher<? extends @NonNull T1> source1, @NonNull Flow.Publisher<? extends @NonNull T2> source2, @NonNull BiFunction<? super @NonNull T1, ? super @NonNull T2, ? extends @NonNull R> zipper, boolean delayError, int bufferSize) Returns aFlowablethat emits the results of a specified combiner function applied to combinations of two items emitted, in sequence, by two otherFlow.Publishers.zip(@NonNull Flow.Publisher<? extends @NonNull T1> source1, @NonNull Flow.Publisher<? extends @NonNull T2> source2, @NonNull Flow.Publisher<? extends @NonNull T3> source3, @NonNull Function3<? super @NonNull T1, ? super @NonNull T2, ? super @NonNull T3, ? extends @NonNull R> zipper) Returns aFlowablethat emits the results of a specified combiner function applied to combinations of three items emitted, in sequence, by three otherFlow.Publishers.zip(@NonNull Flow.Publisher<? extends @NonNull T1> source1, @NonNull Flow.Publisher<? extends @NonNull T2> source2, @NonNull Flow.Publisher<? extends @NonNull T3> source3, @NonNull Flow.Publisher<? extends @NonNull T4> source4, @NonNull Function4<? super @NonNull T1, ? super @NonNull T2, ? super @NonNull T3, ? super @NonNull T4, ? extends @NonNull R> zipper) Returns aFlowablethat emits the results of a specified combiner function applied to combinations of four items emitted, in sequence, by four otherFlow.Publishers.static <@NonNull T1, @NonNull T2, @NonNull T3, @NonNull T4, @NonNull T5, @NonNull R>
@NonNull Flowable<R> zip(@NonNull Flow.Publisher<? extends @NonNull T1> source1, @NonNull Flow.Publisher<? extends @NonNull T2> source2, @NonNull Flow.Publisher<? extends @NonNull T3> source3, @NonNull Flow.Publisher<? extends @NonNull T4> source4, @NonNull Flow.Publisher<? extends @NonNull T5> source5, @NonNull Function5<? super @NonNull T1, ? super @NonNull T2, ? super @NonNull T3, ? super @NonNull T4, ? super @NonNull T5, ? extends @NonNull R> zipper) Returns aFlowablethat emits the results of a specified combiner function applied to combinations of five items emitted, in sequence, by five otherFlow.Publishers.static <@NonNull T1, @NonNull T2, @NonNull T3, @NonNull T4, @NonNull T5, @NonNull T6, @NonNull R>
@NonNull Flowable<R> zip(@NonNull Flow.Publisher<? extends @NonNull T1> source1, @NonNull Flow.Publisher<? extends @NonNull T2> source2, @NonNull Flow.Publisher<? extends @NonNull T3> source3, @NonNull Flow.Publisher<? extends @NonNull T4> source4, @NonNull Flow.Publisher<? extends @NonNull T5> source5, @NonNull Flow.Publisher<? extends @NonNull T6> source6, @NonNull Function6<? super @NonNull T1, ? super @NonNull T2, ? super @NonNull T3, ? super @NonNull T4, ? super @NonNull T5, ? super @NonNull T6, ? extends @NonNull R> zipper) Returns aFlowablethat emits the results of a specified combiner function applied to combinations of six items emitted, in sequence, by six otherFlow.Publishers.static <@NonNull T1, @NonNull T2, @NonNull T3, @NonNull T4, @NonNull T5, @NonNull T6, @NonNull T7, @NonNull R>
@NonNull Flowable<R> zip(@NonNull Flow.Publisher<? extends @NonNull T1> source1, @NonNull Flow.Publisher<? extends @NonNull T2> source2, @NonNull Flow.Publisher<? extends @NonNull T3> source3, @NonNull Flow.Publisher<? extends @NonNull T4> source4, @NonNull Flow.Publisher<? extends @NonNull T5> source5, @NonNull Flow.Publisher<? extends @NonNull T6> source6, @NonNull Flow.Publisher<? extends @NonNull T7> source7, @NonNull Function7<? super @NonNull T1, ? super @NonNull T2, ? super @NonNull T3, ? super @NonNull T4, ? super @NonNull T5, ? super @NonNull T6, ? super @NonNull T7, ? extends @NonNull R> zipper) Returns aFlowablethat emits the results of a specified combiner function applied to combinations of seven items emitted, in sequence, by seven otherFlow.Publishers.static <@NonNull T1, @NonNull T2, @NonNull T3, @NonNull T4, @NonNull T5, @NonNull T6, @NonNull T7, @NonNull T8, @NonNull R>
@NonNull Flowable<R> zip(@NonNull Flow.Publisher<? extends @NonNull T1> source1, @NonNull Flow.Publisher<? extends @NonNull T2> source2, @NonNull Flow.Publisher<? extends @NonNull T3> source3, @NonNull Flow.Publisher<? extends @NonNull T4> source4, @NonNull Flow.Publisher<? extends @NonNull T5> source5, @NonNull Flow.Publisher<? extends @NonNull T6> source6, @NonNull Flow.Publisher<? extends @NonNull T7> source7, @NonNull Flow.Publisher<? extends @NonNull T8> source8, @NonNull Function8<? super @NonNull T1, ? super @NonNull T2, ? super @NonNull T3, ? super @NonNull T4, ? super @NonNull T5, ? super @NonNull T6, ? super @NonNull T7, ? super @NonNull T8, ? extends @NonNull R> zipper) Returns aFlowablethat emits the results of a specified combiner function applied to combinations of eight items emitted, in sequence, by eight otherFlow.Publishers.static <@NonNull T1, @NonNull T2, @NonNull T3, @NonNull T4, @NonNull T5, @NonNull T6, @NonNull T7, @NonNull T8, @NonNull T9, @NonNull R>
@NonNull Flowable<R> zip(@NonNull Flow.Publisher<? extends @NonNull T1> source1, @NonNull Flow.Publisher<? extends @NonNull T2> source2, @NonNull Flow.Publisher<? extends @NonNull T3> source3, @NonNull Flow.Publisher<? extends @NonNull T4> source4, @NonNull Flow.Publisher<? extends @NonNull T5> source5, @NonNull Flow.Publisher<? extends @NonNull T6> source6, @NonNull Flow.Publisher<? extends @NonNull T7> source7, @NonNull Flow.Publisher<? extends @NonNull T8> source8, @NonNull Flow.Publisher<? extends @NonNull T9> source9, @NonNull Function9<? super @NonNull T1, ? super @NonNull T2, ? super @NonNull T3, ? super @NonNull T4, ? super @NonNull T5, ? super @NonNull T6, ? super @NonNull T7, ? super @NonNull T8, ? super @NonNull T9, ? extends @NonNull R> zipper) Returns aFlowablethat emits the results of a specified combiner function applied to combinations of nine items emitted, in sequence, by nine otherFlow.Publishers.zipArray(@NonNull Function<? super Object[], ? extends @NonNull R> zipper, boolean delayError, int bufferSize, @NonNull Flow.Publisher<? extends @NonNull T>... sources) Returns aFlowablethat emits the results of a specified combiner function applied to combinations of items emitted, in sequence, by an array of otherFlow.Publishers.zipWith(@NonNull Iterable<@NonNull U> other, @NonNull BiFunction<? super @NonNull T, ? super @NonNull U, ? extends @NonNull R> zipper) Returns aFlowablethat emits items that are the result of applying a specified function to pairs of values, one each from the currentFlowableand a specifiedIterablesequence.zipWith(@NonNull Flow.Publisher<? extends @NonNull U> other, @NonNull BiFunction<? super @NonNull T, ? super @NonNull U, ? extends @NonNull R> zipper) Returns aFlowablethat emits items that are the result of applying a specified function to pairs of values, one each from the currentFlowableand another specifiedFlow.Publisher.zipWith(@NonNull Flow.Publisher<? extends @NonNull U> other, @NonNull BiFunction<? super @NonNull T, ? super @NonNull U, ? extends @NonNull R> zipper, boolean delayError) Returns aFlowablethat emits items that are the result of applying a specified function to pairs of values, one each from the currentFlowableand another specifiedFlow.Publisher.zipWith(@NonNull Flow.Publisher<? extends @NonNull U> other, @NonNull BiFunction<? super @NonNull T, ? super @NonNull U, ? extends @NonNull R> zipper, boolean delayError, int bufferSize) Returns aFlowablethat emits items that are the result of applying a specified function to pairs of values, one each from the currentFlowableand another specifiedFlow.Publisher.
-
Method Details
-
create
Constructs a fresh instance with the default Flowable.bufferSize() prefetch amount and no refCount-behavior.- Type Parameters:
T- the input and output value type- Returns:
- the new MulticastProcessor instance
-
create
@CheckReturnValue @NonNull public static <T> @NonNull MulticastProcessor<T> create(boolean refCount) Constructs a fresh instance with the default Flowable.bufferSize() prefetch amount and the optional refCount-behavior.- Type Parameters:
T- the input and output value type- Parameters:
refCount- if true and if all Subscribers have canceled, the upstream is cancelled- Returns:
- the new MulticastProcessor instance
-
create
Constructs a fresh instance with the given prefetch amount and no refCount behavior.- Type Parameters:
T- the input and output value type- Parameters:
bufferSize- the prefetch amount- Returns:
- the new MulticastProcessor instance
- Throws:
IllegalArgumentException- ifbufferSizeis non-positive
-
create
@CheckReturnValue @NonNull public static <T> @NonNull MulticastProcessor<T> create(int bufferSize, boolean refCount) Constructs a fresh instance with the given prefetch amount and the optional refCount-behavior.- Type Parameters:
T- the input and output value type- Parameters:
bufferSize- the prefetch amountrefCount- if true and if all Subscribers have canceled, the upstream is cancelled- Returns:
- the new MulticastProcessor instance
- Throws:
IllegalArgumentException- ifbufferSizeis non-positive
-
start
public void start()Initializes this Processor by setting an upstream Subscription that ignores request amounts, uses a fixed buffer and allows using the onXXX and offer methods afterwards. -
startUnbounded
public void startUnbounded()Initializes this Processor by setting an upstream Subscription that ignores request amounts, uses an unbounded buffer and allows using the onXXX and offer methods afterwards. -
onSubscribe
Description copied from interface:FlowableSubscriberImplementors of this method should make sure everything that needs to be visible inFlow.Subscriber.onNext(Object)is established before callingFlow.Subscription.request(long). In practice this means no initialization should happen after therequest()call and additional behavior is thread safe in respect toonNext. -
onNext
-
offer
Tries to offer an item into the internal queue and returns false if the queue is full.- Parameters:
t- the item to offer, notnull- Returns:
- true if successful, false if the queue is full
- Throws:
NullPointerException- iftisnullIllegalStateException- if the processor is in fusion mode
-
onError
-
onComplete
public void onComplete() -
hasSubscribers
Description copied from class:FlowableProcessorReturns true if the FlowableProcessor has subscribers.The method is thread-safe.
- Specified by:
hasSubscribersin classFlowableProcessor<T>- Returns:
- true if the FlowableProcessor has subscribers
-
hasThrowable
Description copied from class:FlowableProcessorReturns true if the FlowableProcessor has reached a terminal state through an error event.The method is thread-safe.
- Specified by:
hasThrowablein classFlowableProcessor<T>- Returns:
- true if the FlowableProcessor has reached a terminal state through an error event
- See Also:
-
hasComplete
Description copied from class:FlowableProcessorReturns true if the FlowableProcessor has reached a terminal state through a complete event.The method is thread-safe.
- Specified by:
hasCompletein classFlowableProcessor<T>- Returns:
- true if the FlowableProcessor has reached a terminal state through a complete event
- See Also:
-
getThrowable
Description copied from class:FlowableProcessorReturns the error that caused the FlowableProcessor to terminate or null if the FlowableProcessor hasn't terminated yet.The method is thread-safe.
- Specified by:
getThrowablein classFlowableProcessor<T>- Returns:
- the error that caused the FlowableProcessor to terminate or null if the FlowableProcessor hasn't terminated yet
-
subscribeActual
Description copied from class:FlowableOperator implementations (both source and intermediate) should implement this method that performs the necessary business logic and handles the incomingFlow.Subscribers.There is no need to call any of the plugin hooks on the current
Flowableinstance or theSubscriber; all hooks and basic safeguards have been applied byFlowable.subscribe(Subscriber)before this method gets called.- Specified by:
subscribeActualin classFlowable<T>- Parameters:
s- the incomingSubscriber, nevernull
-