T - the type of the items emitted by the Flowablepublic abstract classFlowable<T>extendsObjectimplementsPublisher<T>
Reactive Streams operates withPublishers whichFlowable extends. Many operators therefore accept generalPublishers directly and allow direct interoperation with other Reactive Streams implementations.
The Flowable hosts the default buffer size of 128 elements for operators, accessible viabufferSize(), that can be overridden globally via the system parameterrx2.buffer-size. Most operators, however, have overloads that allow setting their internal buffer size explicitly.
The documentation for this class makes use of marble diagrams. The following legend explains these diagrams:

TheFlowable follows the protocol
onSubscribe onNext* (onError | onComplete)? where the stream can be disposed through theSubscription instance provided to consumers throughSubscriber.onSubscribe(Subscription). Unlike theObservable.subscribe() of version 1.x,subscribe(Subscriber) does not allow external cancellation of a subscription and theSubscriber instance is expected to expose such capability if needed. Flowables support backpressure and requireSubscribers to signal demand viaSubscription.request(long).
Example:
Disposable d = Flowable.just("Hello world!") .delay(1, TimeUnit.SECONDS) .subscribeWith(new DisposableSubscriber<String>() { @Override public void onStart() { System.out.println("Start!"); request(1); } @Override public void onNext(String t) { System.out.println(t); request(1); } @Override public void onError(Throwable t) { t.printStackTrace(); } @Override public void onComplete() { System.out.println("Done!"); } }); Thread.sleep(500); // the sequence can now be cancelled via dispose() d.dispose(); The Reactive Streams specification is relatively strict when defining interactions betweenPublishers andSubscribers, so much so that there is a significant performance penalty due certain timing requirements and the need to prepare for invalid request amounts viaSubscription.request(long). Therefore, RxJava has introduced theFlowableSubscriber interface that indicates the consumer can be driven with relaxed rules. All RxJava operators are implemented with these relaxed rules in mind. If the subscribingSubscriber does not implement this interface, for example, due to it being from another Reactive Streams compliant library, the Flowable will automatically apply a compliance wrapper around it.
Flowable is an abstract class, but it is not advised to implement sources and custom operators by extending the class directly due to the large amounts ofReactive Streams rules to be followed to the letter. Seethe wiki for some guidance if such custom implementations are necessary.
The recommended way of creating customFlowables is by using thecreate(FlowableOnSubscribe, BackpressureStrategy) factory method:
Flowable<String> source = Flowable.create(new FlowableOnSubscribe<String>() { @Override public void subscribe(FlowableEmitter<String> emitter) throws Exception { // signal an item emitter.onNext("Hello"); // could be some blocking operation Thread.sleep(1000); // the consumer might have cancelled the flow if (emitter.isCancelled() { return; } emitter.onNext("World"); Thread.sleep(1000); // the end-of-sequence has to be signaled, otherwise the // consumers may never finish emitter.onComplete(); } }, BackpressureStrategy.BUFFER); System.out.println("Subscribe!"); source.subscribe(System.out::println); System.out.println("Done!"); RxJava reactive sources, such asFlowable, are generally synchronous and sequential in nature. In the ReactiveX design, the location (thread) where operators run isorthogonal to when the operators can work with data. This means that asynchrony and parallelism has to be explicitly expressed via operators such assubscribeOn(Scheduler),observeOn(Scheduler) andparallel(). In general, operators featuring aScheduler parameter are introducing this type of asynchrony into the flow.
For more information see theReactiveX documentation.
| Constructor and Description |
|---|
Flowable() |
| Modifier and Type | Method and Description |
|---|---|
Single<Boolean> | all(Predicate<? superT> predicate)Returns a Single that emits a Boolean that indicates whether all of the items emitted by the source Publisher satisfy a condition. |
static <T> Flowable<T> | amb(Iterable<? extendsPublisher<? extends T>> sources)Mirrors the one Publisher in an Iterable of several Publishers that first either emits an item or sends a termination notification. |
static <T> Flowable<T> | ambArray(Publisher<? extends T>... sources)Mirrors the one Publisher in an array of several Publishers that first either emits an item or sends a termination notification. |
Flowable<T> | ambWith(Publisher<? extendsT> other)Mirrors the Publisher (current or provided) that first either emits an item or sends a termination notification. |
Single<Boolean> | any(Predicate<? superT> predicate)Returns a Single that emits true if any item emitted by the source Publisher satisfies a specified condition, otherwisefalse. |
<R> R | as(FlowableConverter<T,? extends R> converter)Calls the specified converter function during assembly time and returns its resulting value. |
T | blockingFirst()Returns the first item emitted by this Flowable, or throwsNoSuchElementException if it emits no items. |
T | blockingFirst(T defaultItem)Returns the first item emitted by this Flowable, or a default value if it emits no items. |
void | blockingForEach(Consumer<? superT> onNext)Consumes the upstream Flowable in a blocking fashion and invokes the givenConsumer with each upstream item on thecurrent thread until the upstream terminates. |
Iterable<T> | blockingIterable()Converts this Flowable into anIterable. |
Iterable<T> | blockingIterable(int bufferSize)Converts this Flowable into anIterable. |
T | blockingLast()Returns the last item emitted by this Flowable, or throwsNoSuchElementException if thisFlowable emits no items. |
T | blockingLast(T defaultItem)Returns the last item emitted by this Flowable, or a default value if it emits no items. |
Iterable<T> | blockingLatest()Returns an Iterable that returns the latest item emitted by thisFlowable, waiting if necessary for one to become available. |
Iterable<T> | blockingMostRecent(T initialItem)Returns an Iterable that always returns the item most recently emitted by thisFlowable. |
Iterable<T> | blockingNext()Returns an Iterable that blocks until thisFlowable emits another item, then returns that item. |
T | blockingSingle()If this Flowable completes after emitting a single item, return that item, otherwise throw aNoSuchElementException. |
T | blockingSingle(T defaultItem)If this Flowable completes 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. |
void | blockingSubscribe()Runs the source Flowable to a terminal event, ignoring any values and rethrowing any exception. |
void | blockingSubscribe(Consumer<? superT> onNext)Subscribes to the source and calls the given callbackson the current thread. |
void | blockingSubscribe(Consumer<? superT> onNext,Consumer<? superThrowable> onError)Subscribes to the source and calls the given callbackson the current thread. |
void | blockingSubscribe(Consumer<? superT> onNext,Consumer<? superThrowable> onError,Action onComplete)Subscribes to the source and calls the given callbackson the current thread. |
void | blockingSubscribe(Consumer<? superT> onNext,Consumer<? superThrowable> onError,Action onComplete, int bufferSize)Subscribes to the source and calls the given callbackson the current thread. |
void | blockingSubscribe(Consumer<? superT> onNext,Consumer<? superThrowable> onError, int bufferSize)Subscribes to the source and calls the given callbackson the current thread. |
void | blockingSubscribe(Consumer<? superT> onNext, int bufferSize)Subscribes to the source and calls the given callbackson the current thread. |
void | blockingSubscribe(Subscriber<? superT> subscriber)Subscribes to the source and calls the Subscriber methodson the current thread. |
<B> Flowable<List<T>> | buffer(Callable<? extendsPublisher<B>> boundaryIndicatorSupplier)Returns a Flowable that emits buffers of items it collects from the source Publisher. |
<B,U extendsCollection<? superT>> | buffer(Callable<? extendsPublisher<B>> boundaryIndicatorSupplier,Callable<U> bufferSupplier)Returns a Flowable that emits buffers of items it collects from the source Publisher. |
<TOpening,TClosing> | buffer(Flowable<? extends TOpening> openingIndicator,Function<? super TOpening,? extendsPublisher<? extends TClosing>> closingIndicator)Returns a Flowable that emits buffers of items it collects from the source Publisher. |
<TOpening,TClosing,U extendsCollection<? superT>> | buffer(Flowable<? extends TOpening> openingIndicator,Function<? super TOpening,? extendsPublisher<? extends TClosing>> closingIndicator,Callable<U> bufferSupplier)Returns a Flowable that emits buffers of items it collects from the source Publisher. |
Flowable<List<T>> | buffer(int count)Returns a Flowable that emits buffers of items it collects from the source Publisher. |
<U extendsCollection<? superT>> | buffer(int count,Callable<U> bufferSupplier)Returns a Flowable that emits buffers of items it collects from the source Publisher. |
Flowable<List<T>> | buffer(int count, int skip)Returns a Flowable that emits buffers of items it collects from the source Publisher. |
<U extendsCollection<? superT>> | buffer(int count, int skip,Callable<U> bufferSupplier)Returns a Flowable that emits buffers of items it collects from the source Publisher. |
Flowable<List<T>> | buffer(long timespan, long timeskip,TimeUnit unit)Returns a Flowable that emits buffers of items it collects from the source Publisher. |
Flowable<List<T>> | buffer(long timespan, long timeskip,TimeUnit unit,Scheduler scheduler)Returns a Flowable that emits buffers of items it collects from the source Publisher. |
<U extendsCollection<? superT>> | buffer(long timespan, long timeskip,TimeUnit unit,Scheduler scheduler,Callable<U> bufferSupplier)Returns a Flowable that emits buffers of items it collects from the source Publisher. |
Flowable<List<T>> | buffer(long timespan,TimeUnit unit)Returns a Flowable that emits buffers of items it collects from the source Publisher. |
Flowable<List<T>> | buffer(long timespan,TimeUnit unit, int count)Returns a Flowable that emits buffers of items it collects from the source Publisher. |
Flowable<List<T>> | buffer(long timespan,TimeUnit unit,Scheduler scheduler)Returns a Flowable that emits buffers of items it collects from the source Publisher. |
Flowable<List<T>> | buffer(long timespan,TimeUnit unit,Scheduler scheduler, int count)Returns a Flowable that emits buffers of items it collects from the source Publisher. |
<U extendsCollection<? superT>> | buffer(long timespan,TimeUnit unit,Scheduler scheduler, int count,Callable<U> bufferSupplier, boolean restartTimerOnMaxSize)Returns a Flowable that emits buffers of items it collects from the source Publisher. |
<B> Flowable<List<T>> | buffer(Publisher<B> boundaryIndicator)Returns a Flowable that emits non-overlapping buffered items from the source Publisher each time the specified boundary Publisher emits an item. |
<B,U extendsCollection<? superT>> | buffer(Publisher<B> boundaryIndicator,Callable<U> bufferSupplier)Returns a Flowable that emits non-overlapping buffered items from the source Publisher each time the specified boundary Publisher emits an item. |
<B> Flowable<List<T>> | buffer(Publisher<B> boundaryIndicator, int initialCapacity)Returns a Flowable that emits non-overlapping buffered items from the source Publisher each time the specified boundary Publisher emits an item. |
static int | bufferSize()Returns the default internal buffer size used by most async operators. |
Flowable<T> | cache()Returns a Flowable that subscribes to this Publisher lazily, caches all of its events and replays them, in the same order as received, to all the downstream subscribers. |
Flowable<T> | cacheWithInitialCapacity(int initialCapacity)Returns a Flowable that subscribes to this Publisher lazily, caches all of its events and replays them, in the same order as received, to all the downstream subscribers. |
<U> Flowable<U> | cast(Class<U> clazz)Returns a Flowable that emits the items emitted by the source Publisher, converted to the specified type. |
<U> Single<U> | collect(Callable<? extends U> initialItemSupplier,BiConsumer<? super U,? superT> collector)Collects items emitted by the finite source Publisher into a single mutable data structure and returns a Single that emits this structure. |
<U> Single<U> | collectInto(U initialItem,BiConsumer<? super U,? superT> collector)Collects items emitted by the finite source Publisher into a single mutable data structure and returns a Single that emits this structure. |
static <T,R> Flowable<R> | combineLatest(Function<? superObject[],? extends R> combiner,Publisher<? extends T>... sources)Combines a collection of source Publishers by emitting an item that aggregates the latest values of each of the source Publishers each time an item is received from any of the source Publishers, where this aggregation is defined by a specified function. |
static <T,R> Flowable<R> | combineLatest(Iterable<? extendsPublisher<? extends T>> sources,Function<? superObject[],? extends R> combiner)Combines a collection of source Publishers by emitting an item that aggregates the latest values of each of the source Publishers each time an item is received from any of the source Publishers, where this aggregation is defined by a specified function. |
static <T,R> Flowable<R> | combineLatest(Iterable<? extendsPublisher<? extends T>> sources,Function<? superObject[],? extends R> combiner, int bufferSize)Combines a collection of source Publishers by emitting an item that aggregates the latest values of each of the source Publishers each time an item is received from any of the source Publishers, where this aggregation is defined by a specified function. |
static <T,R> Flowable<R> | combineLatest(Publisher<? extends T>[] sources,Function<? superObject[],? extends R> combiner)Combines a collection of source Publishers by emitting an item that aggregates the latest values of each of the source Publishers each time an item is received from any of the source Publishers, where this aggregation is defined by a specified function. |
static <T,R> Flowable<R> | combineLatest(Publisher<? extends T>[] sources,Function<? superObject[],? extends R> combiner, int bufferSize)Combines a collection of source Publishers by emitting an item that aggregates the latest values of each of the source Publishers each time an item is received from any of the source Publishers, where this aggregation is defined by a specified function. |
static <T1,T2,R> Flowable<R> | combineLatest(Publisher<? extends T1> source1,Publisher<? extends T2> source2,BiFunction<? super T1,? super T2,? extends R> combiner)Combines two source Publishers by emitting an item that aggregates the latest values of each of the source Publishers each time an item is received from either of the source Publishers, where this aggregation is defined by a specified function. |
static <T1,T2,T3,R> | combineLatest(Publisher<? extends T1> source1,Publisher<? extends T2> source2,Publisher<? extends T3> source3,Function3<? super T1,? super T2,? super T3,? extends R> combiner)Combines three source Publishers by emitting an item that aggregates the latest values of each of the source Publishers each time an item is received from any of the source Publishers, where this aggregation is defined by a specified function. |
static <T1,T2,T3,T4,R> | combineLatest(Publisher<? extends T1> source1,Publisher<? extends T2> source2,Publisher<? extends T3> source3,Publisher<? extends T4> source4,Function4<? super T1,? super T2,? super T3,? super T4,? extends R> combiner)Combines four source Publishers by emitting an item that aggregates the latest values of each of the source Publishers each time an item is received from any of the source Publishers, where this aggregation is defined by a specified function. |
static <T1,T2,T3,T4,T5,R> | combineLatest(Publisher<? extends T1> source1,Publisher<? extends T2> source2,Publisher<? extends T3> source3,Publisher<? extends T4> source4,Publisher<? extends T5> source5,Function5<? super T1,? super T2,? super T3,? super T4,? super T5,? extends R> combiner)Combines five source Publishers by emitting an item that aggregates the latest values of each of the source Publishers each time an item is received from any of the source Publishers, where this aggregation is defined by a specified function. |
static <T1,T2,T3,T4,T5,T6,R> | combineLatest(Publisher<? extends T1> source1,Publisher<? extends T2> source2,Publisher<? extends T3> source3,Publisher<? extends T4> source4,Publisher<? extends T5> source5,Publisher<? extends T6> source6,Function6<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? extends R> combiner)Combines six source Publishers by emitting an item that aggregates the latest values of each of the source Publishers each time an item is received from any of the source Publishers, where this aggregation is defined by a specified function. |
static <T1,T2,T3,T4,T5,T6,T7,R> | combineLatest(Publisher<? extends T1> source1,Publisher<? extends T2> source2,Publisher<? extends T3> source3,Publisher<? extends T4> source4,Publisher<? extends T5> source5,Publisher<? extends T6> source6,Publisher<? extends T7> source7,Function7<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? extends R> combiner)Combines seven source Publishers by emitting an item that aggregates the latest values of each of the source Publishers each time an item is received from any of the source Publishers, where this aggregation is defined by a specified function. |
static <T1,T2,T3,T4,T5,T6,T7,T8,R> | combineLatest(Publisher<? extends T1> source1,Publisher<? extends T2> source2,Publisher<? extends T3> source3,Publisher<? extends T4> source4,Publisher<? extends T5> source5,Publisher<? extends T6> source6,Publisher<? extends T7> source7,Publisher<? extends T8> source8,Function8<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? super T8,? extends R> combiner)Combines eight source Publishers by emitting an item that aggregates the latest values of each of the source Publishers each time an item is received from any of the source Publishers, where this aggregation is defined by a specified function. |
static <T1,T2,T3,T4,T5,T6,T7,T8,T9,R> | combineLatest(Publisher<? extends T1> source1,Publisher<? extends T2> source2,Publisher<? extends T3> source3,Publisher<? extends T4> source4,Publisher<? extends T5> source5,Publisher<? extends T6> source6,Publisher<? extends T7> source7,Publisher<? extends T8> source8,Publisher<? extends T9> source9,Function9<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? super T8,? super T9,? extends R> combiner)Combines nine source Publishers by emitting an item that aggregates the latest values of each of the source Publishers each time an item is received from any of the source Publishers, where this aggregation is defined by a specified function. |
static <T,R> Flowable<R> | combineLatestDelayError(Function<? superObject[],? extends R> combiner, int bufferSize,Publisher<? extends T>... sources)Combines a collection of source Publishers by emitting an item that aggregates the latest values of each of the source Publishers each time an item is received from any of the source Publisher, where this aggregation is defined by a specified function and delays any error from the sources until all source Publishers terminate. |
static <T,R> Flowable<R> | combineLatestDelayError(Function<? superObject[],? extends R> combiner,Publisher<? extends T>... sources)Combines a collection of source Publishers by emitting an item that aggregates the latest values of each of the source Publishers each time an item is received from any of the source Publishers, where this aggregation is defined by a specified function and delays any error from the sources until all source Publishers terminate. |
static <T,R> Flowable<R> | combineLatestDelayError(Iterable<? extendsPublisher<? extends T>> sources,Function<? superObject[],? extends R> combiner)Combines a collection of source Publishers by emitting an item that aggregates the latest values of each of the source Publishers each time an item is received from any of the source Publishers, where this aggregation is defined by a specified function and delays any error from the sources until all source Publishers terminate. |
static <T,R> Flowable<R> | combineLatestDelayError(Iterable<? extendsPublisher<? extends T>> sources,Function<? superObject[],? extends R> combiner, int bufferSize)Combines a collection of source Publishers by emitting an item that aggregates the latest values of each of the source Publishers each time an item is received from any of the source Publishers, where this aggregation is defined by a specified function and delays any error from the sources until all source Publishers terminate. |
static <T,R> Flowable<R> | combineLatestDelayError(Publisher<? extends T>[] sources,Function<? superObject[],? extends R> combiner)Combines a collection of source Publishers by emitting an item that aggregates the latest values of each of the source Publishers each time an item is received from any of the source Publishers, where this aggregation is defined by a specified function. |
static <T,R> Flowable<R> | combineLatestDelayError(Publisher<? extends T>[] sources,Function<? superObject[],? extends R> combiner, int bufferSize)Combines a collection of source Publishers by emitting an item that aggregates the latest values of each of the source Publishers each time an item is received from any of the source Publishers, where this aggregation is defined by a specified function and delays any error from the sources until all source Publishers terminate. |
<R> Flowable<R> | compose(FlowableTransformer<? superT,? extends R> composer)Transform a Publisher by applying a particular Transformer function to it. |
static <T> Flowable<T> | concat(Iterable<? extendsPublisher<? extends T>> sources)Concatenates elements of each Publisher provided via an Iterable sequence into a single sequence of elements without interleaving them. |
static <T> Flowable<T> | concat(Publisher<? extendsPublisher<? extends T>> sources)Returns a Flowable that emits the items emitted by each of the Publishers emitted by the source Publisher, one after the other, without interleaving them. |
static <T> Flowable<T> | concat(Publisher<? extendsPublisher<? extends T>> sources, int prefetch)Returns a Flowable that emits the items emitted by each of the Publishers emitted by the source Publisher, one after the other, without interleaving them. |
static <T> Flowable<T> | concat(Publisher<? extends T> source1,Publisher<? extends T> source2)Returns a Flowable that emits the items emitted by two Publishers, one after the other, without interleaving them. |
static <T> Flowable<T> | concat(Publisher<? extends T> source1,Publisher<? extends T> source2,Publisher<? extends T> source3)Returns a Flowable that emits the items emitted by three Publishers, one after the other, without interleaving them. |
static <T> Flowable<T> | concat(Publisher<? extends T> source1,Publisher<? extends T> source2,Publisher<? extends T> source3,Publisher<? extends T> source4)Returns a Flowable that emits the items emitted by four Publishers, one after the other, without interleaving them. |
static <T> Flowable<T> | concatArray(Publisher<? extends T>... sources)Concatenates a variable number of Publisher sources. |
static <T> Flowable<T> | concatArrayDelayError(Publisher<? extends T>... sources)Concatenates a variable number of Publisher sources and delays errors from any of them till all terminate. |
static <T> Flowable<T> | concatArrayEager(int maxConcurrency, int prefetch,Publisher<? extends T>... sources)Concatenates an array of Publishers eagerly into a single stream of values. |
static <T> Flowable<T> | concatArrayEager(Publisher<? extends T>... sources)Concatenates an array of Publishers eagerly into a single stream of values. |
static <T> Flowable<T> | concatArrayEagerDelayError(int maxConcurrency, int prefetch,Publisher<? extends T>... sources)Concatenates an array of Publishers eagerly into a single stream of values and delaying any errors until all sources terminate. |
static <T> Flowable<T> | concatArrayEagerDelayError(Publisher<? extends T>... sources)Concatenates an array of Publishers eagerly into a single stream of values and delaying any errors until all sources terminate. |
static <T> Flowable<T> | concatDelayError(Iterable<? extendsPublisher<? extends T>> sources)Concatenates the Iterable sequence of Publishers into a single sequence by subscribing to each Publisher, one after the other, one at a time and delays any errors till the all inner Publishers terminate. |
static <T> Flowable<T> | concatDelayError(Publisher<? extendsPublisher<? extends T>> sources)Concatenates the Publisher sequence of Publishers into a single sequence by subscribing to each inner Publisher, one after the other, one at a time and delays any errors till the all inner and the outer Publishers terminate. |
static <T> Flowable<T> | concatDelayError(Publisher<? extendsPublisher<? extends T>> sources, int prefetch, boolean tillTheEnd)Concatenates the Publisher sequence of Publishers into a single sequence by subscribing to each inner Publisher, one after the other, one at a time and delays any errors till the all inner and the outer Publishers terminate. |
static <T> Flowable<T> | concatEager(Iterable<? extendsPublisher<? extends T>> sources)Concatenates a sequence of Publishers eagerly into a single stream of values. |
static <T> Flowable<T> | concatEager(Iterable<? extendsPublisher<? extends T>> sources, int maxConcurrency, int prefetch)Concatenates a sequence of Publishers eagerly into a single stream of values. |
static <T> Flowable<T> | concatEager(Publisher<? extendsPublisher<? extends T>> sources)Concatenates a Publisher sequence of Publishers eagerly into a single stream of values. |
static <T> Flowable<T> | concatEager(Publisher<? extendsPublisher<? extends T>> sources, int maxConcurrency, int prefetch)Concatenates a Publisher sequence of Publishers eagerly into a single stream of values. |
<R> Flowable<R> | concatMap(Function<? superT,? extendsPublisher<? extends R>> mapper)Returns a new Flowable that emits items resulting from applying a function that you supply to each item emitted by the source Publisher, where that function returns a Publisher, and then emitting the items that result from concatenating those resulting Publishers. |
<R> Flowable<R> | concatMap(Function<? superT,? extendsPublisher<? extends R>> mapper, int prefetch)Returns a new Flowable that emits items resulting from applying a function that you supply to each item emitted by the source Publisher, where that function returns a Publisher, and then emitting the items that result from concatenating those resulting Publishers. |
Completable | concatMapCompletable(Function<? superT,? extendsCompletableSource> mapper)Maps the upstream items into CompletableSources and subscribes to them one after the other completes. |
Completable | concatMapCompletable(Function<? superT,? extendsCompletableSource> mapper, int prefetch)Maps the upstream items into CompletableSources and subscribes to them one after the other completes. |
Completable | concatMapCompletableDelayError(Function<? superT,? extendsCompletableSource> mapper)Maps the upstream items into CompletableSources and subscribes to them one after the other terminates, delaying all errors till both thisFlowable and all innerCompletableSources terminate. |
Completable | concatMapCompletableDelayError(Function<? superT,? extendsCompletableSource> mapper, boolean tillTheEnd)Maps the upstream items into CompletableSources and subscribes to them one after the other terminates, optionally delaying all errors till both thisFlowable and all innerCompletableSources terminate. |
Completable | concatMapCompletableDelayError(Function<? superT,? extendsCompletableSource> mapper, boolean tillTheEnd, int prefetch)Maps the upstream items into CompletableSources and subscribes to them one after the other terminates, optionally delaying all errors till both thisFlowable and all innerCompletableSources terminate. |
<R> Flowable<R> | concatMapDelayError(Function<? superT,? extendsPublisher<? extends R>> mapper)Maps each of the items into a 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 inner Publishers till all of them terminate. |
<R> Flowable<R> | concatMapDelayError(Function<? superT,? extendsPublisher<? extends R>> mapper, int prefetch, boolean tillTheEnd)Maps each of the items into a 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 inner Publishers till all of them terminate. |
<R> Flowable<R> | concatMapEager(Function<? superT,? extendsPublisher<? extends R>> mapper)Maps a sequence of values into Publishers and concatenates these Publishers eagerly into a single Publisher. |
<R> Flowable<R> | concatMapEager(Function<? superT,? extendsPublisher<? extends R>> mapper, int maxConcurrency, int prefetch)Maps a sequence of values into Publishers and concatenates these Publishers eagerly into a single Publisher. |
<R> Flowable<R> | concatMapEagerDelayError(Function<? superT,? extendsPublisher<? extends R>> mapper, boolean tillTheEnd)Maps a sequence of values into Publishers and concatenates these Publishers eagerly into a single Publisher. |
<R> Flowable<R> | concatMapEagerDelayError(Function<? superT,? extendsPublisher<? extends R>> mapper, int maxConcurrency, int prefetch, boolean tillTheEnd)Maps a sequence of values into Publishers and concatenates these Publishers eagerly into a single Publisher. |
<U> Flowable<U> | concatMapIterable(Function<? superT,? extendsIterable<? extends U>> mapper)Returns a Flowable that concatenate each item emitted by the source Publisher with the values in an Iterable corresponding to that item that is generated by a selector. |
<U> Flowable<U> | concatMapIterable(Function<? superT,? extendsIterable<? extends U>> mapper, int prefetch)Returns a Flowable that concatenate each item emitted by the source Publisher with the values in an Iterable corresponding to that item that is generated by a selector. |
<R> Flowable<R> | concatMapMaybe(Function<? superT,? extendsMaybeSource<? extends R>> mapper)Maps the upstream items into MaybeSources and subscribes to them one after the other succeeds or completes, emits their success value if available or terminates immediately if either thisFlowable or the current innerMaybeSource fail. |
<R> Flowable<R> | concatMapMaybe(Function<? superT,? extendsMaybeSource<? extends R>> mapper, int prefetch)Maps the upstream items into MaybeSources and subscribes to them one after the other succeeds or completes, emits their success value if available or terminates immediately if either thisFlowable or the current innerMaybeSource fail. |
<R> Flowable<R> | concatMapMaybeDelayError(Function<? superT,? extendsMaybeSource<? extends R>> mapper)Maps the upstream items into MaybeSources and subscribes to them one after the other terminates, emits their success value if available and delaying all errors till both thisFlowable and all innerMaybeSources terminate. |
<R> Flowable<R> | concatMapMaybeDelayError(Function<? superT,? extendsMaybeSource<? extends R>> mapper, boolean tillTheEnd)Maps the upstream items into MaybeSources and subscribes to them one after the other terminates, emits their success value if available and optionally delaying all errors till both thisFlowable and all innerMaybeSources terminate. |
<R> Flowable<R> | concatMapMaybeDelayError(Function<? superT,? extendsMaybeSource<? extends R>> mapper, boolean tillTheEnd, int prefetch)Maps the upstream items into MaybeSources and subscribes to them one after the other terminates, emits their success value if available and optionally delaying all errors till both thisFlowable and all innerMaybeSources terminate. |
<R> Flowable<R> | concatMapSingle(Function<? superT,? extendsSingleSource<? extends R>> mapper)Maps the upstream items into SingleSources and subscribes to them one after the other succeeds, emits their success values or terminates immediately if either thisFlowable or the current innerSingleSource fail. |
<R> Flowable<R> | concatMapSingle(Function<? superT,? extendsSingleSource<? extends R>> mapper, int prefetch)Maps the upstream items into SingleSources and subscribes to them one after the other succeeds, emits their success values or terminates immediately if either thisFlowable or the current innerSingleSource fail. |
<R> Flowable<R> | concatMapSingleDelayError(Function<? superT,? extendsSingleSource<? extends R>> mapper)Maps the upstream items into SingleSources and subscribes to them one after the other succeeds or fails, emits their success values and delays all errors till both thisFlowable and all innerSingleSources terminate. |
<R> Flowable<R> | concatMapSingleDelayError(Function<? superT,? extendsSingleSource<? extends R>> mapper, boolean tillTheEnd)Maps the upstream items into SingleSources and subscribes to them one after the other succeeds or fails, emits their success values and optionally delays all errors till both thisFlowable and all innerSingleSources terminate. |
<R> Flowable<R> | concatMapSingleDelayError(Function<? superT,? extendsSingleSource<? extends R>> mapper, boolean tillTheEnd, int prefetch)Maps the upstream items into SingleSources and subscribes to them one after the other succeeds or fails, emits their success values and optionally delays errors till both thisFlowable and all innerSingleSources terminate. |
Flowable<T> | concatWith(CompletableSource other)Returns a Flowable that emits items from thisFlowable and when it completes normally, the otherCompletableSource is subscribed to and the returnedFlowable emits its terminal events. |
Flowable<T> | concatWith(MaybeSource<? extendsT> other)Returns a Flowable that emits the items from thisFlowable followed by the success item or terminal events of the otherMaybeSource. |
Flowable<T> | concatWith(Publisher<? extendsT> other)Returns a Flowable that emits the items emitted from the current Publisher, then the next, one after the other, without interleaving them. |
Flowable<T> | concatWith(SingleSource<? extendsT> other)Returns a Flowable that emits the items from thisFlowable followed by the success item or error event of the otherSingleSource. |
Single<Boolean> | contains(Object item)Returns a Single that emits a Boolean that indicates whether the source Publisher emitted a specified item. |
Single<Long> | count()Returns a Single that counts the total number of items emitted by the source Publisher and emits this count as a 64-bit Long. |
static <T> Flowable<T> | create(FlowableOnSubscribe<T> source,BackpressureStrategy mode)Provides an API (via a cold Flowable) that bridges the reactive world with the callback-style, generally non-backpressured world. |
<U> Flowable<T> | debounce(Function<? superT,? extendsPublisher<U>> debounceIndicator)Returns a Flowable that mirrors the source Publisher, except that it drops items emitted by the source Publisher that are followed by another item within a computed debounce duration. |
Flowable<T> | debounce(long timeout,TimeUnit unit)Returns a Flowable that mirrors the source Publisher, except that it drops items emitted by the source Publisher that are followed by newer items before a timeout value expires. |
Flowable<T> | debounce(long timeout,TimeUnit unit,Scheduler scheduler)Returns a Flowable that mirrors the source Publisher, except that it drops items emitted by the source Publisher that are followed by newer items before a timeout value expires on a specified Scheduler. |
Flowable<T> | defaultIfEmpty(T defaultItem)Returns a Flowable that emits the items emitted by the source Publisher or a specified default item if the source Publisher is empty. |
static <T> Flowable<T> | defer(Callable<? extendsPublisher<? extends T>> supplier)Returns a Flowable that calls a Publisher factory to create a Publisher for each new Subscriber that subscribes. |
<U> Flowable<T> | delay(Function<? superT,? extendsPublisher<U>> itemDelayIndicator)Returns a Flowable that delays the emissions of the source Publisher via another Publisher on a per-item basis. |
Flowable<T> | delay(long delay,TimeUnit unit)Returns a Flowable that emits the items emitted by the source Publisher shifted forward in time by a specified delay. |
Flowable<T> | delay(long delay,TimeUnit unit, boolean delayError)Returns a Flowable that emits the items emitted by the source Publisher shifted forward in time by a specified delay. |
Flowable<T> | delay(long delay,TimeUnit unit,Scheduler scheduler)Returns a Flowable that emits the items emitted by the source Publisher shifted forward in time by a specified delay. |
Flowable<T> | delay(long delay,TimeUnit unit,Scheduler scheduler, boolean delayError)Returns a Flowable that emits the items emitted by the source Publisher shifted forward in time by a specified delay. |
<U,V> Flowable<T> | delay(Publisher<U> subscriptionIndicator,Function<? superT,? extendsPublisher<V>> itemDelayIndicator)Returns a Flowable that delays the subscription to and emissions from the source Publisher via another Publisher on a per-item basis. |
Flowable<T> | delaySubscription(long delay,TimeUnit unit)Returns a Flowable that delays the subscription to the source Publisher by a given amount of time. |
Flowable<T> | delaySubscription(long delay,TimeUnit unit,Scheduler scheduler)Returns a Flowable that delays the subscription to the source Publisher by a given amount of time, both waiting and subscribing on a given Scheduler. |
<U> Flowable<T> | delaySubscription(Publisher<U> subscriptionIndicator)Returns a Flowable that delays the subscription to this Publisher until the other Publisher emits an element or completes normally. |
<T2> Flowable<T2> | dematerialize()Deprecated. in 2.2.4; inherently type-unsafe as it overrides the output generic type. Use dematerialize(Function) instead. |
<R> Flowable<R> | dematerialize(Function<? superT,Notification<R>> selector)Returns a Flowable that reverses the effect of materialize by transforming theNotification objects extracted from the source items via a selector function into their respectiveSubscriber signal types. |
Flowable<T> | distinct()Returns a Flowable that emits all items emitted by the source Publisher that are distinct based on Object.equals(Object) comparison. |
<K> Flowable<T> | distinct(Function<? superT,K> keySelector)Returns a Flowable that emits all items emitted by the source Publisher that are distinct according to a key selector function and based on Object.equals(Object) comparison of the objects returned by the key selector function. |
<K> Flowable<T> | distinct(Function<? superT,K> keySelector,Callable<? extendsCollection<? super K>> collectionSupplier)Returns a Flowable that emits all items emitted by the source Publisher that are distinct according to a key selector function and based on Object.equals(Object) comparison of the objects returned by the key selector function. |
Flowable<T> | distinctUntilChanged()Returns a Flowable that emits all items emitted by the source Publisher that are distinct from their immediate predecessors based on Object.equals(Object) comparison. |
Flowable<T> | distinctUntilChanged(BiPredicate<? superT,? superT> comparer)Returns a Flowable that emits all items emitted by the source Publisher that are distinct from their immediate predecessors when compared with each other via the provided comparator function. |
<K> Flowable<T> | distinctUntilChanged(Function<? superT,K> keySelector)Returns a Flowable that emits all items emitted by the source Publisher that are distinct from their immediate predecessors, according to a key selector function and based on Object.equals(Object) comparison of those objects returned by the key selector function. |
Flowable<T> | doAfterNext(Consumer<? superT> onAfterNext)Calls the specified consumer with the current item after this item has been emitted to the downstream. |
Flowable<T> | doAfterTerminate(Action onAfterTerminate) |
Flowable<T> | doFinally(Action onFinally)Calls the specified action after this Flowable signals onError or onCompleted or gets canceled by the downstream. |
Flowable<T> | doOnCancel(Action onCancel)Calls the cancel Action if the downstream cancels the sequence. |
Flowable<T> | doOnComplete(Action onComplete)Modifies the source Publisher so that it invokes an action when it calls onComplete. |
Flowable<T> | doOnEach(Consumer<? superNotification<T>> onNotification)Modifies the source Publisher so that it invokes an action for each item it emits. |
Flowable<T> | doOnEach(Subscriber<? superT> subscriber)Modifies the source Publisher so that it notifies a Subscriber for each item and terminal event it emits. |
Flowable<T> | doOnError(Consumer<? superThrowable> onError)Modifies the source Publisher so that it invokes an action if it calls onError. |
Flowable<T> | doOnLifecycle(Consumer<? superSubscription> onSubscribe,LongConsumer onRequest,Action onCancel)Calls the appropriate onXXX method (shared between all Subscribers) for the lifecycle events of the sequence (subscription, cancellation, requesting). |
Flowable<T> | doOnNext(Consumer<? superT> onNext)Modifies the source Publisher so that it invokes an action when it calls onNext. |
Flowable<T> | doOnRequest(LongConsumer onRequest)Modifies the source Publisher so that it invokes the given action when it receives a request for more items. |
Flowable<T> | doOnSubscribe(Consumer<? superSubscription> onSubscribe)Modifies the source Publisher so that it invokes the given action when it is subscribed from its subscribers. |
Flowable<T> | doOnTerminate(Action onTerminate)Modifies the source Publisher so that it invokes an action when it calls onComplete oronError. |
Maybe<T> | elementAt(long index)Returns a Maybe that emits the single item at a specified index in a sequence of emissions from this Flowable or completes if this Flowable sequence has fewer elements than index. |
Single<T> | elementAt(long index,T defaultItem)Returns a Single that emits the item found at a specified index in a sequence of emissions from this Flowable, or a default item if that index is out of range. |
Single<T> | elementAtOrError(long index)Returns a Single that emits the item found at a specified index in a sequence of emissions from this Flowable or signals a NoSuchElementException if this Flowable has fewer elements than index. |
static <T> Flowable<T> | empty()Returns a Flowable that emits no items to the Subscriber and immediately invokes itsonComplete method. |
static <T> Flowable<T> | error(Callable<? extendsThrowable> supplier)Returns a Flowable that invokes a Subscriber'sonError method when the Subscriber subscribes to it. |
static <T> Flowable<T> | error(Throwable throwable)Returns a Flowable that invokes a Subscriber'sonError method when the Subscriber subscribes to it. |
Flowable<T> | filter(Predicate<? superT> predicate)Filters items emitted by a Publisher by only emitting those that satisfy a specified predicate. |
Single<T> | first(T defaultItem)Returns a Single that emits only the very first item emitted by this Flowable, or a default item if this Flowable completes without emitting anything. |
Maybe<T> | firstElement()Returns a Maybe that emits only the very first item emitted by this Flowable or completes if this Flowable is empty. |
Single<T> | firstOrError()Returns a Single that emits only the very first item emitted by this Flowable or signals a NoSuchElementException if this Flowable is empty. |
<R> Flowable<R> | flatMap(Function<? superT,? extendsPublisher<? extends R>> mapper)Returns a Flowable that emits items based on applying a function that you supply to each item emitted by the source Publisher, where that function returns a Publisher, and then merging those resulting Publishers and emitting the results of this merger. |
<R> Flowable<R> | flatMap(Function<? superT,? extendsPublisher<? extends R>> mapper, boolean delayErrors)Returns a Flowable that emits items based on applying a function that you supply to each item emitted by the source Publisher, where that function returns a Publisher, and then merging those resulting Publishers and emitting the results of this merger. |
<R> Flowable<R> | flatMap(Function<? superT,? extendsPublisher<? extends R>> mapper, boolean delayErrors, int maxConcurrency)Returns a Flowable that emits items based on applying a function that you supply to each item emitted by the source Publisher, where that function returns a Publisher, and then merging those resulting Publishers and emitting the results of this merger, while limiting the maximum number of concurrent subscriptions to these Publishers. |
<R> Flowable<R> | flatMap(Function<? superT,? extendsPublisher<? extends R>> mapper, boolean delayErrors, int maxConcurrency, int bufferSize)Returns a Flowable that emits items based on applying a function that you supply to each item emitted by the source Publisher, where that function returns a Publisher, and then merging those resulting Publishers and emitting the results of this merger, while limiting the maximum number of concurrent subscriptions to these Publishers. |
<R> Flowable<R> | flatMap(Function<? superT,? extendsPublisher<? extends R>> onNextMapper,Function<? superThrowable,? extendsPublisher<? extends R>> onErrorMapper,Callable<? extendsPublisher<? extends R>> onCompleteSupplier)Returns a Flowable that applies a function to each item emitted or notification raised by the source Publisher and then flattens the Publishers returned from these functions and emits the resulting items. |
<R> Flowable<R> | flatMap(Function<? superT,? extendsPublisher<? extends R>> onNextMapper,Function<Throwable,? extendsPublisher<? extends R>> onErrorMapper,Callable<? extendsPublisher<? extends R>> onCompleteSupplier, int maxConcurrency)Returns a Flowable that applies a function to each item emitted or notification raised by the source Publisher and then flattens the Publishers returned from these functions and emits the resulting items, while limiting the maximum number of concurrent subscriptions to these Publishers. |
<R> Flowable<R> | flatMap(Function<? superT,? extendsPublisher<? extends R>> mapper, int maxConcurrency)Returns a Flowable that emits items based on applying a function that you supply to each item emitted by the source Publisher, where that function returns a Publisher, and then merging those resulting Publishers and emitting the results of this merger, while limiting the maximum number of concurrent subscriptions to these Publishers. |
<U,R> Flowable<R> | flatMap(Function<? superT,? extendsPublisher<? extends U>> mapper,BiFunction<? superT,? super U,? extends R> combiner)Returns a Flowable that emits the results of a specified function to the pair of values emitted by the source Publisher and a specified collection Publisher. |
<U,R> Flowable<R> | flatMap(Function<? superT,? extendsPublisher<? extends U>> mapper,BiFunction<? superT,? super U,? extends R> combiner, boolean delayErrors)Returns a Flowable that emits the results of a specified function to the pair of values emitted by the source Publisher and a specified collection Publisher. |
<U,R> Flowable<R> | flatMap(Function<? superT,? extendsPublisher<? extends U>> mapper,BiFunction<? superT,? super U,? extends R> combiner, boolean delayErrors, int maxConcurrency)Returns a Flowable that emits the results of a specified function to the pair of values emitted by the source Publisher and a specified collection Publisher, while limiting the maximum number of concurrent subscriptions to these Publishers. |
<U,R> Flowable<R> | flatMap(Function<? superT,? extendsPublisher<? extends U>> mapper,BiFunction<? superT,? super U,? extends R> combiner, boolean delayErrors, int maxConcurrency, int bufferSize)Returns a Flowable that emits the results of a specified function to the pair of values emitted by the source Publisher and a specified collection Publisher, while limiting the maximum number of concurrent subscriptions to these Publishers. |
<U,R> Flowable<R> | flatMap(Function<? superT,? extendsPublisher<? extends U>> mapper,BiFunction<? superT,? super U,? extends R> combiner, int maxConcurrency)Returns a Flowable that emits the results of a specified function to the pair of values emitted by the source Publisher and a specified collection Publisher, while limiting the maximum number of concurrent subscriptions to these Publishers. |
Completable | flatMapCompletable(Function<? superT,? extendsCompletableSource> mapper)Maps each element of the upstream Flowable into CompletableSources, subscribes to them and waits until the upstream and all CompletableSources complete. |
Completable | flatMapCompletable(Function<? superT,? extendsCompletableSource> mapper, boolean delayErrors, int maxConcurrency)Maps each element of the upstream Flowable into CompletableSources, subscribes to them and waits until the upstream and all CompletableSources complete, optionally delaying all errors. |
<U> Flowable<U> | flatMapIterable(Function<? superT,? extendsIterable<? extends U>> mapper)Returns a Flowable that merges each item emitted by the source Publisher with the values in an Iterable corresponding to that item that is generated by a selector. |
<U,V> Flowable<V> | flatMapIterable(Function<? superT,? extendsIterable<? extends U>> mapper,BiFunction<? superT,? super U,? extends V> resultSelector)Returns a Flowable that emits the results of applying a function to the pair of values from the source Publisher and an Iterable corresponding to that item that is generated by a selector. |
<U,V> Flowable<V> | flatMapIterable(Function<? superT,? extendsIterable<? extends U>> mapper,BiFunction<? superT,? super U,? extends V> resultSelector, int prefetch)Returns a Flowable that merges each item emitted by the source Publisher with the values in an Iterable corresponding to that item that is generated by a selector, while limiting the number of concurrent subscriptions to these Publishers. |
<U> Flowable<U> | flatMapIterable(Function<? superT,? extendsIterable<? extends U>> mapper, int bufferSize)Returns a Flowable that merges each item emitted by the source Publisher with the values in an Iterable corresponding to that item that is generated by a selector. |
<R> Flowable<R> | flatMapMaybe(Function<? superT,? extendsMaybeSource<? extends R>> mapper)Maps each element of the upstream Flowable into MaybeSources, subscribes to all of them and merges their onSuccess values, in no particular order, into a single Flowable sequence. |
<R> Flowable<R> | flatMapMaybe(Function<? superT,? extendsMaybeSource<? extends R>> mapper, boolean delayErrors, int maxConcurrency)Maps each element of the upstream Flowable into MaybeSources, subscribes to at most maxConcurrency MaybeSources at a time and merges their onSuccess values, in no particular order, into a single Flowable sequence, optionally delaying all errors. |
<R> Flowable<R> | flatMapSingle(Function<? superT,? extendsSingleSource<? extends R>> mapper)Maps each element of the upstream Flowable into SingleSources, subscribes to all of them and merges their onSuccess values, in no particular order, into a single Flowable sequence. |
<R> Flowable<R> | flatMapSingle(Function<? superT,? extendsSingleSource<? extends R>> mapper, boolean delayErrors, int maxConcurrency)Maps each element of the upstream Flowable into SingleSources, subscribes to at most maxConcurrency SingleSources at a time and merges their onSuccess values, in no particular order, into a single Flowable sequence, optionally delaying all errors. |
Disposable | forEach(Consumer<? superT> onNext)Subscribes to the Publisher and receives notifications for each element. |
Disposable | forEachWhile(Predicate<? superT> onNext)Subscribes to the Publisher and receives notifications for each element until the onNext Predicate returns false. |
Disposable | forEachWhile(Predicate<? superT> onNext,Consumer<? superThrowable> onError)Subscribes to the Publisher and receives notifications for each element and error events until the onNext Predicate returns false. |
Disposable | forEachWhile(Predicate<? superT> onNext,Consumer<? superThrowable> onError,Action onComplete)Subscribes to the Publisher and receives notifications for each element and the terminal events until the onNext Predicate returns false. |
static <T> Flowable<T> | fromArray(T... items)Converts an Array into a Publisher that emits the items in the Array. |
static <T> Flowable<T> | fromCallable(Callable<? extends T> supplier)Returns a Flowable that, when a Subscriber subscribes to it, invokes a function you specify and then emits the value returned from that function. |
static <T> Flowable<T> | fromFuture(Future<? extends T> future)Converts a Future into a Publisher. |
static <T> Flowable<T> | fromFuture(Future<? extends T> future, long timeout,TimeUnit unit)Converts a Future into a Publisher, with a timeout on the Future. |
static <T> Flowable<T> | fromFuture(Future<? extends T> future, long timeout,TimeUnit unit,Scheduler scheduler)Converts a Future into a Publisher, with a timeout on the Future. |
static <T> Flowable<T> | fromFuture(Future<? extends T> future,Scheduler scheduler) |
static <T> Flowable<T> | fromIterable(Iterable<? extends T> source)Converts an Iterable sequence into a Publisher that emits the items in the sequence. |
static <T> Flowable<T> | fromPublisher(Publisher<? extends T> source)Converts an arbitrary Reactive Streams Publisher into a Flowable if not already a Flowable. |
static <T,S> Flowable<T> | generate(Callable<S> initialState,BiConsumer<S,Emitter<T>> generator)Returns a cold, synchronous, stateful and backpressure-aware generator of values. |
static <T,S> Flowable<T> | generate(Callable<S> initialState,BiConsumer<S,Emitter<T>> generator,Consumer<? super S> disposeState)Returns a cold, synchronous, stateful and backpressure-aware generator of values. |
static <T,S> Flowable<T> | generate(Callable<S> initialState,BiFunction<S,Emitter<T>,S> generator)Returns a cold, synchronous, stateful and backpressure-aware generator of values. |
static <T,S> Flowable<T> | generate(Callable<S> initialState,BiFunction<S,Emitter<T>,S> generator,Consumer<? super S> disposeState)Returns a cold, synchronous, stateful and backpressure-aware generator of values. |
static <T> Flowable<T> | generate(Consumer<Emitter<T>> generator)Returns a cold, synchronous, stateless and backpressure-aware generator of values. |
<K> Flowable<GroupedFlowable<K,T>> | groupBy(Function<? superT,? extends K> keySelector)Groups the items emitted by a Publisher according to a specified criterion, and emits these grouped items asGroupedFlowables. |
<K> Flowable<GroupedFlowable<K,T>> | groupBy(Function<? superT,? extends K> keySelector, boolean delayError)Groups the items emitted by a Publisher according to a specified criterion, and emits these grouped items asGroupedFlowables. |
<K,V> Flowable<GroupedFlowable<K,V>> | groupBy(Function<? superT,? extends K> keySelector,Function<? superT,? extends V> valueSelector)Groups the items emitted by a Publisher according to a specified criterion, and emits these grouped items asGroupedFlowables. |
<K,V> Flowable<GroupedFlowable<K,V>> | groupBy(Function<? superT,? extends K> keySelector,Function<? superT,? extends V> valueSelector, boolean delayError)Groups the items emitted by a Publisher according to a specified criterion, and emits these grouped items asGroupedFlowables. |
<K,V> Flowable<GroupedFlowable<K,V>> | groupBy(Function<? superT,? extends K> keySelector,Function<? superT,? extends V> valueSelector, boolean delayError, int bufferSize)Groups the items emitted by a Publisher according to a specified criterion, and emits these grouped items asGroupedFlowables. |
<K,V> Flowable<GroupedFlowable<K,V>> | groupBy(Function<? superT,? extends K> keySelector,Function<? superT,? extends V> valueSelector, boolean delayError, int bufferSize,Function<? superConsumer<Object>,? extendsMap<K,Object>> evictingMapFactory)Groups the items emitted by a Publisher according to a specified criterion, and emits these grouped items asGroupedFlowables. |
<TRight,TLeftEnd,TRightEnd,R> | groupJoin(Publisher<? extends TRight> other,Function<? superT,? extendsPublisher<TLeftEnd>> leftEnd,Function<? super TRight,? extendsPublisher<TRightEnd>> rightEnd,BiFunction<? superT,? superFlowable<TRight>,? extends R> resultSelector)Returns a Flowable that correlates two Publishers when they overlap in time and groups the results. |
Flowable<T> | hide()Hides the identity of this Flowable and its Subscription. |
Completable | ignoreElements()Ignores all items emitted by the source Publisher and only calls onComplete oronError. |
staticFlowable<Long> | interval(long initialDelay, long period,TimeUnit unit)Returns a Flowable that emits a 0L after theinitialDelay and ever-increasing numbers after eachperiod of time thereafter. |
staticFlowable<Long> | interval(long initialDelay, long period,TimeUnit unit,Scheduler scheduler)Returns a Flowable that emits a 0L after theinitialDelay and ever-increasing numbers after eachperiod of time thereafter, on a specifiedScheduler. |
staticFlowable<Long> | interval(long period,TimeUnit unit)Returns a Flowable that emits a sequential number every specified interval of time. |
staticFlowable<Long> | interval(long period,TimeUnit unit,Scheduler scheduler)Returns a Flowable that emits a sequential number every specified interval of time, on a specified Scheduler. |
staticFlowable<Long> | intervalRange(long start, long count, long initialDelay, long period,TimeUnit unit)Signals a range of long values, the first after some initial delay and the rest periodically after. |
staticFlowable<Long> | intervalRange(long start, long count, long initialDelay, long period,TimeUnit unit,Scheduler scheduler)Signals a range of long values, the first after some initial delay and the rest periodically after. |
Single<Boolean> | isEmpty()Returns a Single that emits true if the source Publisher is empty, otherwisefalse. |
<TRight,TLeftEnd,TRightEnd,R> | join(Publisher<? extends TRight> other,Function<? superT,? extendsPublisher<TLeftEnd>> leftEnd,Function<? super TRight,? extendsPublisher<TRightEnd>> rightEnd,BiFunction<? superT,? super TRight,? extends R> resultSelector)Correlates the items emitted by two Publishers based on overlapping durations. |
static <T> Flowable<T> | just(T item)Returns a Flowable that signals the given (constant reference) item and then completes. |
static <T> Flowable<T> | just(T item1, T item2)Converts two items into a Publisher that emits those items. |
static <T> Flowable<T> | just(T item1, T item2, T item3)Converts three items into a Publisher that emits those items. |
static <T> Flowable<T> | just(T item1, T item2, T item3, T item4)Converts four items into a Publisher that emits those items. |
static <T> Flowable<T> | just(T item1, T item2, T item3, T item4, T item5)Converts five items into a Publisher that emits those items. |
static <T> Flowable<T> | just(T item1, T item2, T item3, T item4, T item5, T item6)Converts six items into a Publisher that emits those items. |
static <T> Flowable<T> | just(T item1, T item2, T item3, T item4, T item5, T item6, T item7)Converts seven items into a Publisher that emits those items. |
static <T> Flowable<T> | just(T item1, T item2, T item3, T item4, T item5, T item6, T item7, T item8)Converts eight items into a Publisher that emits those items. |
static <T> Flowable<T> | just(T item1, T item2, T item3, T item4, T item5, T item6, T item7, T item8, T item9)Converts nine items into a Publisher that emits those items. |
static <T> Flowable<T> | just(T item1, T item2, T item3, T item4, T item5, T item6, T item7, T item8, T item9, T item10)Converts ten items into a Publisher that emits those items. |
Single<T> | last(T defaultItem)Returns a Single that emits only the last item emitted by this Flowable, or a default item if this Flowable completes without emitting any items. |
Maybe<T> | lastElement()Returns a Maybe that emits the last item emitted by this Flowable or completes if this Flowable is empty. |
Single<T> | lastOrError()Returns a Single that emits only the last item emitted by this Flowable or signals a NoSuchElementException if this Flowable is empty. |
<R> Flowable<R> | lift(FlowableOperator<? extends R,? superT> lifter)This method requires advanced knowledge about building operators, please consider other standard composition methods first; Returns a Flowable which, when subscribed to, invokes theapply(Subscriber) method of the providedFlowableOperator for each individual downstreamSubscriber and allows the insertion of a custom operator by accessing the downstream'sSubscriber during 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. |
Flowable<T> | limit(long count)Limits both the number of upstream items (after which the sequence completes) and the total downstream request amount requested from the upstream to possibly prevent the creation of excess items by the upstream. |
<R> Flowable<R> | map(Function<? superT,? extends R> mapper)Returns a Flowable that applies a specified function to each item emitted by the source Publisher and emits the results of these function applications. |
Flowable<Notification<T>> | materialize()Returns a Flowable that represents all of the emissionsand notifications from the source Publisher into emissions marked with their original types within Notification objects. |
static <T> Flowable<T> | merge(Iterable<? extendsPublisher<? extends T>> sources)Flattens an Iterable of Publishers into one Publisher, without any transformation. |
static <T> Flowable<T> | merge(Iterable<? extendsPublisher<? extends T>> sources, int maxConcurrency)Flattens an Iterable of Publishers into one Publisher, without any transformation, while limiting the number of concurrent subscriptions to these Publishers. |
static <T> Flowable<T> | merge(Iterable<? extendsPublisher<? extends T>> sources, int maxConcurrency, int bufferSize)Flattens an Iterable of Publishers into one Publisher, without any transformation, while limiting the number of concurrent subscriptions to these Publishers. |
static <T> Flowable<T> | merge(Publisher<? extendsPublisher<? extends T>> sources)Flattens a Publisher that emits Publishers into a single Publisher that emits the items emitted by those Publishers, without any transformation. |
static <T> Flowable<T> | merge(Publisher<? extendsPublisher<? extends T>> sources, int maxConcurrency)Flattens a Publisher that emits Publishers into a single Publisher that emits the items emitted by those Publishers, without any transformation, while limiting the maximum number of concurrent subscriptions to these Publishers. |
static <T> Flowable<T> | merge(Publisher<? extends T> source1,Publisher<? extends T> source2)Flattens two Publishers into a single Publisher, without any transformation. |
static <T> Flowable<T> | merge(Publisher<? extends T> source1,Publisher<? extends T> source2,Publisher<? extends T> source3)Flattens three Publishers into a single Publisher, without any transformation. |
static <T> Flowable<T> | merge(Publisher<? extends T> source1,Publisher<? extends T> source2,Publisher<? extends T> source3,Publisher<? extends T> source4)Flattens four Publishers into a single Publisher, without any transformation. |
static <T> Flowable<T> | mergeArray(int maxConcurrency, int bufferSize,Publisher<? extends T>... sources)Flattens an Iterable of Publishers into one Publisher, without any transformation, while limiting the number of concurrent subscriptions to these Publishers. |
static <T> Flowable<T> | mergeArray(Publisher<? extends T>... sources)Flattens an Array of Publishers into one Publisher, without any transformation. |
static <T> Flowable<T> | mergeArrayDelayError(int maxConcurrency, int bufferSize,Publisher<? extends T>... sources)Flattens an array of Publishers into one Publisher, in a way that allows a Subscriber to receive all successfully emitted items from each of the source Publishers without being interrupted by an error notification from one of them, while limiting the number of concurrent subscriptions to these Publishers. |
static <T> Flowable<T> | mergeArrayDelayError(Publisher<? extends T>... sources)Flattens an array of Publishers into one Flowable, in a way that allows a Subscriber to receive all successfully emitted items from each of the source Publishers without being interrupted by an error notification from one of them. |
static <T> Flowable<T> | mergeDelayError(Iterable<? extendsPublisher<? extends T>> sources)Flattens an Iterable of Publishers into one Publisher, in a way that allows a Subscriber to receive all successfully emitted items from each of the source Publishers without being interrupted by an error notification from one of them. |
static <T> Flowable<T> | mergeDelayError(Iterable<? extendsPublisher<? extends T>> sources, int maxConcurrency)Flattens an Iterable of Publishers into one Publisher, in a way that allows a Subscriber to receive all successfully emitted items from each of the source Publishers without being interrupted by an error notification from one of them, while limiting the number of concurrent subscriptions to these Publishers. |
static <T> Flowable<T> | mergeDelayError(Iterable<? extendsPublisher<? extends T>> sources, int maxConcurrency, int bufferSize)Flattens an Iterable of Publishers into one Publisher, in a way that allows a Subscriber to receive all successfully emitted items from each of the source Publishers without being interrupted by an error notification from one of them, while limiting the number of concurrent subscriptions to these Publishers. |
static <T> Flowable<T> | mergeDelayError(Publisher<? extendsPublisher<? extends T>> sources)Flattens a Publisher that emits Publishers into one Publisher, in a way that allows a Subscriber to receive all successfully emitted items from all of the source Publishers without being interrupted by an error notification from one of them. |
static <T> Flowable<T> | mergeDelayError(Publisher<? extendsPublisher<? extends T>> sources, int maxConcurrency)Flattens a Publisher that emits Publishers into one Publisher, in a way that allows a Subscriber to receive all successfully emitted items from all of the source Publishers without being interrupted by an error notification from one of them, while limiting the number of concurrent subscriptions to these Publishers. |
static <T> Flowable<T> | mergeDelayError(Publisher<? extends T> source1,Publisher<? extends T> source2)Flattens two Publishers into one Publisher, in a way that allows a Subscriber to receive all successfully emitted items from each of the source Publishers without being interrupted by an error notification from one of them. |
static <T> Flowable<T> | mergeDelayError(Publisher<? extends T> source1,Publisher<? extends T> source2,Publisher<? extends T> source3)Flattens three Publishers into one Publisher, in a way that allows a Subscriber to receive all successfully emitted items from all of the source Publishers without being interrupted by an error notification from one of them. |
static <T> Flowable<T> | mergeDelayError(Publisher<? extends T> source1,Publisher<? extends T> source2,Publisher<? extends T> source3,Publisher<? extends T> source4)Flattens four Publishers into one Publisher, in a way that allows a Subscriber to receive all successfully emitted items from all of the source Publishers without being interrupted by an error notification from one of them. |
Flowable<T> | mergeWith(CompletableSource other)Relays the items of this Flowable and completes only when the other CompletableSource completes as well. |
Flowable<T> | mergeWith(MaybeSource<? extendsT> other)Merges the sequence of items of this Flowable with the success value of the other MaybeSource or waits for both to complete normally if the MaybeSource is empty. |
Flowable<T> | mergeWith(Publisher<? extendsT> other)Flattens this and another Publisher into a single Publisher, without any transformation. |
Flowable<T> | mergeWith(SingleSource<? extendsT> other)Merges the sequence of items of this Flowable with the success value of the other SingleSource. |
static <T> Flowable<T> | never()Returns a Flowable that never sends any items or notifications to a Subscriber. |
Flowable<T> | observeOn(Scheduler scheduler)Modifies a Publisher to perform its emissions and notifications on a specified Scheduler, asynchronously with a bounded buffer ofbufferSize() slots. |
Flowable<T> | observeOn(Scheduler scheduler, boolean delayError)Modifies a Publisher to perform its emissions and notifications on a specified Scheduler, asynchronously with a bounded buffer and optionally delays onError notifications. |
Flowable<T> | observeOn(Scheduler scheduler, boolean delayError, int bufferSize)Modifies a Publisher to perform its emissions and notifications on a specified Scheduler, asynchronously with a bounded buffer of configurable size and optionally delays onError notifications. |
<U> Flowable<U> | ofType(Class<U> clazz)Filters the items emitted by a Publisher, only emitting those of the specified type. |
Flowable<T> | onBackpressureBuffer()Instructs a Publisher that is emitting items faster than its Subscriber can consume them to buffer these items indefinitely until they can be emitted. |
Flowable<T> | onBackpressureBuffer(boolean delayError)Instructs a Publisher that is emitting items faster than its Subscriber can consume them to buffer these items indefinitely until they can be emitted. |
Flowable<T> | onBackpressureBuffer(int capacity)Instructs a Publisher that is emitting items faster than its Subscriber can consume them to buffer up to a given amount of items until they can be emitted. |
Flowable<T> | onBackpressureBuffer(int capacity,Action onOverflow)Instructs a Publisher that is emitting items faster than its Subscriber can consume them to buffer up to a given amount of items until they can be emitted. |
Flowable<T> | onBackpressureBuffer(int capacity, boolean delayError)Instructs a Publisher that is emitting items faster than its Subscriber can consume them to buffer up to a given amount of items until they can be emitted. |
Flowable<T> | onBackpressureBuffer(int capacity, boolean delayError, boolean unbounded)Instructs a Publisher that is emitting items faster than its Subscriber can consume them to buffer up to a given amount of items until they can be emitted. |
Flowable<T> | onBackpressureBuffer(int capacity, boolean delayError, boolean unbounded,Action onOverflow)Instructs a Publisher that is emitting items faster than its Subscriber can consume them to buffer up to a given amount of items until they can be emitted. |
Flowable<T> | onBackpressureBuffer(long capacity,Action onOverflow,BackpressureOverflowStrategy overflowStrategy)Instructs a Publisher that is emitting items faster than its Subscriber can consume them to buffer up to a given amount of items until they can be emitted. |
Flowable<T> | onBackpressureDrop()Instructs a Publisher that is emitting items faster than its Subscriber can consume them to discard, rather than emit, those items that its Subscriber is not prepared to observe. |
Flowable<T> | onBackpressureDrop(Consumer<? superT> onDrop)Instructs a Publisher that is emitting items faster than its Subscriber can consume them to discard, rather than emit, those items that its Subscriber is not prepared to observe. |
Flowable<T> | onBackpressureLatest()Instructs a Publisher that is emitting items faster than its Subscriber can consume them to hold onto the latest value and emit that on request. |
Flowable<T> | onErrorResumeNext(Function<? superThrowable,? extendsPublisher<? extendsT>> resumeFunction)Instructs a Publisher to pass control to another Publisher rather than invoking onError if it encounters an error. |
Flowable<T> | onErrorResumeNext(Publisher<? extendsT> next)Instructs a Publisher to pass control to another Publisher rather than invoking onError if it encounters an error. |
Flowable<T> | onErrorReturn(Function<? superThrowable,? extendsT> valueSupplier)Instructs a Publisher to emit an item (returned by a specified function) rather than invoking onError if it encounters an error. |
Flowable<T> | onErrorReturnItem(T item)Instructs a Publisher to emit an item (returned by a specified function) rather than invoking onError if it encounters an error. |
Flowable<T> | onExceptionResumeNext(Publisher<? extendsT> next) |
Flowable<T> | onTerminateDetach()Nulls out references to the upstream producer and downstream Subscriber if the sequence is terminated or downstream cancels. |
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. |
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. |
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. |
ConnectableFlowable<T> | publish()Returns a ConnectableFlowable, which is a variety of Publisher that waits until itsconnect method is called before it begins emitting items to thoseSubscribers that have subscribed to it. |
<R> Flowable<R> | publish(Function<? superFlowable<T>,? extendsPublisher<? extends R>> selector, int prefetch)Returns a Flowable that emits the results of invoking a specified selector on items emitted by a ConnectableFlowable that shares a single subscription to the underlying sequence. |
<R> Flowable<R> | publish(Function<? superFlowable<T>,? extendsPublisher<R>> selector)Returns a Flowable that emits the results of invoking a specified selector on items emitted by a ConnectableFlowable that shares a single subscription to the underlying sequence. |
ConnectableFlowable<T> | publish(int bufferSize)Returns a ConnectableFlowable, which is a variety of Publisher that waits until itsconnect method is called before it begins emitting items to thoseSubscribers that have subscribed to it. |
staticFlowable<Integer> | range(int start, int count)Returns a Flowable that emits a sequence of Integers within a specified range. |
staticFlowable<Long> | rangeLong(long start, long count)Returns a Flowable that emits a sequence of Longs within a specified range. |
Flowable<T> | rebatchRequests(int n)Requests n initially from the upstream and then 75% ofn subsequently after 75% ofn values have been emitted to the downstream. |
Maybe<T> | reduce(BiFunction<T,T,T> reducer)Returns a Maybe that applies a specified accumulator function to the first item emitted by a source Publisher, then feeds the result of that function along with the second item emitted by the source Publisher into the same function, and so on until all items have been emitted by the finite source Publisher, and emits the final result from the final call to your function as its sole item. |
<R> Single<R> | reduce(R seed,BiFunction<R,? superT,R> reducer)Returns a Single that applies a specified accumulator function to the first item emitted by a source Publisher and a specified seed value, then feeds the result of that function along with the second item emitted by a Publisher into the same function, and so on until all items have been emitted by the finite source Publisher, emitting the final result from the final call to your function as its sole item. |
<R> Single<R> | reduceWith(Callable<R> seedSupplier,BiFunction<R,? superT,R> reducer)Returns a Single that applies a specified accumulator function to the first item emitted by a source Publisher and a seed value derived from calling a specified seedSupplier, then feeds the result of that function along with the second item emitted by a Publisher into the same function, and so on until all items have been emitted by the finite source Publisher, emitting the final result from the final call to your function as its sole item. |
Flowable<T> | repeat()Returns a Flowable that repeats the sequence of items emitted by the source Publisher indefinitely. |
Flowable<T> | repeat(long times)Returns a Flowable that repeats the sequence of items emitted by the source Publisher at most count times. |
Flowable<T> | repeatUntil(BooleanSupplier stop)Returns a Flowable that repeats the sequence of items emitted by the source Publisher until the provided stop function returns true. |
Flowable<T> | repeatWhen(Function<? superFlowable<Object>,? extendsPublisher<?>> handler)Returns a Flowable that emits the same values as the source Publisher with the exception of an onComplete. |
ConnectableFlowable<T> | replay()Returns a ConnectableFlowable that shares a single subscription to the underlying Publisher that will replay all of its items and notifications to any futureSubscriber. |
<R> Flowable<R> | replay(Function<? superFlowable<T>,? extendsPublisher<R>> selector)Returns a Flowable that emits items that are the results of invoking a specified selector on the items emitted by a ConnectableFlowable that shares a single subscription to the source Publisher. |
<R> Flowable<R> | replay(Function<? superFlowable<T>,? extendsPublisher<R>> selector, int bufferSize)Returns a Flowable that emits items that are the results of invoking a specified selector on items emitted by a ConnectableFlowable that shares a single subscription to the source Publisher, replayingbufferSize notifications. |
<R> Flowable<R> | replay(Function<? superFlowable<T>,? extendsPublisher<R>> selector, int bufferSize, long time,TimeUnit unit)Returns a Flowable that emits items that are the results of invoking a specified selector on items emitted by a ConnectableFlowable that shares a single subscription to the source Publisher, replaying no more thanbufferSize items that were emitted within a specified time window. |
<R> Flowable<R> | replay(Function<? superFlowable<T>,? extendsPublisher<R>> selector, int bufferSize, long time,TimeUnit unit,Scheduler scheduler)Returns a Flowable that emits items that are the results of invoking a specified selector on items emitted by a ConnectableFlowable that shares a single subscription to the source Publisher, replaying no more thanbufferSize items that were emitted within a specified time window. |
<R> Flowable<R> | replay(Function<? superFlowable<T>,? extendsPublisher<R>> selector, int bufferSize,Scheduler scheduler)Returns a Flowable that emits items that are the results of invoking a specified selector on items emitted by a ConnectableFlowable that shares a single subscription to the source Publisher, replaying a maximum ofbufferSize items. |
<R> Flowable<R> | replay(Function<? superFlowable<T>,? extendsPublisher<R>> selector, long time,TimeUnit unit)Returns a Flowable that emits items that are the results of invoking a specified selector on items emitted by a ConnectableFlowable that shares a single subscription to the source Publisher, replaying all items that were emitted within a specified time window. |
<R> Flowable<R> | replay(Function<? superFlowable<T>,? extendsPublisher<R>> selector, long time,TimeUnit unit,Scheduler scheduler)Returns a Flowable that emits items that are the results of invoking a specified selector on items emitted by a ConnectableFlowable that shares a single subscription to the source Publisher, replaying all items that were emitted within a specified time window. |
<R> Flowable<R> | replay(Function<? superFlowable<T>,? extendsPublisher<R>> selector,Scheduler scheduler)Returns a Flowable that emits items that are the results of invoking a specified selector on items emitted by a ConnectableFlowable that shares a single subscription to the source Publisher. |
ConnectableFlowable<T> | replay(int bufferSize)Returns a ConnectableFlowable that shares a single subscription to the source Publisher that replays at mostbufferSize items emitted by that Publisher. |
ConnectableFlowable<T> | replay(int bufferSize, long time,TimeUnit unit)Returns a ConnectableFlowable that shares a single subscription to the source Publisher and replays at mostbufferSize items that were emitted during a specified time window. |
ConnectableFlowable<T> | replay(int bufferSize, long time,TimeUnit unit,Scheduler scheduler)Returns a ConnectableFlowable that shares a single subscription to the source Publisher and that replays a maximum ofbufferSize items that are emitted within a specified time window. |
ConnectableFlowable<T> | replay(int bufferSize,Scheduler scheduler)Returns a ConnectableFlowable that shares a single subscription to the source Publisher and replays at mostbufferSize items emitted by that Publisher. |
ConnectableFlowable<T> | replay(long time,TimeUnit unit)Returns a ConnectableFlowable that shares a single subscription to the source Publisher and replays all items emitted by that Publisher within a specified time window. |
ConnectableFlowable<T> | replay(long time,TimeUnit unit,Scheduler scheduler)Returns a ConnectableFlowable that shares a single subscription to the source Publisher and replays all items emitted by that Publisher within a specified time window. |
ConnectableFlowable<T> | replay(Scheduler scheduler)Returns a ConnectableFlowable that shares a single subscription to the source Publisher that will replay all of its items and notifications to any futureSubscriber on the givenScheduler. |
Flowable<T> | retry()Returns a Flowable that mirrors the source Publisher, resubscribing to it if it calls onError (infinite retry count). |
Flowable<T> | retry(BiPredicate<? superInteger,? superThrowable> predicate)Returns a Flowable that mirrors the source Publisher, resubscribing to it if it calls onError and the predicate returns true for that specific exception and retry count. |
Flowable<T> | retry(long count)Returns a Flowable that mirrors the source Publisher, resubscribing to it if it calls onError up to a specified number of retries. |
Flowable<T> | retry(long times,Predicate<? superThrowable> predicate)Retries at most times or until the predicate returns false, whichever happens first. |
Flowable<T> | retry(Predicate<? superThrowable> predicate)Retries the current Flowable if the predicate returns true. |
Flowable<T> | retryUntil(BooleanSupplier stop)Retries until the given stop function returns true. |
Flowable<T> | retryWhen(Function<? superFlowable<Throwable>,? extendsPublisher<?>> handler)Returns a Flowable that emits the same values as the source Publisher with the exception of an onError. |
void | safeSubscribe(Subscriber<? superT> s)Subscribes to the current Flowable and wraps the given Subscriber into a SafeSubscriber (if not already a SafeSubscriber) that deals with exceptions thrown by a misbehaving Subscriber (that doesn't follow the Reactive Streams specification). |
Flowable<T> | sample(long period,TimeUnit unit)Returns a Flowable that emits the most recently emitted item (if any) emitted by the source Publisher within periodic time intervals. |
Flowable<T> | sample(long period,TimeUnit unit, boolean emitLast)Returns a Flowable that emits the most recently emitted item (if any) emitted by the source Publisher within periodic time intervals and optionally emit the very last upstream item when the upstream completes. |
Flowable<T> | sample(long period,TimeUnit unit,Scheduler scheduler)Returns a Flowable that emits the most recently emitted item (if any) emitted by the source Publisher within periodic time intervals, where the intervals are defined on a particular Scheduler. |
Flowable<T> | sample(long period,TimeUnit unit,Scheduler scheduler, boolean emitLast)Returns a Flowable that emits the most recently emitted item (if any) emitted by the source Publisher within periodic time intervals, where the intervals are defined on a particular Scheduler and optionally emit the very last upstream item when the upstream completes. |
<U> Flowable<T> | sample(Publisher<U> sampler)Returns a Flowable that, when the specified sampler Publisher emits an item or completes, emits the most recently emitted item (if any) emitted by the source Publisher since the previous emission from thesampler Publisher. |
<U> Flowable<T> | sample(Publisher<U> sampler, boolean emitLast)Returns a Flowable that, when the specified sampler Publisher emits an item or completes, emits the most recently emitted item (if any) emitted by the source Publisher since the previous emission from thesampler Publisher and optionally emit the very last upstream item when the upstream or other Publisher complete. |
Flowable<T> | scan(BiFunction<T,T,T> accumulator)Returns a Flowable that applies a specified accumulator function to the first item emitted by a source Publisher, then feeds the result of that function along with the second item emitted by the source Publisher into the same function, and so on until all items have been emitted by the source Publisher, emitting the result of each of these iterations. |
<R> Flowable<R> | scan(R initialValue,BiFunction<R,? superT,R> accumulator)Returns a Flowable that applies a specified accumulator function to the first item emitted by a source Publisher and a seed value, then feeds the result of that function along with the second item emitted by the source Publisher into the same function, and so on until all items have been emitted by the source Publisher, emitting the result of each of these iterations. |
<R> Flowable<R> | scanWith(Callable<R> seedSupplier,BiFunction<R,? superT,R> accumulator)Returns a Flowable that applies a specified accumulator function to the first item emitted by a source Publisher and a seed value, then feeds the result of that function along with the second item emitted by the source Publisher into the same function, and so on until all items have been emitted by the source Publisher, emitting the result of each of these iterations. |
static <T> Single<Boolean> | sequenceEqual(Publisher<? extends T> source1,Publisher<? extends T> source2)Returns a Single that emits a Boolean value that indicates whether two Publisher sequences are the same by comparing the items emitted by each Publisher pairwise. |
static <T> Single<Boolean> | sequenceEqual(Publisher<? extends T> source1,Publisher<? extends T> source2,BiPredicate<? super T,? super T> isEqual)Returns a Single that emits a Boolean value that indicates whether two Publisher sequences are the same by comparing the items emitted by each Publisher pairwise based on the results of a specified equality function. |
static <T> Single<Boolean> | sequenceEqual(Publisher<? extends T> source1,Publisher<? extends T> source2,BiPredicate<? super T,? super T> isEqual, int bufferSize)Returns a Single that emits a Boolean value that indicates whether two Publisher sequences are the same by comparing the items emitted by each Publisher pairwise based on the results of a specified equality function. |
static <T> Single<Boolean> | sequenceEqual(Publisher<? extends T> source1,Publisher<? extends T> source2, int bufferSize)Returns a Single that emits a Boolean value that indicates whether two Publisher sequences are the same by comparing the items emitted by each Publisher pairwise. |
Flowable<T> | serialize()Forces a Publisher's emissions and notifications to be serialized and for it to obeythe Publisher contract in other ways. |
Flowable<T> | share() |
Single<T> | single(T defaultItem)Returns a Single that emits the single item emitted by the source Publisher, if that Publisher emits only a single item, or a default item if the source Publisher emits no items. |
Maybe<T> | singleElement()Returns a Maybe that completes if this Flowable is empty, signals one item if this Flowable signals exactly one item or signals an IllegalArgumentException if this Flowable signals more than one item. |
Single<T> | singleOrError()Returns a Single that emits the single item emitted by this Flowable, if this Flowable emits only a single item, otherwise if this Flowable completes without emitting any items a NoSuchElementException will be signaled and if this Flowable emits more than one item, anIllegalArgumentException will be signaled. |
Flowable<T> | skip(long count)Returns a Flowable that skips the first count items emitted by the source Publisher and emits the remainder. |
Flowable<T> | skip(long time,TimeUnit unit)Returns a Flowable that skips values emitted by the source Publisher before a specified time window elapses. |
Flowable<T> | skip(long time,TimeUnit unit,Scheduler scheduler)Returns a Flowable that skips values emitted by the source Publisher before a specified time window on a specified Scheduler elapses. |
Flowable<T> | skipLast(int count)Returns a Flowable that drops a specified number of items from the end of the sequence emitted by the source Publisher. |
Flowable<T> | skipLast(long time,TimeUnit unit)Returns a Flowable that drops items emitted by the source Publisher during a specified time window before the source completes. |
Flowable<T> | skipLast(long time,TimeUnit unit, boolean delayError)Returns a Flowable that drops items emitted by the source Publisher during a specified time window before the source completes. |
Flowable<T> | skipLast(long time,TimeUnit unit,Scheduler scheduler)Returns a Flowable that drops items emitted by the source Publisher during a specified time window (defined on a specified scheduler) before the source completes. |
Flowable<T> | skipLast(long time,TimeUnit unit,Scheduler scheduler, boolean delayError)Returns a Flowable that drops items emitted by the source Publisher during a specified time window (defined on a specified scheduler) before the source completes. |
Flowable<T> | skipLast(long time,TimeUnit unit,Scheduler scheduler, boolean delayError, int bufferSize)Returns a Flowable that drops items emitted by the source Publisher during a specified time window (defined on a specified scheduler) before the source completes. |
<U> Flowable<T> | skipUntil(Publisher<U> other)Returns a Flowable that skips items emitted by the source Publisher until a second Publisher emits an item. |
Flowable<T> | skipWhile(Predicate<? superT> predicate)Returns a Flowable that skips all items emitted by the source Publisher as long as a specified condition holds true, but emits all further source items as soon as the condition becomes false. |
Flowable<T> | sorted()Returns a Flowable that emits the events emitted by source Publisher, in a sorted order. |
Flowable<T> | sorted(Comparator<? superT> sortFunction)Returns a Flowable that emits the events emitted by source Publisher, in a sorted order based on a specified comparison function. |
Flowable<T> | startWith(Iterable<? extendsT> items)Returns a Flowable that emits the items in a specified Iterable before it begins to emit items emitted by the source Publisher. |
Flowable<T> | startWith(Publisher<? extendsT> other)Returns a Flowable that emits the items in a specified Publisher before it begins to emit items emitted by the source Publisher. |
Flowable<T> | startWith(T value)Returns a Flowable that emits a specified item before it begins to emit items emitted by the source Publisher. |
Flowable<T> | startWithArray(T... items)Returns a Flowable that emits the specified items before it begins to emit items emitted by the source Publisher. |
Disposable | subscribe()Subscribes to a Publisher and ignores onNext andonComplete emissions. |
Disposable | subscribe(Consumer<? superT> onNext)Subscribes to a Publisher and provides a callback to handle the items it emits. |
Disposable | subscribe(Consumer<? superT> onNext,Consumer<? superThrowable> onError)Subscribes to a Publisher and provides callbacks to handle the items it emits and any error notification it issues. |
Disposable | subscribe(Consumer<? superT> onNext,Consumer<? superThrowable> onError,Action onComplete)Subscribes to a Publisher and provides callbacks to handle the items it emits and any error or completion notification it issues. |
Disposable | subscribe(Consumer<? superT> onNext,Consumer<? superThrowable> onError,Action onComplete,Consumer<? superSubscription> onSubscribe)Subscribes to a Publisher and provides callbacks to handle the items it emits and any error or completion notification it issues. |
void | subscribe(FlowableSubscriber<? superT> s)Establish a connection between this Flowable and the given FlowableSubscriber and start streaming events based on the demand of the FlowableSubscriber. |
void | subscribe(Subscriber<? superT> s) |
protected abstract void | subscribeActual(Subscriber<? superT> s)Operator implementations (both source and intermediate) should implement this method that performs the necessary business logic and handles the incoming Subscribers. |
Flowable<T> | subscribeOn(Scheduler scheduler)Asynchronously subscribes Subscribers to this Publisher on the specified Scheduler. |
Flowable<T> | subscribeOn(Scheduler scheduler, boolean requestOn) |
<E extendsSubscriber<? superT>> | subscribeWith(E subscriber)Subscribes a given Subscriber (subclass) to this Flowable and returns the given Subscriber as is. |
Flowable<T> | switchIfEmpty(Publisher<? extendsT> other)Returns a Flowable that emits the items emitted by the source Publisher or the items of an alternate Publisher if the source Publisher is empty. |
<R> Flowable<R> | switchMap(Function<? superT,? extendsPublisher<? extends R>> mapper)Returns a new Publisher by applying a function that you supply to each item emitted by the source Publisher that returns a Publisher, and then emitting the items emitted by the most recently emitted of these Publishers. |
<R> Flowable<R> | switchMap(Function<? superT,? extendsPublisher<? extends R>> mapper, int bufferSize)Returns a new Publisher by applying a function that you supply to each item emitted by the source Publisher that returns a Publisher, and then emitting the items emitted by the most recently emitted of these Publishers. |
Completable | switchMapCompletable(Function<? superT,? extendsCompletableSource> mapper)Maps the upstream values into CompletableSources, subscribes to the newer one while disposing the subscription to the previousCompletableSource, thus keeping at most one activeCompletableSource running. |
Completable | switchMapCompletableDelayError(Function<? superT,? extendsCompletableSource> mapper)Maps the upstream values into CompletableSources, subscribes to the newer one while disposing the subscription to the previousCompletableSource, thus keeping at most one activeCompletableSource running and delaying any main or inner errors until all of them terminate. |
<R> Flowable<R> | switchMapDelayError(Function<? superT,? extendsPublisher<? extends R>> mapper)Returns a new Publisher by applying a function that you supply to each item emitted by the source Publisher that returns a Publisher, and then emitting the items emitted by the most recently emitted of these Publishers and delays any error until all Publishers terminate. |
<R> Flowable<R> | switchMapDelayError(Function<? superT,? extendsPublisher<? extends R>> mapper, int bufferSize)Returns a new Publisher by applying a function that you supply to each item emitted by the source Publisher that returns a Publisher, and then emitting the items emitted by the most recently emitted of these Publishers and delays any error until all Publishers terminate. |
<R> Flowable<R> | switchMapMaybe(Function<? superT,? extendsMaybeSource<? extends R>> mapper)Maps the upstream items into MaybeSources 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 thisFlowable or any of the active innerMaybeSources fail. |
<R> Flowable<R> | switchMapMaybeDelayError(Function<? superT,? extendsMaybeSource<? extends R>> mapper)Maps the upstream items into MaybeSources 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 thisFlowable or the innerMaybeSources until all terminate. |
<R> Flowable<R> | switchMapSingle(Function<? superT,? extendsSingleSource<? extends R>> mapper)Maps the upstream items into SingleSources 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 thisFlowable or any of the active innerSingleSources fail. |
<R> Flowable<R> | switchMapSingleDelayError(Function<? superT,? extendsSingleSource<? extends R>> mapper)Maps the upstream items into SingleSources 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 thisFlowable or the innerSingleSources until all terminate. |
static <T> Flowable<T> | switchOnNext(Publisher<? extendsPublisher<? extends T>> sources)Converts a Publisher that emits Publishers into a Publisher that emits the items emitted by the most recently emitted of those Publishers. |
static <T> Flowable<T> | switchOnNext(Publisher<? extendsPublisher<? extends T>> sources, int bufferSize)Converts a Publisher that emits Publishers into a Publisher that emits the items emitted by the most recently emitted of those Publishers. |
static <T> Flowable<T> | switchOnNextDelayError(Publisher<? extendsPublisher<? extends T>> sources)Converts a Publisher that emits Publishers into a Publisher that emits the items emitted by the most recently emitted of those Publishers and delays any exception until all Publishers terminate. |
static <T> Flowable<T> | switchOnNextDelayError(Publisher<? extendsPublisher<? extends T>> sources, int prefetch)Converts a Publisher that emits Publishers into a Publisher that emits the items emitted by the most recently emitted of those Publishers and delays any exception until all Publishers terminate. |
Flowable<T> | take(long count)Returns a Flowable that emits only the first count items emitted by the source Publisher. |
Flowable<T> | take(long time,TimeUnit unit)Returns a Flowable that emits those items emitted by source Publisher before a specified time runs out. |
Flowable<T> | take(long time,TimeUnit unit,Scheduler scheduler)Returns a Flowable that emits those items emitted by source Publisher before a specified time (on a specified Scheduler) runs out. |
Flowable<T> | takeLast(int count)Returns a Flowable that emits at most the last count items emitted by the source Publisher. |
Flowable<T> | takeLast(long count, long time,TimeUnit unit)Returns a Flowable that emits at most a specified number of items from the source Publisher that were emitted in a specified window of time before the Publisher completed. |
Flowable<T> | takeLast(long count, long time,TimeUnit unit,Scheduler scheduler)Returns a Flowable that emits at most a specified number of items from the source Publisher that were emitted in a specified window of time before the Publisher completed, where the timing information is provided by a given Scheduler. |
Flowable<T> | takeLast(long count, long time,TimeUnit unit,Scheduler scheduler, boolean delayError, int bufferSize)Returns a Flowable that emits at most a specified number of items from the source Publisher that were emitted in a specified window of time before the Publisher completed, where the timing information is provided by a given Scheduler. |
Flowable<T> | takeLast(long time,TimeUnit unit)Returns a Flowable that emits the items from the source Publisher that were emitted in a specified window of time before the Publisher completed. |
Flowable<T> | takeLast(long time,TimeUnit unit, boolean delayError)Returns a Flowable that emits the items from the source Publisher that were emitted in a specified window of time before the Publisher completed. |
Flowable<T> | takeLast(long time,TimeUnit unit,Scheduler scheduler)Returns a Flowable that emits the items from the source Publisher that were emitted in a specified window of time before the Publisher completed, where the timing information is provided by a specified Scheduler. |
Flowable<T> | takeLast(long time,TimeUnit unit,Scheduler scheduler, boolean delayError)Returns a Flowable that emits the items from the source Publisher that were emitted in a specified window of time before the Publisher completed, where the timing information is provided by a specified Scheduler. |
Flowable<T> | takeLast(long time,TimeUnit unit,Scheduler scheduler, boolean delayError, int bufferSize)Returns a Flowable that emits the items from the source Publisher that were emitted in a specified window of time before the Publisher completed, where the timing information is provided by a specified Scheduler. |
Flowable<T> | takeUntil(Predicate<? superT> stopPredicate)Returns a Flowable that emits items emitted by the source Publisher, checks the specified predicate for each item, and then completes when the condition is satisfied. |
<U> Flowable<T> | takeUntil(Publisher<U> other)Returns a Flowable that emits the items emitted by the source Publisher until a second Publisher emits an item. |
Flowable<T> | takeWhile(Predicate<? superT> predicate)Returns a Flowable that emits items emitted by the source Publisher so long as each item satisfied a specified condition, and then completes as soon as this condition is not satisfied. |
TestSubscriber<T> | test()Creates a TestSubscriber that requests Long.MAX_VALUE and subscribes it to this Flowable. |
TestSubscriber<T> | test(long initialRequest)Creates a TestSubscriber with the given initial request amount and subscribes it to this Flowable. |
TestSubscriber<T> | test(long initialRequest, boolean cancel)Creates a TestSubscriber with the given initial request amount, optionally cancels it before the subscription and subscribes it to this Flowable. |
Flowable<T> | throttleFirst(long windowDuration,TimeUnit unit)Returns a Flowable that emits only the first item emitted by the source Publisher during sequential time windows of a specified duration. |
Flowable<T> | throttleFirst(long skipDuration,TimeUnit unit,Scheduler scheduler)Returns a Flowable that emits only the first item emitted by the source Publisher during sequential time windows of a specified duration, where the windows are managed by a specified Scheduler. |
Flowable<T> | throttleLast(long intervalDuration,TimeUnit unit)Returns a Flowable that emits only the last item emitted by the source Publisher during sequential time windows of a specified duration. |
Flowable<T> | throttleLast(long intervalDuration,TimeUnit unit,Scheduler scheduler)Returns a Flowable that emits only the last item emitted by the source Publisher during sequential time windows of a specified duration, where the duration is governed by a specified Scheduler. |
Flowable<T> | throttleLatest(long timeout,TimeUnit unit)Throttles items from the upstream Flowable by first emitting the next item from upstream, then periodically emitting the latest item (if any) when the specified timeout elapses between them. |
Flowable<T> | throttleLatest(long timeout,TimeUnit unit, boolean emitLast)Throttles items from the upstream Flowable by first emitting the next item from upstream, then periodically emitting the latest item (if any) when the specified timeout elapses between them. |
Flowable<T> | throttleLatest(long timeout,TimeUnit unit,Scheduler scheduler)Throttles items from the upstream Flowable by first emitting the next item from upstream, then periodically emitting the latest item (if any) when the specified timeout elapses between them. |
Flowable<T> | throttleLatest(long timeout,TimeUnit unit,Scheduler scheduler, boolean emitLast)Throttles items from the upstream Flowable by first emitting the next item from upstream, then periodically emitting the latest item (if any) when the specified timeout elapses between them. |
Flowable<T> | throttleWithTimeout(long timeout,TimeUnit unit)Returns a Flowable that mirrors the source Publisher, except that it drops items emitted by the source Publisher that are followed by newer items before a timeout value expires. |
Flowable<T> | throttleWithTimeout(long timeout,TimeUnit unit,Scheduler scheduler)Returns a Flowable that mirrors the source Publisher, except that it drops items emitted by the source Publisher that are followed by newer items before a timeout value expires on a specified Scheduler. |
Flowable<Timed<T>> | timeInterval()Returns a Flowable that emits records of the time interval between consecutive items emitted by the source Publisher. |
Flowable<Timed<T>> | timeInterval(Scheduler scheduler)Returns a Flowable that emits records of the time interval between consecutive items emitted by the source Publisher, where this interval is computed on a specified Scheduler. |
Flowable<Timed<T>> | timeInterval(TimeUnit unit)Returns a Flowable that emits records of the time interval between consecutive items emitted by the source Publisher. |
Flowable<Timed<T>> | timeInterval(TimeUnit unit,Scheduler scheduler)Returns a Flowable that emits records of the time interval between consecutive items emitted by the source Publisher, where this interval is computed on a specified Scheduler. |
<V> Flowable<T> | timeout(Function<? superT,? extendsPublisher<V>> itemTimeoutIndicator)Returns a Flowable that mirrors the source Publisher, but notifies Subscribers of a TimeoutException if an item emitted by the source Publisher doesn't arrive within a window of time after the emission of the previous item, where that period of time is measured by a Publisher that is a function of the previous item. |
<V> Flowable<T> | timeout(Function<? superT,? extendsPublisher<V>> itemTimeoutIndicator,Flowable<? extendsT> other)Returns a Flowable that mirrors the source Publisher, but that switches to a fallback Publisher if an item emitted by the source Publisher doesn't arrive within a window of time after the emission of the previous item, where that period of time is measured by a Publisher that is a function of the previous item. |
Flowable<T> | timeout(long timeout,TimeUnit timeUnit)Returns a Flowable that mirrors the source Publisher but applies a timeout policy for each emitted item. |
Flowable<T> | timeout(long timeout,TimeUnit timeUnit,Publisher<? extendsT> other)Returns a Flowable that mirrors the source Publisher but applies a timeout policy for each emitted item. |
Flowable<T> | timeout(long timeout,TimeUnit timeUnit,Scheduler scheduler)Returns a Flowable that mirrors the source Publisher but applies a timeout policy for each emitted item, where this policy is governed by a specified Scheduler. |
Flowable<T> | timeout(long timeout,TimeUnit timeUnit,Scheduler scheduler,Publisher<? extendsT> other)Returns a Flowable that mirrors the source Publisher but applies a timeout policy for each emitted item using a specified Scheduler. |
<U,V> Flowable<T> | timeout(Publisher<U> firstTimeoutIndicator,Function<? superT,? extendsPublisher<V>> itemTimeoutIndicator)Returns a Flowable that mirrors the source Publisher, but notifies Subscribers of a TimeoutException if either the first item emitted by the source Publisher or any subsequent item doesn't arrive within time windows defined by other Publishers. |
<U,V> Flowable<T> | timeout(Publisher<U> firstTimeoutIndicator,Function<? superT,? extendsPublisher<V>> itemTimeoutIndicator,Publisher<? extendsT> other)Returns a Flowable that mirrors the source Publisher, but switches to a fallback Publisher if either the first item emitted by the source Publisher or any subsequent item doesn't arrive within time windows defined by other Publishers. |
staticFlowable<Long> | timer(long delay,TimeUnit unit)Returns a Flowable that emits 0L after a specified delay, and then completes. |
staticFlowable<Long> | timer(long delay,TimeUnit unit,Scheduler scheduler)Returns a Flowable that emits 0L after a specified delay, on a specified Scheduler, and then completes. |
Flowable<Timed<T>> | timestamp()Returns a Flowable that emits each item emitted by the source Publisher, wrapped in a Timed object. |
Flowable<Timed<T>> | timestamp(Scheduler scheduler)Returns a Flowable that emits each item emitted by the source Publisher, wrapped in a Timed object whose timestamps are provided by a specified Scheduler. |
Flowable<Timed<T>> | timestamp(TimeUnit unit)Returns a Flowable that emits each item emitted by the source Publisher, wrapped in a Timed object. |
Flowable<Timed<T>> | timestamp(TimeUnit unit,Scheduler scheduler)Returns a Flowable that emits each item emitted by the source Publisher, wrapped in a Timed object whose timestamps are provided by a specified Scheduler. |
<R> R | to(Function<? superFlowable<T>,R> converter)Calls the specified converter function during assembly time and returns its resulting value. |
Future<T> | toFuture()Returns a Future representing the only value emitted by thisFlowable. |
Single<List<T>> | toList()Returns a Single that emits a single item, a list composed of all the items emitted by the finite upstream source Publisher. |
<U extendsCollection<? superT>> | toList(Callable<U> collectionSupplier)Returns a Single that emits a single item, a list composed of all the items emitted by the finite source Publisher. |
Single<List<T>> | toList(int capacityHint)Returns a Single that emits a single item, a list composed of all the items emitted by the finite source Publisher. |
<K> Single<Map<K,T>> | toMap(Function<? superT,? extends K> keySelector)Returns a Single that emits a single HashMap containing all items emitted by the finite source Publisher, mapped by the keys returned by a specified keySelector function. |
<K,V> Single<Map<K,V>> | toMap(Function<? superT,? extends K> keySelector,Function<? superT,? extends V> valueSelector)Returns a Single that emits a single HashMap containing values corresponding to items emitted by the finite source Publisher, mapped by the keys returned by a specified keySelector function. |
<K,V> Single<Map<K,V>> | toMap(Function<? superT,? extends K> keySelector,Function<? superT,? extends V> valueSelector,Callable<? extendsMap<K,V>> mapSupplier)Returns a Single that emits a single Map, returned by a specified mapFactory function, that contains keys and values extracted from the items emitted by the finite source Publisher. |
<K> Single<Map<K,Collection<T>>> | toMultimap(Function<? superT,? extends K> keySelector)Returns a Single that emits a single HashMap that contains an ArrayList of items emitted by the finite source Publisher keyed by a specified keySelector function. |
<K,V> Single<Map<K,Collection<V>>> | toMultimap(Function<? superT,? extends K> keySelector,Function<? superT,? extends V> valueSelector)Returns a Single that emits a single HashMap that contains an ArrayList of values extracted by a specified valueSelector function from items emitted by the finite source Publisher, keyed by a specifiedkeySelector function. |
<K,V> Single<Map<K,Collection<V>>> | toMultimap(Function<? superT,? extends K> keySelector,Function<? superT,? extends V> valueSelector,Callable<? extendsMap<K,Collection<V>>> mapSupplier,Function<? super K,? extendsCollection<? super V>> collectionFactory)Returns a Single that emits a single Map, returned by a specified mapFactory function, that contains a custom collection of values, extracted by a specifiedvalueSelector function from items emitted by the finite source Publisher, and keyed by thekeySelector function. |
<K,V> Single<Map<K,Collection<V>>> | toMultimap(Function<? superT,? extends K> keySelector,Function<? superT,? extends V> valueSelector,Callable<Map<K,Collection<V>>> mapSupplier)Returns a Single that emits a single Map, returned by a specified mapFactory function, that contains an ArrayList of values, extracted by a specifiedvalueSelector function from items emitted by the finite source Publisher and keyed by thekeySelector function. |
Observable<T> | toObservable()Converts the current Flowable into a non-backpressured Observable. |
Single<List<T>> | toSortedList()Returns a Single that emits a list that contains the items emitted by the finite source Publisher, in a sorted order. |
Single<List<T>> | toSortedList(Comparator<? superT> comparator)Returns a Single that emits a list that contains the items emitted by the finite source Publisher, in a sorted order based on a specified comparison function. |
Single<List<T>> | toSortedList(Comparator<? superT> comparator, int capacityHint)Returns a Single that emits a list that contains the items emitted by the finite source Publisher, in a sorted order based on a specified comparison function. |
Single<List<T>> | toSortedList(int capacityHint)Returns a Flowable that emits a list that contains the items emitted by the finite source Publisher, in a sorted order. |
static <T> Flowable<T> | unsafeCreate(Publisher<T> onSubscribe)Create a Flowable by wrapping a Publisherwhich has to be implemented according to the Reactive Streams specification by handling backpressure and cancellation correctly; no safeguards are provided by the Flowable itself. |
Flowable<T> | unsubscribeOn(Scheduler scheduler)Modifies the source Publisher so that subscribers will cancel it on a specified Scheduler. |
static <T,D> Flowable<T> | using(Callable<? extends D> resourceSupplier,Function<? super D,? extendsPublisher<? extends T>> sourceSupplier,Consumer<? super D> resourceDisposer)Constructs a Publisher that creates a dependent resource object which is disposed of on cancellation. |
static <T,D> Flowable<T> | using(Callable<? extends D> resourceSupplier,Function<? super D,? extendsPublisher<? extends T>> sourceSupplier,Consumer<? super D> resourceDisposer, boolean eager)Constructs a Publisher that creates a dependent resource object which is disposed of just before termination if you have set disposeEagerly totrue and cancellation does not occur before termination. |
<B> Flowable<Flowable<T>> | window(Callable<? extendsPublisher<B>> boundaryIndicatorSupplier)Returns a Flowable that emits windows of items it collects from the source Publisher. |
<B> Flowable<Flowable<T>> | window(Callable<? extendsPublisher<B>> boundaryIndicatorSupplier, int bufferSize)Returns a Flowable that emits windows of items it collects from the source Publisher. |
Flowable<Flowable<T>> | window(long count)Returns a Flowable that emits windows of items it collects from the source Publisher. |
Flowable<Flowable<T>> | window(long count, long skip)Returns a Flowable that emits windows of items it collects from the source Publisher. |
Flowable<Flowable<T>> | window(long count, long skip, int bufferSize)Returns a Flowable that emits windows of items it collects from the source Publisher. |
Flowable<Flowable<T>> | window(long timespan, long timeskip,TimeUnit unit)Returns a Flowable that emits windows of items it collects from the source Publisher. |
Flowable<Flowable<T>> | window(long timespan, long timeskip,TimeUnit unit,Scheduler scheduler)Returns a Flowable that emits windows of items it collects from the source Publisher. |
Flowable<Flowable<T>> | window(long timespan, long timeskip,TimeUnit unit,Scheduler scheduler, int bufferSize)Returns a Flowable that emits windows of items it collects from the source Publisher. |
Flowable<Flowable<T>> | window(long timespan,TimeUnit unit)Returns a Flowable that emits windows of items it collects from the source Publisher. |
Flowable<Flowable<T>> | window(long timespan,TimeUnit unit, long count)Returns a Flowable that emits windows of items it collects from the source Publisher. |
Flowable<Flowable<T>> | window(long timespan,TimeUnit unit, long count, boolean restart)Returns a Flowable that emits windows of items it collects from the source Publisher. |
Flowable<Flowable<T>> | window(long timespan,TimeUnit unit,Scheduler scheduler)Returns a Flowable that emits windows of items it collects from the source Publisher. |
Flowable<Flowable<T>> | window(long timespan,TimeUnit unit,Scheduler scheduler, long count)Returns a Flowable that emits windows of items it collects from the source Publisher. |
Flowable<Flowable<T>> | window(long timespan,TimeUnit unit,Scheduler scheduler, long count, boolean restart)Returns a Flowable that emits windows of items it collects from the source Publisher. |
Flowable<Flowable<T>> | window(long timespan,TimeUnit unit,Scheduler scheduler, long count, boolean restart, int bufferSize)Returns a Flowable that emits windows of items it collects from the source Publisher. |
<B> Flowable<Flowable<T>> | window(Publisher<B> boundaryIndicator)Returns a Flowable that emits non-overlapping windows of items it collects from the source Publisher where the boundary of each window is determined by the items emitted from a specified boundary-governing Publisher. |
<B> Flowable<Flowable<T>> | window(Publisher<B> boundaryIndicator, int bufferSize)Returns a Flowable that emits non-overlapping windows of items it collects from the source Publisher where the boundary of each window is determined by the items emitted from a specified boundary-governing Publisher. |
<U,V> Flowable<Flowable<T>> | window(Publisher<U> openingIndicator,Function<? super U,? extendsPublisher<V>> closingIndicator)Returns a Flowable that emits windows of items it collects from the source Publisher. |
<U,V> Flowable<Flowable<T>> | window(Publisher<U> openingIndicator,Function<? super U,? extendsPublisher<V>> closingIndicator, int bufferSize)Returns a Flowable that emits windows of items it collects from the source Publisher. |
<R> Flowable<R> | withLatestFrom(Iterable<? extendsPublisher<?>> others,Function<? superObject[],R> combiner)Combines the value emission from this Publisher with the latest emissions from the other Publishers via a function to produce the output item. |
<R> Flowable<R> | withLatestFrom(Publisher<?>[] others,Function<? superObject[],R> combiner)Combines the value emission from this Publisher with the latest emissions from the other Publishers via a function to produce the output item. |
<U,R> Flowable<R> | withLatestFrom(Publisher<? extends U> other,BiFunction<? superT,? super U,? extends R> combiner)Merges the specified Publisher into this Publisher sequence by using the resultSelector function only when the source Publisher (this instance) emits an item. |
<T1,T2,R> Flowable<R> | withLatestFrom(Publisher<T1> source1,Publisher<T2> source2,Function3<? superT,? super T1,? super T2,R> combiner)Combines the value emission from this Publisher with the latest emissions from the other Publishers via a function to produce the output item. |
<T1,T2,T3,R> | withLatestFrom(Publisher<T1> source1,Publisher<T2> source2,Publisher<T3> source3,Function4<? superT,? super T1,? super T2,? super T3,R> combiner)Combines the value emission from this Publisher with the latest emissions from the other Publishers via a function to produce the output item. |
<T1,T2,T3,T4,R> | withLatestFrom(Publisher<T1> source1,Publisher<T2> source2,Publisher<T3> source3,Publisher<T4> source4,Function5<? superT,? super T1,? super T2,? super T3,? super T4,R> combiner)Combines the value emission from this Publisher with the latest emissions from the other Publishers via a function to produce the output item. |
static <T,R> Flowable<R> | zip(Iterable<? extendsPublisher<? extends T>> sources,Function<? superObject[],? extends R> zipper)Returns a Flowable that emits the results of a specified combiner function applied to combinations of items emitted, in sequence, by an Iterable of other Publishers. |
static <T,R> Flowable<R> | zip(Publisher<? extendsPublisher<? extends T>> sources,Function<? superObject[],? extends R> zipper)Returns a Flowable that emits the results of a specified combiner function applied to combinations ofn items emitted, in sequence, by then Publishers emitted by a specified Publisher. |
static <T1,T2,R> Flowable<R> | zip(Publisher<? extends T1> source1,Publisher<? extends T2> source2,BiFunction<? super T1,? super T2,? extends R> zipper)Returns a Flowable that emits the results of a specified combiner function applied to combinations of two items emitted, in sequence, by two other Publishers. |
static <T1,T2,R> Flowable<R> | zip(Publisher<? extends T1> source1,Publisher<? extends T2> source2,BiFunction<? super T1,? super T2,? extends R> zipper, boolean delayError)Returns a Flowable that emits the results of a specified combiner function applied to combinations of two items emitted, in sequence, by two other Publishers. |
static <T1,T2,R> Flowable<R> | zip(Publisher<? extends T1> source1,Publisher<? extends T2> source2,BiFunction<? super T1,? super T2,? extends R> zipper, boolean delayError, int bufferSize)Returns a Flowable that emits the results of a specified combiner function applied to combinations of two items emitted, in sequence, by two other Publishers. |
static <T1,T2,T3,R> | zip(Publisher<? extends T1> source1,Publisher<? extends T2> source2,Publisher<? extends T3> source3,Function3<? super T1,? super T2,? super T3,? extends R> zipper)Returns a Flowable that emits the results of a specified combiner function applied to combinations of three items emitted, in sequence, by three other Publishers. |
static <T1,T2,T3,T4,R> | zip(Publisher<? extends T1> source1,Publisher<? extends T2> source2,Publisher<? extends T3> source3,Publisher<? extends T4> source4,Function4<? super T1,? super T2,? super T3,? super T4,? extends R> zipper)Returns a Flowable that emits the results of a specified combiner function applied to combinations of four items emitted, in sequence, by four other Publishers. |
static <T1,T2,T3,T4,T5,R> | zip(Publisher<? extends T1> source1,Publisher<? extends T2> source2,Publisher<? extends T3> source3,Publisher<? extends T4> source4,Publisher<? extends T5> source5,Function5<? super T1,? super T2,? super T3,? super T4,? super T5,? extends R> zipper)Returns a Flowable that emits the results of a specified combiner function applied to combinations of five items emitted, in sequence, by five other Publishers. |
static <T1,T2,T3,T4,T5,T6,R> | zip(Publisher<? extends T1> source1,Publisher<? extends T2> source2,Publisher<? extends T3> source3,Publisher<? extends T4> source4,Publisher<? extends T5> source5,Publisher<? extends T6> source6,Function6<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? extends R> zipper)Returns a Flowable that emits the results of a specified combiner function applied to combinations of six items emitted, in sequence, by six other Publishers. |
static <T1,T2,T3,T4,T5,T6,T7,R> | zip(Publisher<? extends T1> source1,Publisher<? extends T2> source2,Publisher<? extends T3> source3,Publisher<? extends T4> source4,Publisher<? extends T5> source5,Publisher<? extends T6> source6,Publisher<? extends T7> source7,Function7<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? extends R> zipper)Returns a Flowable that emits the results of a specified combiner function applied to combinations of seven items emitted, in sequence, by seven other Publishers. |
static <T1,T2,T3,T4,T5,T6,T7,T8,R> | zip(Publisher<? extends T1> source1,Publisher<? extends T2> source2,Publisher<? extends T3> source3,Publisher<? extends T4> source4,Publisher<? extends T5> source5,Publisher<? extends T6> source6,Publisher<? extends T7> source7,Publisher<? extends T8> source8,Function8<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? super T8,? extends R> zipper)Returns a Flowable that emits the results of a specified combiner function applied to combinations of eight items emitted, in sequence, by eight other Publishers. |
static <T1,T2,T3,T4,T5,T6,T7,T8,T9,R> | zip(Publisher<? extends T1> source1,Publisher<? extends T2> source2,Publisher<? extends T3> source3,Publisher<? extends T4> source4,Publisher<? extends T5> source5,Publisher<? extends T6> source6,Publisher<? extends T7> source7,Publisher<? extends T8> source8,Publisher<? extends T9> source9,Function9<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? super T8,? super T9,? extends R> zipper)Returns a Flowable that emits the results of a specified combiner function applied to combinations of nine items emitted, in sequence, by nine other Publishers. |
static <T,R> Flowable<R> | zipArray(Function<? superObject[],? extends R> zipper, boolean delayError, int bufferSize,Publisher<? extends T>... sources)Returns a Flowable that emits the results of a specified combiner function applied to combinations of items emitted, in sequence, by an array of other Publishers. |
static <T,R> Flowable<R> | zipIterable(Iterable<? extendsPublisher<? extends T>> sources,Function<? superObject[],? extends R> zipper, boolean delayError, int bufferSize)Returns a Flowable that emits the results of a specified combiner function applied to combinations of items emitted, in sequence, by an Iterable of other Publishers. |
<U,R> Flowable<R> | zipWith(Iterable<U> other,BiFunction<? superT,? super U,? extends R> zipper)Returns a Flowable that emits items that are the result of applying a specified function to pairs of values, one each from the source Publisher and a specified Iterable sequence. |
<U,R> Flowable<R> | zipWith(Publisher<? extends U> other,BiFunction<? superT,? super U,? extends R> zipper)Returns a Flowable that emits items that are the result of applying a specified function to pairs of values, one each from the source Publisher and another specified Publisher. |
<U,R> Flowable<R> | zipWith(Publisher<? extends U> other,BiFunction<? superT,? super U,? extends R> zipper, boolean delayError)Returns a Flowable that emits items that are the result of applying a specified function to pairs of values, one each from the source Publisher and another specified Publisher. |
<U,R> Flowable<R> | zipWith(Publisher<? extends U> other,BiFunction<? superT,? super U,? extends R> zipper, boolean delayError, int bufferSize)Returns a Flowable that emits items that are the result of applying a specified function to pairs of values, one each from the source Publisher and another specified Publisher. |
@CheckReturnValue@NonNull@BackpressureSupport(value=PASS_THROUGH)@SchedulerSupport(value="none")public static <T> Flowable<T> amb(Iterable<? extendsPublisher<? extends T>> sources)

Publisher's backpressure behavior.amb does not operate by default on a particularScheduler.T - the common element typesources - an Iterable of Publishers sources competing to react first. A subscription to each Publisher will occur in the same order as in this Iterable.@CheckReturnValue@NonNull@BackpressureSupport(value=PASS_THROUGH)@SchedulerSupport(value="none")public static <T> Flowable<T> ambArray(Publisher<? extends T>... sources)

Publisher's backpressure behavior.ambArray does not operate by default on a particularScheduler.T - the common element typesources - an array of Publisher sources competing to react first. A subscription to each Publisher will occur in the same order as in this Iterable.public static int bufferSize()
The value can be overridden via system parameterrx2.buffer-sizebefore the Flowable class is loaded.
@SchedulerSupport(value="none")@CheckReturnValue@BackpressureSupport(value=FULL)public static <T,R> Flowable<R> combineLatest(Publisher<? extends T>[] sources,Function<? superObject[],? extends R> combiner)
Note on method signature: since Java doesn't allow creating a generic array withnew T[], the implementation of this operator has to create anObject[] instead. Unfortunately, aFunction<Integer[], R> passed to the method would trigger aClassCastException.
If any of the sources never produces an item but only terminates (normally or with an error), the resulting sequence terminates immediately (normally or with all the errors accumulated until that point). If that input source is also synchronous, other sources after it will not be subscribed to.
If the provided array of source Publishers is empty, the resulting sequence completes immediately without emitting any items and without any calls to the combiner function.
Publisher honors backpressure from downstream. The sourcePublishers are requested in a bounded manner, however, their backpressure is not enforced (the operator won't signalMissingBackpressureException) and may lead toOutOfMemoryError due to internal buffer bloat.combineLatest does not operate by default on a particularScheduler.T - the common base type of source valuesR - the result typesources - the collection of source Publisherscombiner - the aggregation function used to combine the items emitted by the source Publishers@SchedulerSupport(value="none")@CheckReturnValue@BackpressureSupport(value=FULL)public static <T,R> Flowable<R> combineLatest(Function<? superObject[],? extends R> combiner,Publisher<? extends T>... sources)
Note on method signature: since Java doesn't allow creating a generic array withnew T[], the implementation of this operator has to create anObject[] instead. Unfortunately, aFunction<Integer[], R> passed to the method would trigger aClassCastException.
If any of the sources never produces an item but only terminates (normally or with an error), the resulting sequence terminates immediately (normally or with all the errors accumulated until that point). If that input source is also synchronous, other sources after it will not be subscribed to.
If there are no source Publishers provided, the resulting sequence completes immediately without emitting any items and without any calls to the combiner function.
Publisher honors backpressure from downstream. The sourcePublishers are requested in a bounded manner, however, their backpressure is not enforced (the operator won't signalMissingBackpressureException) and may lead toOutOfMemoryError due to internal buffer bloat.combineLatest does not operate by default on a particularScheduler.T - the common base type of source valuesR - the result typesources - the collection of source Publisherscombiner - the aggregation function used to combine the items emitted by the source Publishers@SchedulerSupport(value="none")@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)public static <T,R> Flowable<R> combineLatest(Publisher<? extends T>[] sources,Function<? superObject[],? extends R> combiner, int bufferSize)
Note on method signature: since Java doesn't allow creating a generic array withnew T[], the implementation of this operator has to create anObject[] instead. Unfortunately, aFunction<Integer[], R> passed to the method would trigger aClassCastException.
If any of the sources never produces an item but only terminates (normally or with an error), the resulting sequence terminates immediately (normally or with all the errors accumulated until that point). If that input source is also synchronous, other sources after it will not be subscribed to.
If the provided array of source Publishers is empty, the resulting sequence completes immediately without emitting any items and without any calls to the combiner function.
Publisher honors backpressure from downstream. The sourcePublishers are requested in a bounded manner, however, their backpressure is not enforced (the operator won't signalMissingBackpressureException) and may lead toOutOfMemoryError due to internal buffer bloat.combineLatest does not operate by default on a particularScheduler.T - the common base type of source valuesR - the result typesources - the collection of source Publisherscombiner - the aggregation function used to combine the items emitted by the source PublishersbufferSize - the internal buffer size and prefetch amount applied to every source Flowable@SchedulerSupport(value="none")@CheckReturnValue@BackpressureSupport(value=FULL)public static <T,R> Flowable<R> combineLatest(Iterable<? extendsPublisher<? extends T>> sources,Function<? superObject[],? extends R> combiner)
Note on method signature: since Java doesn't allow creating a generic array withnew T[], the implementation of this operator has to create anObject[] instead. Unfortunately, aFunction<Integer[], R> passed to the method would trigger aClassCastException.
If any of the sources never produces an item but only terminates (normally or with an error), the resulting sequence terminates immediately (normally or with all the errors accumulated until that point). If that input source is also synchronous, other sources after it will not be subscribed to.
If the provided iterable of source Publishers is empty, the resulting sequence completes immediately without emitting any items and without any calls to the combiner function.
Publisher honors backpressure from downstream. The sourcePublishers are requested in a bounded manner, however, their backpressure is not enforced (the operator won't signalMissingBackpressureException) and may lead toOutOfMemoryError due to internal buffer bloat.combineLatest does not operate by default on a particularScheduler.T - the common base type of source valuesR - the result typesources - the collection of source Publisherscombiner - the aggregation function used to combine the items emitted by the source Publishers@SchedulerSupport(value="none")@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)public static <T,R> Flowable<R> combineLatest(Iterable<? extendsPublisher<? extends T>> sources,Function<? superObject[],? extends R> combiner, int bufferSize)
Note on method signature: since Java doesn't allow creating a generic array withnew T[], the implementation of this operator has to create anObject[] instead. Unfortunately, aFunction<Integer[], R> passed to the method would trigger aClassCastException.
If any of the sources never produces an item but only terminates (normally or with an error), the resulting sequence terminates immediately (normally or with all the errors accumulated until that point). If that input source is also synchronous, other sources after it will not be subscribed to.
If the provided iterable of source Publishers is empty, the resulting sequence completes immediately without emitting any items and without any calls to the combiner function.
Publisher honors backpressure from downstream. The sourcePublishers are requested in a bounded manner, however, their backpressure is not enforced (the operator won't signalMissingBackpressureException) and may lead toOutOfMemoryError due to internal buffer bloat.combineLatest does not operate by default on a particularScheduler.T - the common base type of source valuesR - the result typesources - the collection of source Publisherscombiner - the aggregation function used to combine the items emitted by the source PublishersbufferSize - the internal buffer size and prefetch amount applied to every source Flowable@SchedulerSupport(value="none")@CheckReturnValue@BackpressureSupport(value=FULL)public static <T,R> Flowable<R> combineLatestDelayError(Publisher<? extends T>[] sources,Function<? superObject[],? extends R> combiner)
Note on method signature: since Java doesn't allow creating a generic array withnew T[], the implementation of this operator has to create anObject[] instead. Unfortunately, aFunction<Integer[], R> passed to the method would trigger aClassCastException.
If any of the sources never produces an item but only terminates (normally or with an error), the resulting sequence terminates immediately (normally or with all the errors accumulated until that point). If that input source is also synchronous, other sources after it will not be subscribed to.
If the provided array of source Publishers is empty, the resulting sequence completes immediately without emitting any items and without any calls to the combiner function.
Publisher honors backpressure from downstream. The sourcePublishers are requested in a bounded manner, however, their backpressure is not enforced (the operator won't signalMissingBackpressureException) and may lead toOutOfMemoryError due to internal buffer bloat.combineLatestDelayError does not operate by default on a particularScheduler.T - the common base type of source valuesR - the result typesources - the collection of source Publisherscombiner - the aggregation function used to combine the items emitted by the source Publishers@SchedulerSupport(value="none")@CheckReturnValue@BackpressureSupport(value=FULL)public static <T,R> Flowable<R> combineLatestDelayError(Function<? superObject[],? extends R> combiner,Publisher<? extends T>... sources)
Note on method signature: since Java doesn't allow creating a generic array withnew T[], the implementation of this operator has to create anObject[] instead. Unfortunately, aFunction<Integer[], R> passed to the method would trigger aClassCastException.
If any of the sources never produces an item but only terminates (normally or with an error), the resulting sequence terminates immediately (normally or with all the errors accumulated until that point). If that input source is also synchronous, other sources after it will not be subscribed to.
If there are no source Publishers provided, the resulting sequence completes immediately without emitting any items and without any calls to the combiner function.
Publisher honors backpressure from downstream. The sourcePublishers are requested in a bounded manner, however, their backpressure is not enforced (the operator won't signalMissingBackpressureException) and may lead toOutOfMemoryError due to internal buffer bloat.combineLatestDelayError does not operate by default on a particularScheduler.T - the common base type of source valuesR - the result typesources - the collection of source Publisherscombiner - the aggregation function used to combine the items emitted by the source Publishers@SchedulerSupport(value="none")@CheckReturnValue@BackpressureSupport(value=FULL)public static <T,R> Flowable<R> combineLatestDelayError(Function<? superObject[],? extends R> combiner, int bufferSize,Publisher<? extends T>... sources)
Note on method signature: since Java doesn't allow creating a generic array withnew T[], the implementation of this operator has to create anObject[] instead. Unfortunately, aFunction<Integer[], R> passed to the method would trigger aClassCastException.
If any of the sources never produces an item but only terminates (normally or with an error), the resulting sequence terminates immediately (normally or with all the errors accumulated until that point). If that input source is also synchronous, other sources after it will not be subscribed to.
If there are no source Publishers provided, the resulting sequence completes immediately without emitting any items and without any calls to the combiner function.
Publisher honors backpressure from downstream. The sourcePublishers are requested in a bounded manner, however, their backpressure is not enforced (the operator won't signalMissingBackpressureException) and may lead toOutOfMemoryError due to internal buffer bloat.combineLatestDelayError does not operate by default on a particularScheduler.T - the common base type of source valuesR - the result typesources - the collection of source Publisherscombiner - the aggregation function used to combine the items emitted by the source PublishersbufferSize - the internal buffer size and prefetch amount applied to every source Publisher@SchedulerSupport(value="none")@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)public static <T,R> Flowable<R> combineLatestDelayError(Publisher<? extends T>[] sources,Function<? superObject[],? extends R> combiner, int bufferSize)
Note on method signature: since Java doesn't allow creating a generic array withnew T[], the implementation of this operator has to create anObject[] instead. Unfortunately, aFunction<Integer[], R> passed to the method would trigger aClassCastException.
If any of the sources never produces an item but only terminates (normally or with an error), the resulting sequence terminates immediately (normally or with all the errors accumulated until that point). If that input source is also synchronous, other sources after it will not be subscribed to.
If the provided array of source Publishers is empty, the resulting sequence completes immediately without emitting any items and without any calls to the combiner function.
Publisher honors backpressure from downstream. The sourcePublishers are requested in a bounded manner, however, their backpressure is not enforced (the operator won't signalMissingBackpressureException) and may lead toOutOfMemoryError due to internal buffer bloat.combineLatestDelayError does not operate by default on a particularScheduler.T - the common base type of source valuesR - the result typesources - the collection of source Publisherscombiner - the aggregation function used to combine the items emitted by the source PublishersbufferSize - the internal buffer size and prefetch amount applied to every source Flowable@SchedulerSupport(value="none")@CheckReturnValue@BackpressureSupport(value=FULL)public static <T,R> Flowable<R> combineLatestDelayError(Iterable<? extendsPublisher<? extends T>> sources,Function<? superObject[],? extends R> combiner)
Note on method signature: since Java doesn't allow creating a generic array withnew T[], the implementation of this operator has to create anObject[] instead. Unfortunately, aFunction<Integer[], R> passed to the method would trigger aClassCastException.
If any of the sources never produces an item but only terminates (normally or with an error), the resulting sequence terminates immediately (normally or with all the errors accumulated until that point). If that input source is also synchronous, other sources after it will not be subscribed to.
If the provided iterable of source Publishers is empty, the resulting sequence completes immediately without emitting any items and without any calls to the combiner function.
Publisher honors backpressure from downstream. The sourcePublishers are requested in a bounded manner, however, their backpressure is not enforced (the operator won't signalMissingBackpressureException) and may lead toOutOfMemoryError due to internal buffer bloat.combineLatestDelayError does not operate by default on a particularScheduler.T - the common base type of source valuesR - the result typesources - the collection of source Publisherscombiner - the aggregation function used to combine the items emitted by the source Publishers@SchedulerSupport(value="none")@CheckReturnValue@BackpressureSupport(value=FULL)public static <T,R> Flowable<R> combineLatestDelayError(Iterable<? extendsPublisher<? extends T>> sources,Function<? superObject[],? extends R> combiner, int bufferSize)
Note on method signature: since Java doesn't allow creating a generic array withnew T[], the implementation of this operator has to create anObject[] instead. Unfortunately, aFunction<Integer[], R> passed to the method would trigger aClassCastException.
If any of the sources never produces an item but only terminates (normally or with an error), the resulting sequence terminates immediately (normally or with all the errors accumulated until that point). If that input source is also synchronous, other sources after it will not be subscribed to.
If the provided iterable of source Publishers is empty, the resulting sequence completes immediately without emitting any items and without any calls to the combiner function.
Publisher honors backpressure from downstream. The sourcePublishers are requested in a bounded manner, however, their backpressure is not enforced (the operator won't signalMissingBackpressureException) and may lead toOutOfMemoryError due to internal buffer bloat.combineLatestDelayError does not operate by default on a particularScheduler.T - the common base type of source valuesR - the result typesources - the collection of source Publisherscombiner - the aggregation function used to combine the items emitted by the source PublishersbufferSize - the internal buffer size and prefetch amount applied to every source Flowable@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T1,T2,R> Flowable<R> combineLatest(Publisher<? extends T1> source1,Publisher<? extends T2> source2,BiFunction<? super T1,? super T2,? extends R> combiner)
If any of the sources never produces an item but only terminates (normally or with an error), the resulting sequence terminates immediately (normally or with all the errors accumulated until that point). If that input source is also synchronous, other sources after it will not be subscribed to.

Publisher honors backpressure from downstream. The sourcePublishers are requested in a bounded manner, however, their backpressure is not enforced (the operator won't signalMissingBackpressureException) and may lead toOutOfMemoryError due to internal buffer bloat.combineLatest does not operate by default on a particularScheduler.T1 - the element type of the first sourceT2 - the element type of the second sourceR - the combined output typesource1 - the first source Publishersource2 - the second source Publishercombiner - the aggregation function used to combine the items emitted by the source Publishers@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T1,T2,T3,R> Flowable<R> combineLatest(Publisher<? extends T1> source1,Publisher<? extends T2> source2,Publisher<? extends T3> source3,Function3<? super T1,? super T2,? super T3,? extends R> combiner)
If any of the sources never produces an item but only terminates (normally or with an error), the resulting sequence terminates immediately (normally or with all the errors accumulated until that point). If that input source is also synchronous, other sources after it will not be subscribed to.

Publisher honors backpressure from downstream. The sourcePublishers are requested in a bounded manner, however, their backpressure is not enforced (the operator won't signalMissingBackpressureException) and may lead toOutOfMemoryError due to internal buffer bloat.combineLatest does not operate by default on a particularScheduler.T1 - the element type of the first sourceT2 - the element type of the second sourceT3 - the element type of the third sourceR - the combined output typesource1 - the first source Publishersource2 - the second source Publishersource3 - the third source Publishercombiner - the aggregation function used to combine the items emitted by the source Publishers@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T1,T2,T3,T4,R> Flowable<R> combineLatest(Publisher<? extends T1> source1,Publisher<? extends T2> source2,Publisher<? extends T3> source3,Publisher<? extends T4> source4,Function4<? super T1,? super T2,? super T3,? super T4,? extends R> combiner)
If any of the sources never produces an item but only terminates (normally or with an error), the resulting sequence terminates immediately (normally or with all the errors accumulated until that point). If that input source is also synchronous, other sources after it will not be subscribed to.

Publisher honors backpressure from downstream. The sourcePublishers are requested in a bounded manner, however, their backpressure is not enforced (the operator won't signalMissingBackpressureException) and may lead toOutOfMemoryError due to internal buffer bloat.combineLatest does not operate by default on a particularScheduler.T1 - the element type of the first sourceT2 - the element type of the second sourceT3 - the element type of the third sourceT4 - the element type of the fourth sourceR - the combined output typesource1 - the first source Publishersource2 - the second source Publishersource3 - the third source Publishersource4 - the fourth source Publishercombiner - the aggregation function used to combine the items emitted by the source Publishers@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T1,T2,T3,T4,T5,R> Flowable<R> combineLatest(Publisher<? extends T1> source1,Publisher<? extends T2> source2,Publisher<? extends T3> source3,Publisher<? extends T4> source4,Publisher<? extends T5> source5,Function5<? super T1,? super T2,? super T3,? super T4,? super T5,? extends R> combiner)
If any of the sources never produces an item but only terminates (normally or with an error), the resulting sequence terminates immediately (normally or with all the errors accumulated until that point). If that input source is also synchronous, other sources after it will not be subscribed to.

Publisher honors backpressure from downstream. The sourcePublishers are requested in a bounded manner, however, their backpressure is not enforced (the operator won't signalMissingBackpressureException) and may lead toOutOfMemoryError due to internal buffer bloat.combineLatest does not operate by default on a particularScheduler.T1 - the element type of the first sourceT2 - the element type of the second sourceT3 - the element type of the third sourceT4 - the element type of the fourth sourceT5 - the element type of the fifth sourceR - the combined output typesource1 - the first source Publishersource2 - the second source Publishersource3 - the third source Publishersource4 - the fourth source Publishersource5 - the fifth source Publishercombiner - the aggregation function used to combine the items emitted by the source Publishers@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T1,T2,T3,T4,T5,T6,R> Flowable<R> combineLatest(Publisher<? extends T1> source1,Publisher<? extends T2> source2,Publisher<? extends T3> source3,Publisher<? extends T4> source4,Publisher<? extends T5> source5,Publisher<? extends T6> source6,Function6<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? extends R> combiner)
If any of the sources never produces an item but only terminates (normally or with an error), the resulting sequence terminates immediately (normally or with all the errors accumulated until that point). If that input source is also synchronous, other sources after it will not be subscribed to.

Publisher honors backpressure from downstream. The sourcePublishers are requested in a bounded manner, however, their backpressure is not enforced (the operator won't signalMissingBackpressureException) and may lead toOutOfMemoryError due to internal buffer bloat.combineLatest does not operate by default on a particularScheduler.T1 - the element type of the first sourceT2 - the element type of the second sourceT3 - the element type of the third sourceT4 - the element type of the fourth sourceT5 - the element type of the fifth sourceT6 - the element type of the sixth sourceR - the combined output typesource1 - the first source Publishersource2 - the second source Publishersource3 - the third source Publishersource4 - the fourth source Publishersource5 - the fifth source Publishersource6 - the sixth source Publishercombiner - the aggregation function used to combine the items emitted by the source Publishers@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T1,T2,T3,T4,T5,T6,T7,R> Flowable<R> combineLatest(Publisher<? extends T1> source1,Publisher<? extends T2> source2,Publisher<? extends T3> source3,Publisher<? extends T4> source4,Publisher<? extends T5> source5,Publisher<? extends T6> source6,Publisher<? extends T7> source7,Function7<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? extends R> combiner)
If any of the sources never produces an item but only terminates (normally or with an error), the resulting sequence terminates immediately (normally or with all the errors accumulated until that point). If that input source is also synchronous, other sources after it will not be subscribed to.

Publisher honors backpressure from downstream. The sourcePublishers are requested in a bounded manner, however, their backpressure is not enforced (the operator won't signalMissingBackpressureException) and may lead toOutOfMemoryError due to internal buffer bloat.combineLatest does not operate by default on a particularScheduler.T1 - the element type of the first sourceT2 - the element type of the second sourceT3 - the element type of the third sourceT4 - the element type of the fourth sourceT5 - the element type of the fifth sourceT6 - the element type of the sixth sourceT7 - the element type of the seventh sourceR - the combined output typesource1 - the first source Publishersource2 - the second source Publishersource3 - the third source Publishersource4 - the fourth source Publishersource5 - the fifth source Publishersource6 - the sixth source Publishersource7 - the seventh source Publishercombiner - the aggregation function used to combine the items emitted by the source Publishers@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T1,T2,T3,T4,T5,T6,T7,T8,R> Flowable<R> combineLatest(Publisher<? extends T1> source1,Publisher<? extends T2> source2,Publisher<? extends T3> source3,Publisher<? extends T4> source4,Publisher<? extends T5> source5,Publisher<? extends T6> source6,Publisher<? extends T7> source7,Publisher<? extends T8> source8,Function8<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? super T8,? extends R> combiner)
If any of the sources never produces an item but only terminates (normally or with an error), the resulting sequence terminates immediately (normally or with all the errors accumulated until that point). If that input source is also synchronous, other sources after it will not be subscribed to.

Publisher honors backpressure from downstream. The sourcePublishers are requested in a bounded manner, however, their backpressure is not enforced (the operator won't signalMissingBackpressureException) and may lead toOutOfMemoryError due to internal buffer bloat.combineLatest does not operate by default on a particularScheduler.T1 - the element type of the first sourceT2 - the element type of the second sourceT3 - the element type of the third sourceT4 - the element type of the fourth sourceT5 - the element type of the fifth sourceT6 - the element type of the sixth sourceT7 - the element type of the seventh sourceT8 - the element type of the eighth sourceR - the combined output typesource1 - the first source Publishersource2 - the second source Publishersource3 - the third source Publishersource4 - the fourth source Publishersource5 - the fifth source Publishersource6 - the sixth source Publishersource7 - the seventh source Publishersource8 - the eighth source Publishercombiner - the aggregation function used to combine the items emitted by the source Publishers@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T1,T2,T3,T4,T5,T6,T7,T8,T9,R> Flowable<R> combineLatest(Publisher<? extends T1> source1,Publisher<? extends T2> source2,Publisher<? extends T3> source3,Publisher<? extends T4> source4,Publisher<? extends T5> source5,Publisher<? extends T6> source6,Publisher<? extends T7> source7,Publisher<? extends T8> source8,Publisher<? extends T9> source9,Function9<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? super T8,? super T9,? extends R> combiner)
If any of the sources never produces an item but only terminates (normally or with an error), the resulting sequence terminates immediately (normally or with all the errors accumulated until that point). If that input source is also synchronous, other sources after it will not be subscribed to.

Publisher honors backpressure from downstream. The sourcePublishers are requested in a bounded manner, however, their backpressure is not enforced (the operator won't signalMissingBackpressureException) and may lead toOutOfMemoryError due to internal buffer bloat.combineLatest does not operate by default on a particularScheduler.T1 - the element type of the first sourceT2 - the element type of the second sourceT3 - the element type of the third sourceT4 - the element type of the fourth sourceT5 - the element type of the fifth sourceT6 - the element type of the sixth sourceT7 - the element type of the seventh sourceT8 - the element type of the eighth sourceT9 - the element type of the ninth sourceR - the combined output typesource1 - the first source Publishersource2 - the second source Publishersource3 - the third source Publishersource4 - the fourth source Publishersource5 - the fifth source Publishersource6 - the sixth source Publishersource7 - the seventh source Publishersource8 - the eighth source Publishersource9 - the ninth source Publishercombiner - the aggregation function used to combine the items emitted by the source Publishers@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T> Flowable<T> concat(Iterable<? extendsPublisher<? extends T>> sources)

Publisher sources are expected to honor backpressure as well. If any of the sourcePublishers violate this, itmay throw anIllegalStateException when the sourcePublisher completes.concat does not operate by default on a particularScheduler.T - the common value type of the sourcessources - the Iterable sequence of Publishers@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T> Flowable<T> concat(Publisher<? extendsPublisher<? extends T>> sources)

Publisher sources are expected to honor backpressure as well. If the outer violates this, aMissingBackpressureException is signaled. If any of the innerPublishers violates this, itmay throw anIllegalStateException when an innerPublisher completes.concat does not operate by default on a particularScheduler.T - the common element base typesources - a Publisher that emits PublishersPublishers, one after the other, without interleaving them@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T> Flowable<T> concat(Publisher<? extendsPublisher<? extends T>> sources, int prefetch)

Publisher sources are expected to honor backpressure as well. If the outer violates this, aMissingBackpressureException is signaled. If any of the innerPublishers violates this, itmay throw anIllegalStateException when an innerPublisher completes.concat does not operate by default on a particularScheduler.T - the common element base typesources - a Publisher that emits Publishersprefetch - the number of Publishers to prefetch from the sources sequence.Publishers, one after the other, without interleaving them@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T> Flowable<T> concat(Publisher<? extends T> source1,Publisher<? extends T> source2)

Publisher sources are expected to honor backpressure as well. If any of the sourcePublishers violate this, itmay throw anIllegalStateException when the sourcePublisher completes.concat does not operate by default on a particularScheduler.T - the common element base typesource1 - a Publisher to be concatenatedsource2 - a Publisher to be concatenated@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T> Flowable<T> concat(Publisher<? extends T> source1,Publisher<? extends T> source2,Publisher<? extends T> source3)

Publisher sources are expected to honor backpressure as well. If any of the sourcePublishers violate this, itmay throw anIllegalStateException when the sourcePublisher completes.concat does not operate by default on a particularScheduler.T - the common element base typesource1 - a Publisher to be concatenatedsource2 - a Publisher to be concatenatedsource3 - a Publisher to be concatenated@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T> Flowable<T> concat(Publisher<? extends T> source1,Publisher<? extends T> source2,Publisher<? extends T> source3,Publisher<? extends T> source4)

Publisher sources are expected to honor backpressure as well. If any of the sourcePublishers violate this, itmay throw anIllegalStateException when the sourcePublisher completes.concat does not operate by default on a particularScheduler.T - the common element base typesource1 - a Publisher to be concatenatedsource2 - a Publisher to be concatenatedsource3 - a Publisher to be concatenatedsource4 - a Publisher to be concatenated@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T> Flowable<T> concatArray(Publisher<? extends T>... sources)
Note: named this way because of overload conflict with concat(Publisher<Publisher>).

Publisher sources are expected to honor backpressure as well. If any of the sourcePublishers violate this, itmay throw anIllegalStateException when the sourcePublisher completes.concatArray does not operate by default on a particularScheduler.T - the common base value typesources - the array of sourcesNullPointerException - if sources is null@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T> Flowable<T> concatArrayDelayError(Publisher<? extends T>... sources)

Publisher sources are expected to honor backpressure as well. If any of the sourcePublishers violate this, itmay throw anIllegalStateException when the sourcePublisher completes.concatArrayDelayError does not operate by default on a particularScheduler.T - the common base value typesources - the array of sourcesNullPointerException - if sources is null@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T> Flowable<T> concatArrayEager(Publisher<? extends T>... sources)

Eager concatenation means that once a subscriber subscribes, this operator subscribes to all of the source Publishers. The operator buffers the values emitted by these Publishers and then drains them in order, each one after the previous one completes.
Publisher sources are expected to honor backpressure as well. If any of the sourcePublishers violate this, the operator will signal aMissingBackpressureException.Scheduler.T - the value typesources - an array of Publishers that need to be eagerly concatenated@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T> Flowable<T> concatArrayEager(int maxConcurrency, int prefetch,Publisher<? extends T>... sources)

Eager concatenation means that once a subscriber subscribes, this operator subscribes to all of the source Publishers. The operator buffers the values emitted by these Publishers and then drains them in order, each one after the previous one completes.
Publisher sources are expected to honor backpressure as well. If any of the sourcePublishers violate this, the operator will signal aMissingBackpressureException.Scheduler.T - the value typesources - an array of Publishers that need to be eagerly concatenatedmaxConcurrency - the maximum number of concurrent subscriptions at a time, Integer.MAX_VALUE is interpreted as an indication to subscribe to all sources at onceprefetch - the number of elements to prefetch from each Publisher source@CheckReturnValue@SchedulerSupport(value="none")@BackpressureSupport(value=FULL)public static <T> Flowable<T> concatArrayEagerDelayError(Publisher<? extends T>... sources)
Publishers eagerly into a single stream of values and delaying any errors until all sources terminate.
Eager concatenation means that once a subscriber subscribes, this operator subscribes to all of the sourcePublishers. The operator buffers the values emitted by thesePublishers and then drains them in order, each one after the previous one completes.
Publisher sources are expected to honor backpressure as well. If any of the sourcePublishers violate this, the operator will signal aMissingBackpressureException.Scheduler.T - the value typesources - an array ofPublishers that need to be eagerly concatenated@CheckReturnValue@SchedulerSupport(value="none")@BackpressureSupport(value=FULL)public static <T> Flowable<T> concatArrayEagerDelayError(int maxConcurrency, int prefetch,Publisher<? extends T>... sources)
Publishers eagerly into a single stream of values and delaying any errors until all sources terminate.
Eager concatenation means that once a subscriber subscribes, this operator subscribes to all of the sourcePublishers. The operator buffers the values emitted by thesePublishers and then drains them in order, each one after the previous one completes.
Publisher sources are expected to honor backpressure as well. If any of the sourcePublishers violate this, the operator will signal aMissingBackpressureException.Scheduler.T - the value typesources - an array ofPublishers that need to be eagerly concatenatedmaxConcurrency - the maximum number of concurrent subscriptions at a time, Integer.MAX_VALUE is interpreted as indication to subscribe to all sources at onceprefetch - the number of elements to prefetch from eachPublisher source@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T> Flowable<T> concatDelayError(Iterable<? extendsPublisher<? extends T>> sources)
Publisher sources are expected to honor backpressure as well. If the outer violates this, aMissingBackpressureException is signaled. If any of the innerPublishers violates this, itmay throw anIllegalStateException when an innerPublisher completes.concatDelayError does not operate by default on a particularScheduler.T - the common element base typesources - the Iterable sequence of Publishers@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T> Flowable<T> concatDelayError(Publisher<? extendsPublisher<? extends T>> sources)
concatDelayError fully supports backpressure.concatDelayError does not operate by default on a particularScheduler.T - the common element base typesources - the Publisher sequence of Publishers@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T> Flowable<T> concatDelayError(Publisher<? extendsPublisher<? extends T>> sources, int prefetch, boolean tillTheEnd)
concatDelayError fully supports backpressure.concatDelayError does not operate by default on a particularScheduler.T - the common element base typesources - the Publisher sequence of Publishersprefetch - the number of elements to prefetch from the outer PublishertillTheEnd - if true exceptions from the outer and all inner Publishers are delayed to the end if false, exception from the outer Publisher is delayed till the current Publisher terminates@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T> Flowable<T> concatEager(Publisher<? extendsPublisher<? extends T>> sources)
Eager concatenation means that once a subscriber subscribes, this operator subscribes to all of the emitted source Publishers as they are observed. The operator buffers the values emitted by these Publishers and then drains them in order, each one after the previous one completes.
MissingBackpressureException.Scheduler.T - the value typesources - a sequence of Publishers that need to be eagerly concatenated@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T> Flowable<T> concatEager(Publisher<? extendsPublisher<? extends T>> sources, int maxConcurrency, int prefetch)
Eager concatenation means that once a subscriber subscribes, this operator subscribes to all of the emitted source Publishers as they are observed. The operator buffers the values emitted by these Publishers and then drains them in order, each one after the previous one completes.
MissingBackpressureException.Scheduler.T - the value typesources - a sequence of Publishers that need to be eagerly concatenatedmaxConcurrency - the maximum number of concurrently running inner Publishers; Integer.MAX_VALUE is interpreted as all inner Publishers can be active at the same timeprefetch - the number of elements to prefetch from each inner Publisher source@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T> Flowable<T> concatEager(Iterable<? extendsPublisher<? extends T>> sources)
Eager concatenation means that once a subscriber subscribes, this operator subscribes to all of the source Publishers. The operator buffers the values emitted by these Publishers and then drains them in order, each one after the previous one completes.
MissingBackpressureException.Scheduler.T - the value typesources - a sequence of Publishers that need to be eagerly concatenated@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T> Flowable<T> concatEager(Iterable<? extendsPublisher<? extends T>> sources, int maxConcurrency, int prefetch)
Eager concatenation means that once a subscriber subscribes, this operator subscribes to all of the source Publishers. The operator buffers the values emitted by these Publishers and then drains them in order, each one after the previous one completes.
MissingBackpressureException.Scheduler.T - the value typesources - a sequence of Publishers that need to be eagerly concatenatedmaxConcurrency - the maximum number of concurrently running inner Publishers; Integer.MAX_VALUE is interpreted as all inner Publishers can be active at the same timeprefetch - the number of elements to prefetch from each inner Publisher source@CheckReturnValue@NonNull@BackpressureSupport(value=SPECIAL)@SchedulerSupport(value="none")public static <T> Flowable<T> create(FlowableOnSubscribe<T> source,BackpressureStrategy mode)
Example:
Flowable.<Event>create(emitter -> { Callback listener = new Callback() { @Override public void onEvent(Event e) { emitter.onNext(e); if (e.isLast()) { emitter.onComplete(); } } @Override public void onFailure(Exception e) { emitter.onError(e); } }; AutoCloseable c = api.someMethod(listener); emitter.setCancellable(c::close); }, BackpressureStrategy.BUFFER);You should call the FlowableEmitter onNext, onError and onComplete methods in a serialized fashion. The rest of its methods are thread-safe.
mode parameter.create does not operate by default on a particularScheduler.T - the element typesource - the emitter that is called when a Subscriber subscribes to the returnedFlowablemode - the backpressure mode to apply if the downstream Subscriber doesn't request (fast) enoughFlowableOnSubscribe,BackpressureStrategy,Cancellable@CheckReturnValue@NonNull@BackpressureSupport(value=PASS_THROUGH)@SchedulerSupport(value="none")public static <T> Flowable<T> defer(Callable<? extendsPublisher<? extends T>> supplier)

The defer Subscriber allows you to defer or delay emitting items from a Publisher until such time as a Subscriber subscribes to the Publisher. This allows aSubscriber to easily obtain updates or a refreshed version of the sequence.
Publisher returned by thesupplier.defer does not operate by default on a particularScheduler.T - the type of the items emitted by the Publishersupplier - the Publisher factory function to invoke for eachSubscriber that subscribes to the resulting PublisherSubscribers' subscriptions trigger an invocation of the given Publisher factory function@CheckReturnValue@BackpressureSupport(value=PASS_THROUGH)@SchedulerSupport(value="none")public static <T> Flowable<T> empty()
Subscriber and immediately invokes itsonComplete method.
empty does not operate by default on a particularScheduler.T - the type of the items (ostensibly) emitted by the PublisherSubscriber but immediately invokes theSubscriber'sonComplete method@CheckReturnValue@NonNull@BackpressureSupport(value=PASS_THROUGH)@SchedulerSupport(value="none")public static <T> Flowable<T> error(Callable<? extendsThrowable> supplier)
Subscriber'sonError method when the Subscriber subscribes to it.
error does not operate by default on a particularScheduler.T - the type of the items (ostensibly) emitted by the Publishersupplier - a Callable factory to return a Throwable for each individual SubscriberSubscriber'sonError method when the Subscriber subscribes to it@CheckReturnValue@NonNull@BackpressureSupport(value=PASS_THROUGH)@SchedulerSupport(value="none")public static <T> Flowable<T> error(Throwable throwable)
Subscriber'sonError method when the Subscriber subscribes to it.
error does not operate by default on a particularScheduler.T - the type of the items (ostensibly) emitted by the Publisherthrowable - the particular Throwable to pass toonErrorSubscriber'sonError method when the Subscriber subscribes to it@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T> Flowable<T> fromArray(T... items)

array on demand (i.e., when requested).fromArray does not operate by default on a particularScheduler.T - the type of items in the Array and the type of items to be emitted by the resulting Publisheritems - the array of elements@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T> Flowable<T> fromCallable(Callable<? extends T> supplier)

This allows you to defer the execution of the function you specify until a Subscriber subscribes to the Publisher. That is to say, it makes the function "lazy."
fromCallable does not operate by default on a particularScheduler.Callable throws an exception, the respectiveThrowable is delivered to the downstream viaSubscriber.onError(Throwable), except when the downstream has canceled thisFlowable source. In this latter case, theThrowable is delivered to the global error handler viaRxJavaPlugins.onError(Throwable) as anUndeliverableException.T - the type of the item emitted by the Publishersupplier - a function, the execution of which should be deferred;fromCallable will invoke this function only when a Subscriber subscribes to the Publisher thatfromCallable returnsSubscribers' subscriptions trigger an invocation of the given functiondefer(Callable)@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T> Flowable<T> fromFuture(Future<? extends T> future)
Future into a Publisher.
You can convert any object that supports theFuture interface into a Publisher that emits the return value of theFuture.get() method of that object by passing the object into thefrom method.
Important note: This Publisher is blocking on the thread it gets subscribed on; you cannot cancel it.
Unlike 1.x, canceling the Flowable won't cancel the future. If necessary, one can use composition to achieve the cancellation effect:futurePublisher.doOnCancel(() -> future.cancel(true));.
fromFuture does not operate by default on a particularScheduler.T - the type of object that theFuture returns, and also the type of item to be emitted by the resulting Publisherfuture - the sourceFutureFuture@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T> Flowable<T> fromFuture(Future<? extends T> future, long timeout,TimeUnit unit)
Future into a Publisher, with a timeout on the Future.
You can convert any object that supports theFuture interface into a Publisher that emits the return value of theFuture.get() method of that object by passing the object into thefromFuture method.
Unlike 1.x, canceling the Flowable won't cancel the future. If necessary, one can use composition to achieve the cancellation effect:futurePublisher.doOnCancel(() -> future.cancel(true));.
Important note: This Publisher is blocking on the thread it gets subscribed on; you cannot cancel it.
fromFuture does not operate by default on a particularScheduler.T - the type of object that theFuture returns, and also the type of item to be emitted by the resulting Publisherfuture - the sourceFuturetimeout - the maximum time to wait before callinggetunit - theTimeUnit of thetimeout argumentFuture@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="custom")public static <T> Flowable<T> fromFuture(Future<? extends T> future, long timeout,TimeUnit unit,Scheduler scheduler)
Future into a Publisher, with a timeout on the Future.
You can convert any object that supports theFuture interface into a Publisher that emits the return value of theFuture.get() method of that object by passing the object into thefrom method.
Unlike 1.x, canceling the Flowable won't cancel the future. If necessary, one can use composition to achieve the cancellation effect:futurePublisher.doOnCancel(() -> future.cancel(true));.
Important note: This Publisher is blocking; you cannot cancel it.
fromFuture does not operate by default on a particularScheduler.T - the type of object that theFuture returns, and also the type of item to be emitted by the resulting Publisherfuture - the sourceFuturetimeout - the maximum time to wait before callinggetunit - theTimeUnit of thetimeout argumentscheduler - theScheduler to wait for the Future on. Use a Scheduler such asSchedulers.io() that can block and wait on the FutureFuture@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="custom")public static <T> Flowable<T> fromFuture(Future<? extends T> future,Scheduler scheduler)
Future, operating on a specifiedScheduler, into a Publisher.
You can convert any object that supports theFuture interface into a Publisher that emits the return value of theFuture.get() method of that object by passing the object into thefrom method.
Unlike 1.x, canceling the Flowable won't cancel the future. If necessary, one can use composition to achieve the cancellation effect:futurePublisher.doOnCancel(() -> future.cancel(true));.
Scheduler this operator will use.T - the type of object that theFuture returns, and also the type of item to be emitted by the resulting Publisherfuture - the sourceFuturescheduler - theScheduler to wait for the Future on. Use a Scheduler such asSchedulers.io() that can block and wait on the FutureFuture@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T> Flowable<T> fromIterable(Iterable<? extends T> source)
Iterable sequence into a Publisher that emits the items in the sequence.
iterable on demand (i.e., when requested).fromIterable does not operate by default on a particularScheduler.T - the type of items in theIterable sequence and the type of items to be emitted by the resulting Publishersource - the sourceIterable sequenceIterable sequence@CheckReturnValue@NonNull@BackpressureSupport(value=PASS_THROUGH)@SchedulerSupport(value="none")public static <T> Flowable<T> fromPublisher(Publisher<? extends T> source)
ThePublisher must follow theReactive Streams specification. Violating the specification may result in undefined behavior.
If possible, usecreate(FlowableOnSubscribe, BackpressureStrategy) to create a source-likeFlowable instead.
Note that even thoughPublisher appears to be a functional interface, it is not recommended to implement it through a lambda as the specification requires state management that is not achievable with a stateless lambda.
fromPublisher does not operate by default on a particularScheduler.T - the value type of the flowsource - the Publisher to convertNullPointerException - if thesourcePublisher is nullcreate(FlowableOnSubscribe, BackpressureStrategy)@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T> Flowable<T> generate(Consumer<Emitter<T>> generator)
Note that theEmitter.onNext(T),Emitter.onError(java.lang.Throwable) andEmitter.onComplete() methods provided to the function via theEmitter instance should be called synchronously, never concurrently and only while the function body is executing. Calling them from multiple threads or outside the function call is not supported and leads to an undefined behavior.
generate does not operate by default on a particularScheduler.T - the generated value typegenerator - the Consumer called whenever a particular downstream Subscriber has requested a value. The callback then should callonNext,onError oronComplete to signal a value or a terminal event. Signaling multipleonNext in a call will make the operator signalIllegalStateException.@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T,S> Flowable<T> generate(Callable<S> initialState,BiConsumer<S,Emitter<T>> generator)
Note that theEmitter.onNext(T),Emitter.onError(java.lang.Throwable) andEmitter.onComplete() methods provided to the function via theEmitter instance should be called synchronously, never concurrently and only while the function body is executing. Calling them from multiple threads or outside the function call is not supported and leads to an undefined behavior.
generate does not operate by default on a particularScheduler.S - the type of the per-Subscriber stateT - the generated value typeinitialState - the Callable to generate the initial state for each Subscribergenerator - the Consumer called with the current state whenever a particular downstream Subscriber has requested a value. The callback then should callonNext,onError oronComplete to signal a value or a terminal event. Signaling multipleonNext in a call will make the operator signalIllegalStateException.@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T,S> Flowable<T> generate(Callable<S> initialState,BiConsumer<S,Emitter<T>> generator,Consumer<? super S> disposeState)
Note that theEmitter.onNext(T),Emitter.onError(java.lang.Throwable) andEmitter.onComplete() methods provided to the function via theEmitter instance should be called synchronously, never concurrently and only while the function body is executing. Calling them from multiple threads or outside the function call is not supported and leads to an undefined behavior.
generate does not operate by default on a particularScheduler.S - the type of the per-Subscriber stateT - the generated value typeinitialState - the Callable to generate the initial state for each Subscribergenerator - the Consumer called with the current state whenever a particular downstream Subscriber has requested a value. The callback then should callonNext,onError oronComplete to signal a value or a terminal event. Signaling multipleonNext in a call will make the operator signalIllegalStateException.disposeState - the Consumer that is called with the current state when the generator terminates the sequence or it gets canceled@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T,S> Flowable<T> generate(Callable<S> initialState,BiFunction<S,Emitter<T>,S> generator)
Note that theEmitter.onNext(T),Emitter.onError(java.lang.Throwable) andEmitter.onComplete() methods provided to the function via theEmitter instance should be called synchronously, never concurrently and only while the function body is executing. Calling them from multiple threads or outside the function call is not supported and leads to an undefined behavior.
generate does not operate by default on a particularScheduler.S - the type of the per-Subscriber stateT - the generated value typeinitialState - the Callable to generate the initial state for each Subscribergenerator - the Function called with the current state whenever a particular downstream Subscriber has requested a value. The callback then should callonNext,onError oronComplete to signal a value or a terminal event and should return a (new) state for the next invocation. Signaling multipleonNext in a call will make the operator signalIllegalStateException.@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T,S> Flowable<T> generate(Callable<S> initialState,BiFunction<S,Emitter<T>,S> generator,Consumer<? super S> disposeState)
Note that theEmitter.onNext(T),Emitter.onError(java.lang.Throwable) andEmitter.onComplete() methods provided to the function via theEmitter instance should be called synchronously, never concurrently and only while the function body is executing. Calling them from multiple threads or outside the function call is not supported and leads to an undefined behavior.
generate does not operate by default on a particularScheduler.S - the type of the per-Subscriber stateT - the generated value typeinitialState - the Callable to generate the initial state for each Subscribergenerator - the Function called with the current state whenever a particular downstream Subscriber has requested a value. The callback then should callonNext,onError oronComplete to signal a value or a terminal event and should return a (new) state for the next invocation. Signaling multipleonNext in a call will make the operator signalIllegalStateException.disposeState - the Consumer that is called with the current state when the generator terminates the sequence or it gets canceled@CheckReturnValue@BackpressureSupport(value=ERROR)@SchedulerSupport(value="io.reactivex:computation")public static Flowable<Long> interval(long initialDelay, long period,TimeUnit unit)
0L after theinitialDelay and ever-increasing numbers after eachperiod of time thereafter.
MissingBackpressureException at some point in the chain. Consumers should consider applying one of theonBackpressureXXX operators as well.interval operates by default on thecomputationScheduler.initialDelay - the initial delay time to wait before emitting the first value of 0Lperiod - the period of time between emissions of the subsequent numbersunit - the time unit for bothinitialDelay andperiodinitialDelay and ever-increasing numbers after eachperiod of time thereafter@CheckReturnValue@NonNull@BackpressureSupport(value=ERROR)@SchedulerSupport(value="custom")public static Flowable<Long> interval(long initialDelay, long period,TimeUnit unit,Scheduler scheduler)
0L after theinitialDelay and ever-increasing numbers after eachperiod of time thereafter, on a specifiedScheduler.
MissingBackpressureException at some point in the chain. Consumers should consider applying one of theonBackpressureXXX operators as well.Scheduler this operator will use.initialDelay - the initial delay time to wait before emitting the first value of 0Lperiod - the period of time between emissions of the subsequent numbersunit - the time unit for bothinitialDelay andperiodscheduler - the Scheduler on which the waiting happens and items are emittedinitialDelay and ever-increasing numbers after eachperiod of time thereafter, while running on the given Scheduler@CheckReturnValue@BackpressureSupport(value=ERROR)@SchedulerSupport(value="io.reactivex:computation")public static Flowable<Long> interval(long period,TimeUnit unit)

MissingBackpressureException if the downstream is not ready to receive the next value.interval operates by default on thecomputationScheduler.period - the period size in time units (see below)unit - time units to use for the interval size@CheckReturnValue@BackpressureSupport(value=ERROR)@SchedulerSupport(value="custom")public static Flowable<Long> interval(long period,TimeUnit unit,Scheduler scheduler)

MissingBackpressureException at some point in the chain. Consumers should consider applying one of theonBackpressureXXX operators as well.Scheduler this operator will use.period - the period size in time units (see below)unit - time units to use for the interval sizescheduler - the Scheduler to use for scheduling the items@CheckReturnValue@BackpressureSupport(value=ERROR)@SchedulerSupport(value="io.reactivex:computation")public static Flowable<Long> intervalRange(long start, long count, long initialDelay, long period,TimeUnit unit)
The sequence completes immediately after the last value (start + count - 1) has been reached.
MissingBackpressureException if the downstream can't keep up.intervalRange by default operates on thecomputationScheduler.start - that start value of the rangecount - the number of values to emit in total, if zero, the operator emits an onComplete after the initial delay.initialDelay - the initial delay before signaling the first value (the start)period - the period between subsequent valuesunit - the unit of measure of the initialDelay and period amounts@CheckReturnValue@NonNull@BackpressureSupport(value=ERROR)@SchedulerSupport(value="custom")public static Flowable<Long> intervalRange(long start, long count, long initialDelay, long period,TimeUnit unit,Scheduler scheduler)
The sequence completes immediately after the last value (start + count - 1) has been reached.
MissingBackpressureException if the downstream can't keep up.Scheduler.start - that start value of the rangecount - the number of values to emit in total, if zero, the operator emits an onComplete after the initial delay.initialDelay - the initial delay before signaling the first value (the start)period - the period between subsequent valuesunit - the unit of measure of the initialDelay and period amountsscheduler - the target scheduler where the values and terminal signals will be emitted@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T> Flowable<T> just(T item)

Note that the item is taken and re-emitted as is and not computed by any means byjust. UsefromCallable(Callable) to generate a single item on demand (whenSubscribers subscribe to it).
See the multi-parameter overloads ofjust to emit more than one (constant reference) items one after the other. UsefromArray(Object...) to emit an arbitrary number of items that are known upfront.
To emit the items of anIterable sequence (such as aList), usefromIterable(Iterable).
just does not operate by default on a particularScheduler.T - the type of that itemitem - the item to emitvalue as a single item and then completesjust(Object, Object),fromCallable(Callable),fromArray(Object...),fromIterable(Iterable)@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T> Flowable<T> just(T item1, T item2)

just does not operate by default on a particularScheduler.T - the type of these itemsitem1 - first itemitem2 - second item@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T> Flowable<T> just(T item1, T item2, T item3)

just does not operate by default on a particularScheduler.T - the type of these itemsitem1 - first itemitem2 - second itemitem3 - third item@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T> Flowable<T> just(T item1, T item2, T item3, T item4)

just does not operate by default on a particularScheduler.T - the type of these itemsitem1 - first itemitem2 - second itemitem3 - third itemitem4 - fourth item@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T> Flowable<T> just(T item1, T item2, T item3, T item4, T item5)

just does not operate by default on a particularScheduler.T - the type of these itemsitem1 - first itemitem2 - second itemitem3 - third itemitem4 - fourth itemitem5 - fifth item@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T> Flowable<T> just(T item1, T item2, T item3, T item4, T item5, T item6)

just does not operate by default on a particularScheduler.T - the type of these itemsitem1 - first itemitem2 - second itemitem3 - third itemitem4 - fourth itemitem5 - fifth itemitem6 - sixth item@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T> Flowable<T> just(T item1, T item2, T item3, T item4, T item5, T item6, T item7)

just does not operate by default on a particularScheduler.T - the type of these itemsitem1 - first itemitem2 - second itemitem3 - third itemitem4 - fourth itemitem5 - fifth itemitem6 - sixth itemitem7 - seventh item@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T> Flowable<T> just(T item1, T item2, T item3, T item4, T item5, T item6, T item7, T item8)

just does not operate by default on a particularScheduler.T - the type of these itemsitem1 - first itemitem2 - second itemitem3 - third itemitem4 - fourth itemitem5 - fifth itemitem6 - sixth itemitem7 - seventh itemitem8 - eighth item@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T> Flowable<T> just(T item1, T item2, T item3, T item4, T item5, T item6, T item7, T item8, T item9)

just does not operate by default on a particularScheduler.T - the type of these itemsitem1 - first itemitem2 - second itemitem3 - third itemitem4 - fourth itemitem5 - fifth itemitem6 - sixth itemitem7 - seventh itemitem8 - eighth itemitem9 - ninth item@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T> Flowable<T> just(T item1, T item2, T item3, T item4, T item5, T item6, T item7, T item8, T item9, T item10)

just does not operate by default on a particularScheduler.T - the type of these itemsitem1 - first itemitem2 - second itemitem3 - third itemitem4 - fourth itemitem5 - fifth itemitem6 - sixth itemitem7 - seventh itemitem8 - eighth itemitem9 - ninth itemitem10 - tenth item@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T> Flowable<T> merge(Iterable<? extendsPublisher<? extends T>> sources, int maxConcurrency, int bufferSize)

You can combine the items emitted by multiple Publishers so that they appear as a single Publisher, by using themerge method.
Publishers are expected to honor backpressure; if violated, the operatormay signalMissingBackpressureException.merge does not operate by default on a particularScheduler.Publishers signal aThrowable viaonError, the resultingFlowable terminates with thatThrowable and all other sourcePublishers are canceled. If more than onePublisher signals an error, the resultingFlowable may terminate with the first one's error or, depending on the concurrency of the sources, may terminate with aCompositeException containing two or more of the various error signals.Throwables that didn't make into the composite will be sent (individually) to the global error handler viaRxJavaPlugins.onError(Throwable) method asUndeliverableException errors. Similarly,Throwables signaled by source(s) after the returnedFlowable has been canceled or terminated with a (composite) error will be sent to the same global error handler. UsemergeDelayError(Iterable, int, int) to merge sources and terminate only when all sourcePublishers have completed or failed with an error.T - the common element base typesources - the Iterable of PublishersmaxConcurrency - the maximum number of Publishers that may be subscribed to concurrentlybufferSize - the number of items to prefetch from each inner PublisherIllegalArgumentException - ifmaxConcurrency is less than or equal to 0mergeDelayError(Iterable, int, int)@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T> Flowable<T> mergeArray(int maxConcurrency, int bufferSize,Publisher<? extends T>... sources)

You can combine the items emitted by multiple Publishers so that they appear as a single Publisher, by using themerge method.
Publishers are expected to honor backpressure; if violated, the operatormay signalMissingBackpressureException.mergeArray does not operate by default on a particularScheduler.Publishers signal aThrowable viaonError, the resultingFlowable terminates with thatThrowable and all other sourcePublishers are canceled. If more than onePublisher signals an error, the resultingFlowable may terminate with the first one's error or, depending on the concurrency of the sources, may terminate with aCompositeException containing two or more of the various error signals.Throwables that didn't make into the composite will be sent (individually) to the global error handler viaRxJavaPlugins.onError(Throwable) method asUndeliverableException errors. Similarly,Throwables signaled by source(s) after the returnedFlowable has been canceled or terminated with a (composite) error will be sent to the same global error handler. UsemergeArrayDelayError(int, int, Publisher[]) to merge sources and terminate only when all sourcePublishers have completed or failed with an error.T - the common element base typesources - the array of PublishersmaxConcurrency - the maximum number of Publishers that may be subscribed to concurrentlybufferSize - the number of items to prefetch from each inner PublisherIllegalArgumentException - ifmaxConcurrency is less than or equal to 0mergeArrayDelayError(int, int, Publisher...)@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T> Flowable<T> merge(Iterable<? extendsPublisher<? extends T>> sources)

You can combine the items emitted by multiple Publishers so that they appear as a single Publisher, by using themerge method.
Publishers are expected to honor backpressure; if violated, the operatormay signalMissingBackpressureException.merge does not operate by default on a particularScheduler.Publishers signal aThrowable viaonError, the resultingFlowable terminates with thatThrowable and all other sourcePublishers are canceled. If more than onePublisher signals an error, the resultingFlowable may terminate with the first one's error or, depending on the concurrency of the sources, may terminate with aCompositeException containing two or more of the various error signals.Throwables that didn't make into the composite will be sent (individually) to the global error handler viaRxJavaPlugins.onError(Throwable) method asUndeliverableException errors. Similarly,Throwables signaled by source(s) after the returnedFlowable has been canceled or terminated with a (composite) error will be sent to the same global error handler. UsemergeDelayError(Iterable) to merge sources and terminate only when all sourcePublishers have completed or failed with an error.T - the common element base typesources - the Iterable of PublishersmergeDelayError(Iterable)@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T> Flowable<T> merge(Iterable<? extendsPublisher<? extends T>> sources, int maxConcurrency)

You can combine the items emitted by multiple Publishers so that they appear as a single Publisher, by using themerge method.
Publishers are expected to honor backpressure; if violated, the operatormay signalMissingBackpressureException.merge does not operate by default on a particularScheduler.Publishers signal aThrowable viaonError, the resultingFlowable terminates with thatThrowable and all other sourcePublishers are canceled. If more than onePublisher signals an error, the resultingFlowable may terminate with the first one's error or, depending on the concurrency of the sources, may terminate with aCompositeException containing two or more of the various error signals.Throwables that didn't make into the composite will be sent (individually) to the global error handler viaRxJavaPlugins.onError(Throwable) method asUndeliverableException errors. Similarly,Throwables signaled by source(s) after the returnedFlowable has been canceled or terminated with a (composite) error will be sent to the same global error handler. UsemergeDelayError(Iterable, int) to merge sources and terminate only when all sourcePublishers have completed or failed with an error.T - the common element base typesources - the Iterable of PublishersmaxConcurrency - the maximum number of Publishers that may be subscribed to concurrentlyIllegalArgumentException - ifmaxConcurrency is less than or equal to 0mergeDelayError(Iterable, int)@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T> Flowable<T> merge(Publisher<? extendsPublisher<? extends T>> sources)

You can combine the items emitted by multiple Publishers so that they appear as a single Publisher, by using themerge method.
Publisher is consumed in unbounded mode (i.e., no backpressure is applied to it). The innerPublishers are expected to honor backpressure; if violated, the operatormay signalMissingBackpressureException.merge does not operate by default on a particularScheduler.Publishers signal aThrowable viaonError, the resultingFlowable terminates with thatThrowable and all other sourcePublishers are canceled. If more than onePublisher signals an error, the resultingFlowable may terminate with the first one's error or, depending on the concurrency of the sources, may terminate with aCompositeException containing two or more of the various error signals.Throwables that didn't make into the composite will be sent (individually) to the global error handler viaRxJavaPlugins.onError(Throwable) method asUndeliverableException errors. Similarly,Throwables signaled by source(s) after the returnedFlowable has been canceled or terminated with a (composite) error will be sent to the same global error handler. UsemergeDelayError(Publisher) to merge sources and terminate only when all sourcePublishers have completed or failed with an error.T - the common element base typesources - a Publisher that emits Publisherssource PublishermergeDelayError(Publisher)@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T> Flowable<T> merge(Publisher<? extendsPublisher<? extends T>> sources, int maxConcurrency)

You can combine the items emitted by multiple Publishers so that they appear as a single Publisher, by using themerge method.
Publishers are expected to honor backpressure; if violated, the operatormay signalMissingBackpressureException.merge does not operate by default on a particularScheduler.Publishers signal aThrowable viaonError, the resultingFlowable terminates with thatThrowable and all other sourcePublishers are canceled. If more than onePublisher signals an error, the resultingFlowable may terminate with the first one's error or, depending on the concurrency of the sources, may terminate with aCompositeException containing two or more of the various error signals.Throwables that didn't make into the composite will be sent (individually) to the global error handler viaRxJavaPlugins.onError(Throwable) method asUndeliverableException errors. Similarly,Throwables signaled by source(s) after the returnedFlowable has been canceled or terminated with a (composite) error will be sent to the same global error handler. UsemergeDelayError(Publisher, int) to merge sources and terminate only when all sourcePublishers have completed or failed with an error.T - the common element base typesources - a Publisher that emits PublishersmaxConcurrency - the maximum number of Publishers that may be subscribed to concurrentlysource PublisherIllegalArgumentException - ifmaxConcurrency is less than or equal to 0mergeDelayError(Publisher, int)@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T> Flowable<T> mergeArray(Publisher<? extends T>... sources)

You can combine items emitted by multiple Publishers so that they appear as a single Publisher, by using themerge method.
Publishers are expected to honor backpressure; if violated, the operatormay signalMissingBackpressureException.mergeArray does not operate by default on a particularScheduler.Publishers signal aThrowable viaonError, the resultingFlowable terminates with thatThrowable and all other sourcePublishers are canceled. If more than onePublisher signals an error, the resultingFlowable may terminate with the first one's error or, depending on the concurrency of the sources, may terminate with aCompositeException containing two or more of the various error signals.Throwables that didn't make into the composite will be sent (individually) to the global error handler viaRxJavaPlugins.onError(Throwable) method asUndeliverableException errors. Similarly,Throwables signaled by source(s) after the returnedFlowable has been canceled or terminated with a (composite) error will be sent to the same global error handler. UsemergeArrayDelayError(Publisher...) to merge sources and terminate only when all sourcePublishers have completed or failed with an error.T - the common element base typesources - the array of PublishersmergeArrayDelayError(Publisher...)@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T> Flowable<T> merge(Publisher<? extends T> source1,Publisher<? extends T> source2)

You can combine items emitted by multiple Publishers so that they appear as a single Publisher, by using themerge method.
Publishers are expected to honor backpressure; if violated, the operatormay signalMissingBackpressureException.merge does not operate by default on a particularScheduler.Publishers signal aThrowable viaonError, the resultingFlowable terminates with thatThrowable and all other sourcePublishers are canceled. If more than onePublisher signals an error, the resultingFlowable may terminate with the first one's error or, depending on the concurrency of the sources, may terminate with aCompositeException containing two or more of the various error signals.Throwables that didn't make into the composite will be sent (individually) to the global error handler viaRxJavaPlugins.onError(Throwable) method asUndeliverableException errors. Similarly,Throwables signaled by source(s) after the returnedFlowable has been canceled or terminated with a (composite) error will be sent to the same global error handler. UsemergeDelayError(Publisher, Publisher) to merge sources and terminate only when all sourcePublishers have completed or failed with an error.T - the common element base typesource1 - a Publisher to be mergedsource2 - a Publisher to be mergedmergeDelayError(Publisher, Publisher)@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T> Flowable<T> merge(Publisher<? extends T> source1,Publisher<? extends T> source2,Publisher<? extends T> source3)

You can combine items emitted by multiple Publishers so that they appear as a single Publisher, by using themerge method.
Publishers are expected to honor backpressure; if violated, the operatormay signalMissingBackpressureException.merge does not operate by default on a particularScheduler.Publishers signal aThrowable viaonError, the resultingFlowable terminates with thatThrowable and all other sourcePublishers are canceled. If more than onePublisher signals an error, the resultingFlowable may terminate with the first one's error or, depending on the concurrency of the sources, may terminate with aCompositeException containing two or more of the various error signals.Throwables that didn't make into the composite will be sent (individually) to the global error handler viaRxJavaPlugins.onError(Throwable) method asUndeliverableException errors. Similarly,Throwables signaled by source(s) after the returnedFlowable has been canceled or terminated with a (composite) error will be sent to the same global error handler. UsemergeDelayError(Publisher, Publisher, Publisher) to merge sources and terminate only when all sourcePublishers have completed or failed with an error.T - the common element base typesource1 - a Publisher to be mergedsource2 - a Publisher to be mergedsource3 - a Publisher to be mergedmergeDelayError(Publisher, Publisher, Publisher)@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T> Flowable<T> merge(Publisher<? extends T> source1,Publisher<? extends T> source2,Publisher<? extends T> source3,Publisher<? extends T> source4)

You can combine items emitted by multiple Publishers so that they appear as a single Publisher, by using themerge method.
Publishers are expected to honor backpressure; if violated, the operatormay signalMissingBackpressureException.merge does not operate by default on a particularScheduler.Publishers signal aThrowable viaonError, the resultingFlowable terminates with thatThrowable and all other sourcePublishers are canceled. If more than onePublisher signals an error, the resultingFlowable may terminate with the first one's error or, depending on the concurrency of the sources, may terminate with aCompositeException containing two or more of the various error signals.Throwables that didn't make into the composite will be sent (individually) to the global error handler viaRxJavaPlugins.onError(Throwable) method asUndeliverableException errors. Similarly,Throwables signaled by source(s) after the returnedFlowable has been canceled or terminated with a (composite) error will be sent to the same global error handler. UsemergeDelayError(Publisher, Publisher, Publisher, Publisher) to merge sources and terminate only when all sourcePublishers have completed or failed with an error.T - the common element base typesource1 - a Publisher to be mergedsource2 - a Publisher to be mergedsource3 - a Publisher to be mergedsource4 - a Publisher to be mergedmergeDelayError(Publisher, Publisher, Publisher, Publisher)@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T> Flowable<T> mergeDelayError(Iterable<? extendsPublisher<? extends T>> sources)
This behaves likemerge(Publisher) except that if any of the merged Publishers notify of an error viaonError,mergeDelayError will refrain from propagating that error notification until all of the merged Publishers have finished emitting items.

Even if multiple merged Publishers sendonError notifications,mergeDelayError will only invoke theonError method of its Subscribers once.
Publishers are expected to honor backpressure; if violated, the operatormay signalMissingBackpressureException.mergeDelayError does not operate by default on a particularScheduler.T - the common element base typesources - the Iterable of Publishers@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T> Flowable<T> mergeDelayError(Iterable<? extendsPublisher<? extends T>> sources, int maxConcurrency, int bufferSize)
This behaves likemerge(Publisher) except that if any of the merged Publishers notify of an error viaonError,mergeDelayError will refrain from propagating that error notification until all of the merged Publishers have finished emitting items.

Even if multiple merged Publishers sendonError notifications,mergeDelayError will only invoke theonError method of its Subscribers once.
Publishers are expected to honor backpressure; if violated, the operatormay signalMissingBackpressureException.mergeDelayError does not operate by default on a particularScheduler.T - the common element base typesources - the Iterable of PublishersmaxConcurrency - the maximum number of Publishers that may be subscribed to concurrentlybufferSize - the number of items to prefetch from each inner Publisher@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T> Flowable<T> mergeArrayDelayError(int maxConcurrency, int bufferSize,Publisher<? extends T>... sources)
This behaves likemerge(Publisher) except that if any of the merged Publishers notify of an error viaonError,mergeDelayError will refrain from propagating that error notification until all of the merged Publishers have finished emitting items.

Even if multiple merged Publishers sendonError notifications,mergeDelayError will only invoke theonError method of its Subscribers once.
Publishers are expected to honor backpressure; if violated, the operatormay signalMissingBackpressureException.mergeArrayDelayError does not operate by default on a particularScheduler.T - the common element base typesources - the array of PublishersmaxConcurrency - the maximum number of Publishers that may be subscribed to concurrentlybufferSize - the number of items to prefetch from each inner Publisher@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T> Flowable<T> mergeDelayError(Iterable<? extendsPublisher<? extends T>> sources, int maxConcurrency)
This behaves likemerge(Publisher) except that if any of the merged Publishers notify of an error viaonError,mergeDelayError will refrain from propagating that error notification until all of the merged Publishers have finished emitting items.

Even if multiple merged Publishers sendonError notifications,mergeDelayError will only invoke theonError method of its Subscribers once.
Publishers are expected to honor backpressure; if violated, the operatormay signalMissingBackpressureException.mergeDelayError does not operate by default on a particularScheduler.T - the common element base typesources - the Iterable of PublishersmaxConcurrency - the maximum number of Publishers that may be subscribed to concurrently@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T> Flowable<T> mergeDelayError(Publisher<? extendsPublisher<? extends T>> sources)
This behaves likemerge(Publisher) except that if any of the merged Publishers notify of an error viaonError,mergeDelayError will refrain from propagating that error notification until all of the merged Publishers have finished emitting items.

Even if multiple merged Publishers sendonError notifications,mergeDelayError will only invoke theonError method of its Subscribers once.
Publisher is consumed in unbounded mode (i.e., no backpressure is applied to it). The innerPublishers are expected to honor backpressure; if violated, the operatormay signalMissingBackpressureException.mergeDelayError does not operate by default on a particularScheduler.T - the common element base typesources - a Publisher that emits Publisherssource Publisher@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T> Flowable<T> mergeDelayError(Publisher<? extendsPublisher<? extends T>> sources, int maxConcurrency)
This behaves likemerge(Publisher) except that if any of the merged Publishers notify of an error viaonError,mergeDelayError will refrain from propagating that error notification until all of the merged Publishers have finished emitting items.

Even if multiple merged Publishers sendonError notifications,mergeDelayError will only invoke theonError method of its Subscribers once.
Publishers are expected to honor backpressure; if violated, the operatormay signalMissingBackpressureException.mergeDelayError does not operate by default on a particularScheduler.T - the common element base typesources - a Publisher that emits PublishersmaxConcurrency - the maximum number of Publishers that may be subscribed to concurrentlysource Publisher@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T> Flowable<T> mergeArrayDelayError(Publisher<? extends T>... sources)
This behaves likemerge(Publisher) except that if any of the merged Publishers notify of an error viaonError,mergeDelayError will refrain from propagating that error notification until all of the merged Publishers have finished emitting items.

Even if multiple merged Publishers sendonError notifications,mergeDelayError will only invoke theonError method of its Subscribers once.
Publishers are expected to honor backpressure; if violated, the operatormay signalMissingBackpressureException.mergeArrayDelayError does not operate by default on a particularScheduler.T - the common element base typesources - the Iterable of Publishers@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T> Flowable<T> mergeDelayError(Publisher<? extends T> source1,Publisher<? extends T> source2)
This behaves likemerge(Publisher, Publisher) except that if any of the merged Publishers notify of an error viaonError,mergeDelayError will refrain from propagating that error notification until all of the merged Publishers have finished emitting items.

Even if both merged Publishers sendonError notifications,mergeDelayError will only invoke theonError method of its Subscribers once.
Publishers are expected to honor backpressure; if violated, the operatormay signalMissingBackpressureException.mergeDelayError does not operate by default on a particularScheduler.T - the common element base typesource1 - a Publisher to be mergedsource2 - a Publisher to be merged@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T> Flowable<T> mergeDelayError(Publisher<? extends T> source1,Publisher<? extends T> source2,Publisher<? extends T> source3)
This behaves likemerge(Publisher, Publisher, Publisher) except that if any of the merged Publishers notify of an error viaonError,mergeDelayError will refrain from propagating that error notification until all of the merged Publishers have finished emitting items.

Even if multiple merged Publishers sendonError notifications,mergeDelayError will only invoke theonError method of its Subscribers once.
Publishers are expected to honor backpressure; if violated, the operatormay signalMissingBackpressureException.mergeDelayError does not operate by default on a particularScheduler.T - the common element base typesource1 - a Publisher to be mergedsource2 - a Publisher to be mergedsource3 - a Publisher to be merged@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T> Flowable<T> mergeDelayError(Publisher<? extends T> source1,Publisher<? extends T> source2,Publisher<? extends T> source3,Publisher<? extends T> source4)
This behaves likemerge(Publisher, Publisher, Publisher, Publisher) except that if any of the merged Publishers notify of an error viaonError,mergeDelayError will refrain from propagating that error notification until all of the merged Publishers have finished emitting items.

Even if multiple merged Publishers sendonError notifications,mergeDelayError will only invoke theonError method of its Subscribers once.
Publishers are expected to honor backpressure; if violated, the operatormay signalMissingBackpressureException.mergeDelayError does not operate by default on a particularScheduler.T - the common element base typesource1 - a Publisher to be mergedsource2 - a Publisher to be mergedsource3 - a Publisher to be mergedsource4 - a Publisher to be merged@CheckReturnValue@BackpressureSupport(value=PASS_THROUGH)@SchedulerSupport(value="none")public static <T> Flowable<T> never()
Subscriber.
This Publisher is useful primarily for testing purposes.
never does not operate by default on a particularScheduler.T - the type of items (not) emitted by the PublisherSubscriber@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static Flowable<Integer> range(int start, int count)

range does not operate by default on a particularScheduler.start - the value of the first Integer in the sequencecount - the number of sequential Integers to generateIllegalArgumentException - ifcount is less than zero, or ifstart +count − 1 exceedsInteger.MAX_VALUE@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static Flowable<Long> rangeLong(long start, long count)

rangeLong does not operate by default on a particularScheduler.start - the value of the first Long in the sequencecount - the number of sequential Longs to generateIllegalArgumentException - ifcount is less than zero, or ifstart +count − 1 exceedsLong.MAX_VALUE@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T> Single<Boolean> sequenceEqual(Publisher<? extends T> source1,Publisher<? extends T> source2)

sequenceEqual does not operate by default on a particularScheduler.T - the type of items emitted by each Publishersource1 - the first Publisher to comparesource2 - the second Publisher to compare@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T> Single<Boolean> sequenceEqual(Publisher<? extends T> source1,Publisher<? extends T> source2,BiPredicate<? super T,? super T> isEqual)

Publishers are expected to honor backpressure; if violated, the operator signals aMissingBackpressureException.sequenceEqual does not operate by default on a particularScheduler.T - the type of items emitted by each Publishersource1 - the first Publisher to comparesource2 - the second Publisher to compareisEqual - a function used to compare items emitted by each Publisher@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T> Single<Boolean> sequenceEqual(Publisher<? extends T> source1,Publisher<? extends T> source2,BiPredicate<? super T,? super T> isEqual, int bufferSize)

Publishers are expected to honor backpressure; if violated, the operator signals aMissingBackpressureException.sequenceEqual does not operate by default on a particularScheduler.T - the type of items emitted by each Publishersource1 - the first Publisher to comparesource2 - the second Publisher to compareisEqual - a function used to compare items emitted by each PublisherbufferSize - the number of items to prefetch from the first and second source Publisher@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T> Single<Boolean> sequenceEqual(Publisher<? extends T> source1,Publisher<? extends T> source2, int bufferSize)

sequenceEqual does not operate by default on a particularScheduler.T - the type of items emitted by each Publishersource1 - the first Publisher to comparesource2 - the second Publisher to comparebufferSize - the number of items to prefetch from the first and second source Publisher@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T> Flowable<T> switchOnNext(Publisher<? extendsPublisher<? extends T>> sources, int bufferSize)

switchOnNext subscribes to a Publisher that emits Publishers. Each time it observes one of these emitted Publishers, the Publisher returned byswitchOnNext begins emitting the items emitted by that Publisher. When a new Publisher is emitted,switchOnNext stops emitting items from the earlier-emitted Publisher and begins emitting items from the new one.
The resulting Publisher completes if both the outer Publisher and the last inner Publisher, if any, complete. If the outer Publisher signals an onError, the inner Publisher is canceled and the error delivered in-sequence.
Publisher is consumed in an unbounded manner (i.e., without backpressure) and the innerPublishers are expected to honor backpressure but it is not enforced; the operator won't signal aMissingBackpressureException but the violationmay lead toOutOfMemoryError due to internal buffer bloat.switchOnNext does not operate by default on a particularScheduler.T - the item typesources - the source Publisher that emits PublishersbufferSize - the number of items to prefetch from the inner Publishers@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T> Flowable<T> switchOnNext(Publisher<? extendsPublisher<? extends T>> sources)

switchOnNext subscribes to a Publisher that emits Publishers. Each time it observes one of these emitted Publishers, the Publisher returned byswitchOnNext begins emitting the items emitted by that Publisher. When a new Publisher is emitted,switchOnNext stops emitting items from the earlier-emitted Publisher and begins emitting items from the new one.
The resulting Publisher completes if both the outer Publisher and the last inner Publisher, if any, complete. If the outer Publisher signals an onError, the inner Publisher is canceled and the error delivered in-sequence.
Publisher is consumed in an unbounded manner (i.e., without backpressure) and the innerPublishers are expected to honor backpressure but it is not enforced; the operator won't signal aMissingBackpressureException but the violationmay lead toOutOfMemoryError due to internal buffer bloat.switchOnNext does not operate by default on a particularScheduler.T - the item typesources - the source Publisher that emits Publishers@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T> Flowable<T> switchOnNextDelayError(Publisher<? extendsPublisher<? extends T>> sources)

switchOnNext subscribes to a Publisher that emits Publishers. Each time it observes one of these emitted Publishers, the Publisher returned byswitchOnNext begins emitting the items emitted by that Publisher. When a new Publisher is emitted,switchOnNext stops emitting items from the earlier-emitted Publisher and begins emitting items from the new one.
The resulting Publisher completes if both the main Publisher and the last inner Publisher, if any, complete. If the main Publisher signals an onError, the termination of the last inner Publisher will emit that error as is or wrapped into a CompositeException along with the other possible errors the former inner Publishers signaled.
Publisher is consumed in an unbounded manner (i.e., without backpressure) and the innerPublishers are expected to honor backpressure but it is not enforced; the operator won't signal aMissingBackpressureException but the violationmay lead toOutOfMemoryError due to internal buffer bloat.switchOnNextDelayError does not operate by default on a particularScheduler.T - the item typesources - the source Publisher that emits Publishers@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T> Flowable<T> switchOnNextDelayError(Publisher<? extendsPublisher<? extends T>> sources, int prefetch)

switchOnNext subscribes to a Publisher that emits Publishers. Each time it observes one of these emitted Publishers, the Publisher returned byswitchOnNext begins emitting the items emitted by that Publisher. When a new Publisher is emitted,switchOnNext stops emitting items from the earlier-emitted Publisher and begins emitting items from the new one.
The resulting Publisher completes if both the main Publisher and the last inner Publisher, if any, complete. If the main Publisher signals an onError, the termination of the last inner Publisher will emit that error as is or wrapped into a CompositeException along with the other possible errors the former inner Publishers signaled.
Publisher is consumed in an unbounded manner (i.e., without backpressure) and the innerPublishers are expected to honor backpressure but it is not enforced; the operator won't signal aMissingBackpressureException but the violationmay lead toOutOfMemoryError due to internal buffer bloat.switchOnNextDelayError does not operate by default on a particularScheduler.T - the item typesources - the source Publisher that emits Publishersprefetch - the number of items to prefetch from the inner Publishers@CheckReturnValue@BackpressureSupport(value=ERROR)@SchedulerSupport(value="io.reactivex:computation")public static Flowable<Long> timer(long delay,TimeUnit unit)
0L after a specified delay, and then completes.
onBackpressureDrop().timer operates by default on thecomputationScheduler.delay - the initial delay before emitting a single0Lunit - time units to use fordelay0L after a specified delay, and then completes@CheckReturnValue@NonNull@BackpressureSupport(value=ERROR)@SchedulerSupport(value="custom")public static Flowable<Long> timer(long delay,TimeUnit unit,Scheduler scheduler)
0L after a specified delay, on a specified Scheduler, and then completes.
onBackpressureDrop().Scheduler this operator will use.delay - the initial delay before emitting a single 0Lunit - time units to use fordelayscheduler - theScheduler to use for scheduling the item0L after a specified delay, on a specified Scheduler, and then completes@CheckReturnValue@NonNull@BackpressureSupport(value=NONE)@SchedulerSupport(value="none")public static <T> Flowable<T> unsafeCreate(Publisher<T> onSubscribe)
unsafeCreate by default doesn't operate on any particularScheduler.T - the value type emittedonSubscribe - the Publisher instance to wrapIllegalArgumentException - ifonSubscribe is a subclass ofFlowable; such instances don't need conversion and is possibly a port remnant from 1.x or one should usehide() instead.@CheckReturnValue@BackpressureSupport(value=PASS_THROUGH)@SchedulerSupport(value="none")public static <T,D> Flowable<T> using(Callable<? extends D> resourceSupplier,Function<? super D,? extendsPublisher<? extends T>> sourceSupplier,Consumer<? super D> resourceDisposer)

resourceFactory.using does not operate by default on a particularScheduler.T - the element type of the generated PublisherD - the type of the resource associated with the output sequenceresourceSupplier - the factory function to create a resource object that depends on the PublishersourceSupplier - the factory function to create a PublisherresourceDisposer - the function that will dispose of the resource@CheckReturnValue@NonNull@BackpressureSupport(value=PASS_THROUGH)@SchedulerSupport(value="none")public static <T,D> Flowable<T> using(Callable<? extends D> resourceSupplier,Function<? super D,? extendsPublisher<? extends T>> sourceSupplier,Consumer<? super D> resourceDisposer, boolean eager)
disposeEagerly totrue and cancellation does not occur before termination. Otherwise, resource disposal will occur on cancellation. Eager disposal is particularly appropriate for a synchronous Publisher that reuses resources.disposeAction will only be called once per subscription.
resourceFactory.using does not operate by default on a particularScheduler.T - the element type of the generated PublisherD - the type of the resource associated with the output sequenceresourceSupplier - the factory function to create a resource object that depends on the PublishersourceSupplier - the factory function to create a PublisherresourceDisposer - the function that will dispose of the resourceeager - iftrue then disposal will happen either on cancellation or just before emission of a terminal event (onComplete oronError).@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T,R> Flowable<R> zip(Iterable<? extendsPublisher<? extends T>> sources,Function<? superObject[],? extends R> zipper)
zip applies this function in strict sequence, so the first item emitted by the new Publisher will be the result of the function applied to the first item emitted by each of the source Publishers; the second item emitted by the new Publisher will be the result of the function applied to the second item emitted by each of those Publishers; and so forth.
The resultingPublisher<R> returned fromzip will invokeonNext as many times as the number ofonNext invocations of the source Publisher that emits the fewest items.
The operator subscribes to its sources in the order they are specified and completes eagerly if one of the sources is shorter than the rest while canceling the other sources. Therefore, it is possible those other sources will never be able to run to completion (and thus not callingdoOnComplete()). This can also happen if the sources are exactly the same length; if source A completes and B has been consumed and is about to complete, the operator detects A won't be sending further values and it will cancel B immediately. For example:
zip(Arrays.asList(range(1, 5).doOnComplete(action1), range(6, 5).doOnComplete(action2)), (a) -> a)action1 will be called butaction2 won't.doOnCancel(Action) as well or useusing() to do cleanup in case of completion or cancellation.
interval(long, TimeUnit) may result in MissingBackpressureException, use one of theonBackpressureX to handle similar, backpressure-ignoring sources.zip does not operate by default on a particularScheduler.T - the common value typeR - the zipped result typesources - an Iterable of source Publisherszipper - a function that, when applied to an item emitted by each of the source Publishers, results in an item that will be emitted by the resulting Publisher@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T,R> Flowable<R> zip(Publisher<? extendsPublisher<? extends T>> sources,Function<? superObject[],? extends R> zipper)
zip applies this function in strict sequence, so the first item emitted by the new Publisher will be the result of the function applied to the first item emitted by each of the Publishers emitted by the source Publisher; the second item emitted by the new Publisher will be the result of the function applied to the second item emitted by each of those Publishers; and so forth.
The resultingPublisher<R> returned fromzip will invokeonNext as many times as the number ofonNext invocations of the source Publisher that emits the fewest items.
The operator subscribes to its sources in the order they are specified and completes eagerly if one of the sources is shorter than the rest while cancel the other sources. Therefore, it is possible those other sources will never be able to run to completion (and thus not callingdoOnComplete()). This can also happen if the sources are exactly the same length; if source A completes and B has been consumed and is about to complete, the operator detects A won't be sending further values and it will cancel B immediately. For example:
zip(just(range(1, 5).doOnComplete(action1), range(6, 5).doOnComplete(action2)), (a) -> a)action1 will be called butaction2 won't.doOnCancel(Action) as well or useusing() to do cleanup in case of completion or cancellation.
interval(long, TimeUnit) may result in MissingBackpressureException, use one of theonBackpressureX to handle similar, backpressure-ignoring sources.zip does not operate by default on a particularScheduler.T - the value type of the inner PublishersR - the zipped result typesources - a Publisher of source Publisherszipper - a function that, when applied to an item emitted by each of the Publishers emitted byws, results in an item that will be emitted by the resulting Publisher@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T1,T2,R> Flowable<R> zip(Publisher<? extends T1> source1,Publisher<? extends T2> source2,BiFunction<? super T1,? super T2,? extends R> zipper)

zip applies this function in strict sequence, so the first item emitted by the new Publisher will be the result of the function applied to the first item emitted byo1 and the first item emitted byo2; the second item emitted by the new Publisher will be the result of the function applied to the second item emitted byo1 and the second item emitted byo2; and so forth.
The resultingPublisher<R> returned fromzip will invokeonNext as many times as the number ofonNext invocations of the source Publisher that emits the fewest items.
The operator subscribes to its sources in the order they are specified and completes eagerly if one of the sources is shorter than the rest while canceling the other sources. Therefore, it is possible those other sources will never be able to run to completion (and thus not callingdoOnComplete()). This can also happen if the sources are exactly the same length; if source A completes and B has been consumed and is about to complete, the operator detects A won't be sending further values and it will cancel B immediately. For example:
zip(range(1, 5).doOnComplete(action1), range(6, 5).doOnComplete(action2), (a, b) -> a + b)action1 will be called butaction2 won't.doOnCancel(Action) as well or useusing() to do cleanup in case of completion or cancellation.interval(long, TimeUnit) may result in MissingBackpressureException, use one of theonBackpressureX to handle similar, backpressure-ignoring sources.zip does not operate by default on a particularScheduler.T1 - the value type of the first sourceT2 - the value type of the second sourceR - the zipped result typesource1 - the first source Publishersource2 - a second source Publisherzipper - a function that, when applied to an item emitted by each of the source Publishers, results in an item that will be emitted by the resulting Publisher@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T1,T2,R> Flowable<R> zip(Publisher<? extends T1> source1,Publisher<? extends T2> source2,BiFunction<? super T1,? super T2,? extends R> zipper, boolean delayError)

zip applies this function in strict sequence, so the first item emitted by the new Publisher will be the result of the function applied to the first item emitted byo1 and the first item emitted byo2; the second item emitted by the new Publisher will be the result of the function applied to the second item emitted byo1 and the second item emitted byo2; and so forth.
The resultingPublisher<R> returned fromzip will invokeonNext as many times as the number ofonNext invocations of the source Publisher that emits the fewest items.
The operator subscribes to its sources in the order they are specified and completes eagerly if one of the sources is shorter than the rest while canceling the other sources. Therefore, it is possible those other sources will never be able to run to completion (and thus not callingdoOnComplete()). This can also happen if the sources are exactly the same length; if source A completes and B has been consumed and is about to complete, the operator detects A won't be sending further values and it will cancel B immediately. For example:
zip(range(1, 5).doOnComplete(action1), range(6, 5).doOnComplete(action2), (a, b) -> a + b)action1 will be called butaction2 won't.doOnCancel(Action) as well or useusing() to do cleanup in case of completion or cancellation.interval(long, TimeUnit) may result in MissingBackpressureException, use one of theonBackpressureX to handle similar, backpressure-ignoring sources.zip does not operate by default on a particularScheduler.T1 - the value type of the first sourceT2 - the value type of the second sourceR - the zipped result typesource1 - the first source Publishersource2 - a second source Publisherzipper - a function that, when applied to an item emitted by each of the source Publishers, results in an item that will be emitted by the resulting PublisherdelayError - delay errors from any of the source Publishers till the other terminates@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T1,T2,R> Flowable<R> zip(Publisher<? extends T1> source1,Publisher<? extends T2> source2,BiFunction<? super T1,? super T2,? extends R> zipper, boolean delayError, int bufferSize)

zip applies this function in strict sequence, so the first item emitted by the new Publisher will be the result of the function applied to the first item emitted byo1 and the first item emitted byo2; the second item emitted by the new Publisher will be the result of the function applied to the second item emitted byo1 and the second item emitted byo2; and so forth.
The resultingPublisher<R> returned fromzip will invokeonNext as many times as the number ofonNext invocations of the source Publisher that emits the fewest items.
The operator subscribes to its sources in the order they are specified and completes eagerly if one of the sources is shorter than the rest while canceling the other sources. Therefore, it is possible those other sources will never be able to run to completion (and thus not callingdoOnComplete()). This can also happen if the sources are exactly the same length; if source A completes and B has been consumed and is about to complete, the operator detects A won't be sending further values and it will cancel B immediately. For example:
zip(range(1, 5).doOnComplete(action1), range(6, 5).doOnComplete(action2), (a, b) -> a + b)action1 will be called butaction2 won't.doOnCancel(Action) as well or useusing() to do cleanup in case of completion or cancellation.interval(long, TimeUnit) may result in MissingBackpressureException, use one of theonBackpressureX to handle similar, backpressure-ignoring sources.zip does not operate by default on a particularScheduler.T1 - the value type of the first sourceT2 - the value type of the second sourceR - the zipped result typesource1 - the first source Publishersource2 - a second source Publisherzipper - a function that, when applied to an item emitted by each of the source Publishers, results in an item that will be emitted by the resulting PublisherdelayError - delay errors from any of the source Publishers till the other terminatesbufferSize - the number of elements to prefetch from each source Publisher@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T1,T2,T3,R> Flowable<R> zip(Publisher<? extends T1> source1,Publisher<? extends T2> source2,Publisher<? extends T3> source3,Function3<? super T1,? super T2,? super T3,? extends R> zipper)

zip applies this function in strict sequence, so the first item emitted by the new Publisher will be the result of the function applied to the first item emitted byo1, the first item emitted byo2, and the first item emitted byo3; the second item emitted by the new Publisher will be the result of the function applied to the second item emitted byo1, the second item emitted byo2, and the second item emitted byo3; and so forth.
The resultingPublisher<R> returned fromzip will invokeonNext as many times as the number ofonNext invocations of the source Publisher that emits the fewest items.
The operator subscribes to its sources in the order they are specified and completes eagerly if one of the sources is shorter than the rest while canceling the other sources. Therefore, it is possible those other sources will never be able to run to completion (and thus not callingdoOnComplete()). This can also happen if the sources are exactly the same length; if source A completes and B has been consumed and is about to complete, the operator detects A won't be sending further values and it will cancel B immediately. For example:
zip(range(1, 5).doOnComplete(action1), range(6, 5).doOnComplete(action2), ..., (a, b, c) -> a + b)action1 will be called butaction2 won't.doOnCancel(Action) as well or useusing() to do cleanup in case of completion or cancellation.interval(long, TimeUnit) may result in MissingBackpressureException, use one of theonBackpressureX to handle similar, backpressure-ignoring sources.zip does not operate by default on a particularScheduler.T1 - the value type of the first sourceT2 - the value type of the second sourceT3 - the value type of the third sourceR - the zipped result typesource1 - the first source Publishersource2 - a second source Publishersource3 - a third source Publisherzipper - a function that, when applied to an item emitted by each of the source Publishers, results in an item that will be emitted by the resulting Publisher@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T1,T2,T3,T4,R> Flowable<R> zip(Publisher<? extends T1> source1,Publisher<? extends T2> source2,Publisher<? extends T3> source3,Publisher<? extends T4> source4,Function4<? super T1,? super T2,? super T3,? super T4,? extends R> zipper)

zip applies this function in strict sequence, so the first item emitted by the new Publisher will be the result of the function applied to the first item emitted byo1, the first item emitted byo2, the first item emitted byo3, and the first item emitted by04; the second item emitted by the new Publisher will be the result of the function applied to the second item emitted by each of those Publishers; and so forth.
The resultingPublisher<R> returned fromzip will invokeonNext as many times as the number ofonNext invocations of the source Publisher that emits the fewest items.
The operator subscribes to its sources in the order they are specified and completes eagerly if one of the sources is shorter than the rest while canceling the other sources. Therefore, it is possible those other sources will never be able to run to completion (and thus not callingdoOnComplete()). This can also happen if the sources are exactly the same length; if source A completes and B has been consumed and is about to complete, the operator detects A won't be sending further values and it will cancel B immediately. For example:
zip(range(1, 5).doOnComplete(action1), range(6, 5).doOnComplete(action2), ..., (a, b, c, d) -> a + b)action1 will be called butaction2 won't.doOnCancel(Action) as well or useusing() to do cleanup in case of completion or cancellation.interval(long, TimeUnit) may result in MissingBackpressureException, use one of theonBackpressureX to handle similar, backpressure-ignoring sources.zip does not operate by default on a particularScheduler.T1 - the value type of the first sourceT2 - the value type of the second sourceT3 - the value type of the third sourceT4 - the value type of the fourth sourceR - the zipped result typesource1 - the first source Publishersource2 - a second source Publishersource3 - a third source Publishersource4 - a fourth source Publisherzipper - a function that, when applied to an item emitted by each of the source Publishers, results in an item that will be emitted by the resulting Publisher@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T1,T2,T3,T4,T5,R> Flowable<R> zip(Publisher<? extends T1> source1,Publisher<? extends T2> source2,Publisher<? extends T3> source3,Publisher<? extends T4> source4,Publisher<? extends T5> source5,Function5<? super T1,? super T2,? super T3,? super T4,? super T5,? extends R> zipper)

zip applies this function in strict sequence, so the first item emitted by the new Publisher will be the result of the function applied to the first item emitted byo1, the first item emitted byo2, the first item emitted byo3, the first item emitted byo4, and the first item emitted byo5; the second item emitted by the new Publisher will be the result of the function applied to the second item emitted by each of those Publishers; and so forth.
The resultingPublisher<R> returned fromzip will invokeonNext as many times as the number ofonNext invocations of the source Publisher that emits the fewest items.
The operator subscribes to its sources in the order they are specified and completes eagerly if one of the sources is shorter than the rest while canceling the other sources. Therefore, it is possible those other sources will never be able to run to completion (and thus not callingdoOnComplete()). This can also happen if the sources are exactly the same length; if source A completes and B has been consumed and is about to complete, the operator detects A won't be sending further values and it will cancel B immediately. For example:
zip(range(1, 5).doOnComplete(action1), range(6, 5).doOnComplete(action2), ..., (a, b, c, d, e) -> a + b)action1 will be called butaction2 won't.doOnCancel(Action) as well or useusing() to do cleanup in case of completion or cancellation.interval(long, TimeUnit) may result in MissingBackpressureException, use one of theonBackpressureX to handle similar, backpressure-ignoring sources.zip does not operate by default on a particularScheduler.T1 - the value type of the first sourceT2 - the value type of the second sourceT3 - the value type of the third sourceT4 - the value type of the fourth sourceT5 - the value type of the fifth sourceR - the zipped result typesource1 - the first source Publishersource2 - a second source Publishersource3 - a third source Publishersource4 - a fourth source Publishersource5 - a fifth source Publisherzipper - a function that, when applied to an item emitted by each of the source Publishers, results in an item that will be emitted by the resulting Publisher@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T1,T2,T3,T4,T5,T6,R> Flowable<R> zip(Publisher<? extends T1> source1,Publisher<? extends T2> source2,Publisher<? extends T3> source3,Publisher<? extends T4> source4,Publisher<? extends T5> source5,Publisher<? extends T6> source6,Function6<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? extends R> zipper)

zip applies this function in strict sequence, so the first item emitted by the new Publisher will be the result of the function applied to the first item emitted by each source Publisher, the second item emitted by the new Publisher will be the result of the function applied to the second item emitted by each of those Publishers, and so forth.
The resultingPublisher<R> returned fromzip will invokeonNext as many times as the number ofonNext invocations of the source Publisher that emits the fewest items.
The operator subscribes to its sources in the order they are specified and completes eagerly if one of the sources is shorter than the rest while canceling the other sources. Therefore, it is possible those other sources will never be able to run to completion (and thus not callingdoOnComplete()). This can also happen if the sources are exactly the same length; if source A completes and B has been consumed and is about to complete, the operator detects A won't be sending further values and it will cancel B immediately. For example:
zip(range(1, 5).doOnComplete(action1), range(6, 5).doOnComplete(action2), ..., (a, b, c, d, e, f) -> a + b)action1 will be called butaction2 won't.doOnCancel(Action) as well or useusing() to do cleanup in case of completion or cancellation.interval(long, TimeUnit) may result in MissingBackpressureException, use one of theonBackpressureX to handle similar, backpressure-ignoring sources.zip does not operate by default on a particularScheduler.T1 - the value type of the first sourceT2 - the value type of the second sourceT3 - the value type of the third sourceT4 - the value type of the fourth sourceT5 - the value type of the fifth sourceT6 - the value type of the sixth sourceR - the zipped result typesource1 - the first source Publishersource2 - a second source Publishersource3 - a third source Publishersource4 - a fourth source Publishersource5 - a fifth source Publishersource6 - a sixth source Publisherzipper - a function that, when applied to an item emitted by each of the source Publishers, results in an item that will be emitted by the resulting Publisher@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T1,T2,T3,T4,T5,T6,T7,R> Flowable<R> zip(Publisher<? extends T1> source1,Publisher<? extends T2> source2,Publisher<? extends T3> source3,Publisher<? extends T4> source4,Publisher<? extends T5> source5,Publisher<? extends T6> source6,Publisher<? extends T7> source7,Function7<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? extends R> zipper)

zip applies this function in strict sequence, so the first item emitted by the new Publisher will be the result of the function applied to the first item emitted by each source Publisher, the second item emitted by the new Publisher will be the result of the function applied to the second item emitted by each of those Publishers, and so forth.
The resultingPublisher<R> returned fromzip will invokeonNext as many times as the number ofonNext invocations of the source Publisher that emits the fewest items.
The operator subscribes to its sources in the order they are specified and completes eagerly if one of the sources is shorter than the rest while canceling the other sources. Therefore, it is possible those other sources will never be able to run to completion (and thus not callingdoOnComplete()). This can also happen if the sources are exactly the same length; if source A completes and B has been consumed and is about to complete, the operator detects A won't be sending further values and it will cancel B immediately. For example:
zip(range(1, 5).doOnComplete(action1), range(6, 5).doOnComplete(action2), ..., (a, b, c, d, e, f, g) -> a + b)action1 will be called butaction2 won't.doOnCancel(Action) as well or useusing() to do cleanup in case of completion or cancellation.interval(long, TimeUnit) may result in MissingBackpressureException, use one of theonBackpressureX to handle similar, backpressure-ignoring sources.zip does not operate by default on a particularScheduler.T1 - the value type of the first sourceT2 - the value type of the second sourceT3 - the value type of the third sourceT4 - the value type of the fourth sourceT5 - the value type of the fifth sourceT6 - the value type of the sixth sourceT7 - the value type of the seventh sourceR - the zipped result typesource1 - the first source Publishersource2 - a second source Publishersource3 - a third source Publishersource4 - a fourth source Publishersource5 - a fifth source Publishersource6 - a sixth source Publishersource7 - a seventh source Publisherzipper - a function that, when applied to an item emitted by each of the source Publishers, results in an item that will be emitted by the resulting Publisher@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T1,T2,T3,T4,T5,T6,T7,T8,R> Flowable<R> zip(Publisher<? extends T1> source1,Publisher<? extends T2> source2,Publisher<? extends T3> source3,Publisher<? extends T4> source4,Publisher<? extends T5> source5,Publisher<? extends T6> source6,Publisher<? extends T7> source7,Publisher<? extends T8> source8,Function8<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? super T8,? extends R> zipper)

zip applies this function in strict sequence, so the first item emitted by the new Publisher will be the result of the function applied to the first item emitted by each source Publisher, the second item emitted by the new Publisher will be the result of the function applied to the second item emitted by each of those Publishers, and so forth.
The resultingPublisher<R> returned fromzip will invokeonNext as many times as the number ofonNext invocations of the source Publisher that emits the fewest items.
The operator subscribes to its sources in the order they are specified and completes eagerly if one of the sources is shorter than the rest while canceling the other sources. Therefore, it is possible those other sources will never be able to run to completion (and thus not callingdoOnComplete()). This can also happen if the sources are exactly the same length; if source A completes and B has been consumed and is about to complete, the operator detects A won't be sending further values and it will cancel B immediately. For example:
zip(range(1, 5).doOnComplete(action1), range(6, 5).doOnComplete(action2), ..., (a, b, c, d, e, f, g, h) -> a + b)action1 will be called butaction2 won't.doOnCancel(Action) as well or useusing() to do cleanup in case of completion or cancellation.interval(long, TimeUnit) may result in MissingBackpressureException, use one of theonBackpressureX to handle similar, backpressure-ignoring sources.zip does not operate by default on a particularScheduler.T1 - the value type of the first sourceT2 - the value type of the second sourceT3 - the value type of the third sourceT4 - the value type of the fourth sourceT5 - the value type of the fifth sourceT6 - the value type of the sixth sourceT7 - the value type of the seventh sourceT8 - the value type of the eighth sourceR - the zipped result typesource1 - the first source Publishersource2 - a second source Publishersource3 - a third source Publishersource4 - a fourth source Publishersource5 - a fifth source Publishersource6 - a sixth source Publishersource7 - a seventh source Publishersource8 - an eighth source Publisherzipper - a function that, when applied to an item emitted by each of the source Publishers, results in an item that will be emitted by the resulting Publisher@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T1,T2,T3,T4,T5,T6,T7,T8,T9,R> Flowable<R> zip(Publisher<? extends T1> source1,Publisher<? extends T2> source2,Publisher<? extends T3> source3,Publisher<? extends T4> source4,Publisher<? extends T5> source5,Publisher<? extends T6> source6,Publisher<? extends T7> source7,Publisher<? extends T8> source8,Publisher<? extends T9> source9,Function9<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? super T8,? super T9,? extends R> zipper)

zip applies this function in strict sequence, so the first item emitted by the new Publisher will be the result of the function applied to the first item emitted by each source Publisher, the second item emitted by the new Publisher will be the result of the function applied to the second item emitted by each of those Publishers, and so forth.
The resultingPublisher<R> returned fromzip will invokeonNext as many times as the number ofonNext invocations of the source Publisher that emits the fewest items.
The operator subscribes to its sources in the order they are specified and completes eagerly if one of the sources is shorter than the rest while canceling the other sources. Therefore, it is possible those other sources will never be able to run to completion (and thus not callingdoOnComplete()). This can also happen if the sources are exactly the same length; if source A completes and B has been consumed and is about to complete, the operator detects A won't be sending further values and it will cancel B immediately. For example:
zip(range(1, 5).doOnComplete(action1), range(6, 5).doOnComplete(action2), ..., (a, b, c, d, e, f, g, h, i) -> a + b)action1 will be called butaction2 won't.doOnCancel(Action) as well or useusing() to do cleanup in case of completion or cancellation.interval(long, TimeUnit) may result in MissingBackpressureException, use one of theonBackpressureX to handle similar, backpressure-ignoring sources.zip does not operate by default on a particularScheduler.T1 - the value type of the first sourceT2 - the value type of the second sourceT3 - the value type of the third sourceT4 - the value type of the fourth sourceT5 - the value type of the fifth sourceT6 - the value type of the sixth sourceT7 - the value type of the seventh sourceT8 - the value type of the eighth sourceT9 - the value type of the ninth sourceR - the zipped result typesource1 - the first source Publishersource2 - a second source Publishersource3 - a third source Publishersource4 - a fourth source Publishersource5 - a fifth source Publishersource6 - a sixth source Publishersource7 - a seventh source Publishersource8 - an eighth source Publishersource9 - a ninth source Publisherzipper - a function that, when applied to an item emitted by each of the source Publishers, results in an item that will be emitted by the resulting Publisher@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T,R> Flowable<R> zipArray(Function<? superObject[],? extends R> zipper, boolean delayError, int bufferSize,Publisher<? extends T>... sources)
zip applies this function in strict sequence, so the first item emitted by the new Publisher will be the result of the function applied to the first item emitted by each of the source Publishers; the second item emitted by the new Publisher will be the result of the function applied to the second item emitted by each of those Publishers; and so forth.
The resultingPublisher<R> returned fromzip will invokeonNext as many times as the number ofonNext invocations of the source Publisher that emits the fewest items.
The operator subscribes to its sources in the order they are specified and completes eagerly if one of the sources is shorter than the rest while canceling the other sources. Therefore, it is possible those other sources will never be able to run to completion (and thus not callingdoOnComplete()). This can also happen if the sources are exactly the same length; if source A completes and B has been consumed and is about to complete, the operator detects A won't be sending further values and it will cancel B immediately. For example:
zip(new Publisher[]{range(1, 5).doOnComplete(action1), range(6, 5).doOnComplete(action2)}, (a) -> a)action1 will be called butaction2 won't.doOnCancel(Action) as well or useusing() to do cleanup in case of completion or cancellation.
interval(long, TimeUnit) may result in MissingBackpressureException, use one of theonBackpressureX to handle similar, backpressure-ignoring sources.zipArray does not operate by default on a particularScheduler.T - the common element typeR - the result typesources - an array of source Publisherszipper - a function that, when applied to an item emitted by each of the source Publishers, results in an item that will be emitted by the resulting PublisherdelayError - delay errors signaled by any of the source Publisher until all Publishers terminatebufferSize - the number of elements to prefetch from each source Publisher@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public static <T,R> Flowable<R> zipIterable(Iterable<? extendsPublisher<? extends T>> sources,Function<? superObject[],? extends R> zipper, boolean delayError, int bufferSize)
zip applies this function in strict sequence, so the first item emitted by the new Publisher will be the result of the function applied to the first item emitted by each of the source Publishers; the second item emitted by the new Publisher will be the result of the function applied to the second item emitted by each of those Publishers; and so forth.
The resultingPublisher<R> returned fromzip will invokeonNext as many times as the number ofonNext invocations of the source Publisher that emits the fewest items.
The operator subscribes to its sources in the order they are specified and completes eagerly if one of the sources is shorter than the rest while canceling the other sources. Therefore, it is possible those other sources will never be able to run to completion (and thus not callingdoOnComplete()). This can also happen if the sources are exactly the same length; if source A completes and B has been consumed and is about to complete, the operator detects A won't be sending further values and it will cancel B immediately. For example:
zip(Arrays.asList(range(1, 5).doOnComplete(action1), range(6, 5).doOnComplete(action2)), (a) -> a)action1 will be called butaction2 won't.doOnCancel(Action) as well or useusing() to do cleanup in case of completion or cancellation.
interval(long, TimeUnit) may result in MissingBackpressureException, use one of theonBackpressureX to handle similar, backpressure-ignoring sources.zipIterable does not operate by default on a particularScheduler.T - the common source value typeR - the zipped result typesources - an Iterable of source Publisherszipper - a function that, when applied to an item emitted by each of the source Publishers, results in an item that will be emitted by the resulting PublisherdelayError - delay errors signaled by any of the source Publisher until all Publishers terminatebufferSize - the number of elements to prefetch from each source Publisher@CheckReturnValue@NonNull@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final Single<Boolean> all(Predicate<? superT> predicate)

Publisher in an unbounded manner (i.e., without applying backpressure).all does not operate by default on a particularScheduler.predicate - a function that evaluates an item and returns a Booleantrue if all items emitted by the source Publisher satisfy the predicate; otherwise,false@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final Flowable<T> ambWith(Publisher<? extendsT> other)

Publisher's backpressure behavior.ambWith does not operate by default on a particularScheduler.other - a Publisher competing to react first. A subscription to this provided Publisher will occur after subscribing to the current Publisher.@CheckReturnValue@NonNull@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final Single<Boolean> any(Predicate<? superT> predicate)
true if any item emitted by the source Publisher satisfies a specified condition, otherwisefalse.Note: this always emitsfalse if the source Publisher is empty.
In Rx.Net this is theany operator but we renamed it in RxJava to better match Java naming idioms.
Publisher in an unbounded manner (i.e., no backpressure applied to it).any does not operate by default on a particularScheduler.predicate - the condition to test items emitted by the source Publisherpredicate@CheckReturnValue@BackpressureSupport(value=SPECIAL)@SchedulerSupport(value="none")public final <R> R as(@NonNullFlowableConverter<T,? extends R> converter)
This allows fluent conversion to any other type.
converter function.as does not operate by default on a particularScheduler.History: 2.1.7 - experimental
R - the resulting object typeconverter - the function that receives the current Flowable instance and returns a valueNullPointerException - if converter is null@CheckReturnValue@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final T blockingFirst()
Flowable, or throwsNoSuchElementException if it emits no items.Flowable in an unbounded manner (i.e., no backpressure applied to it).blockingFirst does not operate by default on a particularScheduler.Exception intoRuntimeException and throws that. Otherwise,RuntimeExceptions andErrors are rethrown as they are.FlowableNoSuchElementException - if thisFlowable emits no items@CheckReturnValue@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final T blockingFirst(T defaultItem)
Flowable, or a default value if it emits no items.Flowable in an unbounded manner (i.e., no backpressure applied to it).blockingFirst does not operate by default on a particularScheduler.Exception intoRuntimeException and throws that. Otherwise,RuntimeExceptions andErrors are rethrown as they are.defaultItem - a default value to return if thisFlowable emits no itemsFlowable, or the default value if it emits no items@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final void blockingForEach(Consumer<? superT> onNext)
Flowable in a blocking fashion and invokes the givenConsumer with each upstream item on thecurrent thread until the upstream terminates.
Note: the method will only return if the upstream terminates or the current thread is interrupted.
This method executes theConsumer on the current thread whilesubscribe(Consumer) executes the consumer on the original caller thread of the sequence.
Flowable in an unbounded manner (i.e., no backpressure applied to it).blockingForEach does not operate by default on a particularScheduler.Exception intoRuntimeException and throws that. Otherwise,RuntimeExceptions andErrors are rethrown as they are.onNext - theConsumer to invoke for each item emitted by theFlowableRuntimeException - if an error occurssubscribe(Consumer)@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final Iterable<T> blockingIterable()
Flowable into anIterable.
MissingBackpressureException.blockingIterable does not operate by default on a particularScheduler.Iterable version of thisFlowable@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final Iterable<T> blockingIterable(int bufferSize)
Flowable into anIterable.
MissingBackpressureException.blockingIterable does not operate by default on a particularScheduler.bufferSize - the number of items to prefetch from the current FlowableIterable version of thisFlowable@CheckReturnValue@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final T blockingLast()
Flowable, or throwsNoSuchElementException if thisFlowable emits no items.
Flowable in an unbounded manner (i.e., no backpressure applied to it).blockingLast does not operate by default on a particularScheduler.Exception intoRuntimeException and throws that. Otherwise,RuntimeExceptions andErrors are rethrown as they are.FlowableNoSuchElementException - if thisFlowable emits no items@CheckReturnValue@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final T blockingLast(T defaultItem)
Flowable, or a default value if it emits no items.
Flowable in an unbounded manner (i.e., no backpressure applied to it).blockingLast does not operate by default on a particularScheduler.Exception intoRuntimeException and throws that. Otherwise,RuntimeExceptions andErrors are rethrown as they are.defaultItem - a default value to return if thisFlowable emits no itemsFlowable, or the default value if it emits no items@CheckReturnValue@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final Iterable<T> blockingLatest()
Iterable that returns the latest item emitted by thisFlowable, waiting if necessary for one to become available. If thisFlowable produces items faster thanIterator.next takes them,onNext events might be skipped, butonError oronComplete events are not.
Note also that anonNext directly followed byonComplete might hide theonNext event.
Flowable in an unbounded manner (i.e., no backpressure applied to it).blockingLatest does not operate by default on a particularScheduler.Flowable@CheckReturnValue@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final Iterable<T> blockingMostRecent(T initialItem)
Iterable that always returns the item most recently emitted by thisFlowable.
Flowable in an unbounded manner (i.e., no backpressure applied to it).blockingMostRecent does not operate by default on a particularScheduler.initialItem - the initial item that theIterable sequence will yield if thisFlowable has not yet emitted an itemIterable that on each iteration returns the item that thisFlowable has most recently emitted@CheckReturnValue@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final Iterable<T> blockingNext()
Iterable that blocks until thisFlowable emits another item, then returns that item.
Flowable in an unbounded manner (i.e., no backpressure applied to it).blockingNext does not operate by default on a particularScheduler.Iterable that blocks upon each iteration until thisFlowable emits a new item, whereupon the Iterable returns that item@CheckReturnValue@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final T blockingSingle()
Flowable completes after emitting a single item, return that item, otherwise throw aNoSuchElementException.
Flowable in an unbounded manner (i.e., no backpressure applied to it).blockingSingle does not operate by default on a particularScheduler.Exception intoRuntimeException and throws that. Otherwise,RuntimeExceptions andErrors are rethrown as they are.Flowable@CheckReturnValue@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final T blockingSingle(T defaultItem)
Flowable completes 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.
Flowable in an unbounded manner (i.e., no backpressure applied to it).blockingSingle does not operate by default on a particularScheduler.Exception intoRuntimeException and throws that. Otherwise,RuntimeExceptions andErrors are rethrown as they are.defaultItem - a default value to return if thisFlowable emits no itemsFlowable, or the default value if it emits no items@CheckReturnValue@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final Future<T> toFuture()
Future representing the only value emitted by thisFlowable.
If theFlowable emits more than one item,Future will receive anIndexOutOfBoundsException. If theFlowable is empty,Future will receive aNoSuchElementException. TheFlowable source has to terminate in order for the returnedFuture to terminate as well.
If theFlowable may emit more than one item, useFlowable.toList().toFuture().
Flowable in an unbounded manner (i.e., no backpressure applied to it).toFuture does not operate by default on a particularScheduler.Future that expects a single item to be emitted by thisFlowable@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final void blockingSubscribe()
Note that calling this method will block the caller thread until the upstream terminates normally or with an error. Therefore, calling this method from special threads such as the Android Main Thread or the Swing Event Dispatch Thread is not recommended.
Flowable in an unbounded manner (i.e., no backpressure applied to it).blockingSubscribe does not operate by default on a particularScheduler.@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final void blockingSubscribe(Consumer<? superT> onNext)
If the Flowable emits an error, it is wrapped into anOnErrorNotImplementedException and routed to the RxJavaPlugins.onError handler. Using the overloadsblockingSubscribe(Consumer, Consumer) orblockingSubscribe(Consumer, Consumer, Action) instead is recommended.
Note that calling this method will block the caller thread until the upstream terminates normally or with an error. Therefore, calling this method from special threads such as the Android Main Thread or the Swing Event Dispatch Thread is not recommended.
Flowable in an unbounded manner (i.e., no backpressure applied to it).blockingSubscribe does not operate by default on a particularScheduler.onNext - the callback action for each source valueblockingSubscribe(Consumer, Consumer),blockingSubscribe(Consumer, Consumer, Action)@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final void blockingSubscribe(Consumer<? superT> onNext, int bufferSize)
If the Flowable emits an error, it is wrapped into anOnErrorNotImplementedException and routed to the RxJavaPlugins.onError handler. Using the overloadsblockingSubscribe(Consumer, Consumer) orblockingSubscribe(Consumer, Consumer, Action) instead is recommended.
Note that calling this method will block the caller thread until the upstream terminates normally or with an error. Therefore, calling this method from special threads such as the Android Main Thread or the Swing Event Dispatch Thread is not recommended.
Flowable in an bounded manner (up to bufferSize outstanding request amount for items).blockingSubscribe does not operate by default on a particularScheduler.History: 2.1.15 - experimental
onNext - the callback action for each source valuebufferSize - the size of the bufferblockingSubscribe(Consumer, Consumer),blockingSubscribe(Consumer, Consumer, Action)@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final void blockingSubscribe(Consumer<? superT> onNext,Consumer<? superThrowable> onError)
Note that calling this method will block the caller thread until the upstream terminates normally or with an error. Therefore, calling this method from special threads such as the Android Main Thread or the Swing Event Dispatch Thread is not recommended.
Flowable in an unbounded manner (i.e., no backpressure applied to it).blockingSubscribe does not operate by default on a particularScheduler.onNext - the callback action for each source valueonError - the callback action for an error eventblockingSubscribe(Consumer, Consumer, Action)@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final void blockingSubscribe(Consumer<? superT> onNext,Consumer<? superThrowable> onError, int bufferSize)
Note that calling this method will block the caller thread until the upstream terminates normally or with an error. Therefore, calling this method from special threads such as the Android Main Thread or the Swing Event Dispatch Thread is not recommended.
Flowable in an bounded manner (up to bufferSize outstanding request amount for items).blockingSubscribe does not operate by default on a particularScheduler.History: 2.1.15 - experimental
onNext - the callback action for each source valueonError - the callback action for an error eventbufferSize - the size of the bufferblockingSubscribe(Consumer, Consumer, Action)@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final void blockingSubscribe(Consumer<? superT> onNext,Consumer<? superThrowable> onError,Action onComplete)
Note that calling this method will block the caller thread until the upstream terminates normally or with an error. Therefore, calling this method from special threads such as the Android Main Thread or the Swing Event Dispatch Thread is not recommended.
Flowable in an unbounded manner (i.e., no backpressure applied to it).blockingSubscribe does not operate by default on a particularScheduler.onNext - the callback action for each source valueonError - the callback action for an error eventonComplete - the callback action for the completion event.@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final void blockingSubscribe(Consumer<? superT> onNext,Consumer<? superThrowable> onError,Action onComplete, int bufferSize)
Note that calling this method will block the caller thread until the upstream terminates normally or with an error. Therefore, calling this method from special threads such as the Android Main Thread or the Swing Event Dispatch Thread is not recommended.
Flowable in an bounded manner (up to bufferSize outstanding request amount for items).blockingSubscribe does not operate by default on a particularScheduler.History: 2.1.15 - experimental
onNext - the callback action for each source valueonError - the callback action for an error eventonComplete - the callback action for the completion event.bufferSize - the size of the buffer@BackpressureSupport(value=SPECIAL)@SchedulerSupport(value="none")public final void blockingSubscribe(Subscriber<? superT> subscriber)
Subscriber methodson the current thread. Note that calling this method will block the caller thread until the upstream terminates normally, with an error or theSubscriber cancels theSubscription it receives viaSubscriber.onSubscribe(Subscription). Therefore, calling this method from special threads such as the Android Main Thread or the Swing Event Dispatch Thread is not recommended.
Subscriber determines how backpressure is applied.blockingSubscribe does not operate by default on a particularScheduler.subscriber - the subscriber to forward events and calls to in the current thread@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final Flowable<List<T>> buffer(int count)
count items. When the source Publisher completes, the resulting Publisher emits the current buffer and propagates the notification from the source Publisher. Note that if the source Publisher issues an onError notification the event is passed on immediately without first emitting the buffer it is in the process of assembling.
Publisher to honor it as well, although not enforced; violationmay lead toMissingBackpressureException somewhere downstream.buffer does not operate by default on a particularScheduler.count - the maximum number of items in each buffer before it should be emittedcount items from the source Publisher@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final Flowable<List<T>> buffer(int count, int skip)
skip items, each containingcount items. When the source Publisher completes, the resulting Publisher emits the current buffer and propagates the notification from the source Publisher. Note that if the source Publisher issues an onError notification the event is passed on immediately without first emitting the buffer it is in the process of assembling.
Publisher to honor it as well, although not enforced; violationmay lead toMissingBackpressureException somewhere downstream.buffer does not operate by default on a particularScheduler.count - the maximum size of each buffer before it should be emittedskip - how many items emitted by the source Publisher should be skipped before starting a new buffer. Note that whenskip andcount are equal, this is the same operation asbuffer(int).skip item from the source Publisher and containing at mostcount items@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <U extendsCollection<? superT>> Flowable<U> buffer(int count, int skip,Callable<U> bufferSupplier)
skip items, each containingcount items. When the source Publisher completes, the resulting Publisher emits the current buffer and propagates the notification from the source Publisher. Note that if the source Publisher issues an onError notification the event is passed on immediately without first emitting the buffer it is in the process of assembling.
Publisher to honor it as well, although not enforced; violationmay lead toMissingBackpressureException somewhere downstream.buffer does not operate by default on a particularScheduler.U - the collection subclass type to buffer intocount - the maximum size of each buffer before it should be emittedskip - how many items emitted by the source Publisher should be skipped before starting a new buffer. Note that whenskip andcount are equal, this is the same operation asbuffer(int).bufferSupplier - a factory function that returns an instance of the collection subclass to be used and returned as the bufferskip item from the source Publisher and containing at mostcount items@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <U extendsCollection<? superT>> Flowable<U> buffer(int count,Callable<U> bufferSupplier)
count items. When the source Publisher completes, the resulting Publisher emits the current buffer and propagates the notification from the source Publisher. Note that if the source Publisher issues an onError notification the event is passed on immediately without first emitting the buffer it is in the process of assembling.
Publisher to honor it as well, although not enforced; violationmay lead toMissingBackpressureException somewhere downstream.buffer does not operate by default on a particularScheduler.U - the collection subclass type to buffer intocount - the maximum number of items in each buffer before it should be emittedbufferSupplier - a factory function that returns an instance of the collection subclass to be used and returned as the buffercount items from the source Publisher@CheckReturnValue@BackpressureSupport(value=ERROR)@SchedulerSupport(value="io.reactivex:computation")public final Flowable<List<T>> buffer(long timespan, long timeskip,TimeUnit unit)
timeskip argument. It emits each buffer after a fixed timespan, specified by thetimespan argument. When the source Publisher completes, the resulting Publisher emits the current buffer and propagates the notification from the source Publisher. Note that if the source Publisher issues an onError notification the event is passed on immediately without first emitting the buffer it is in the process of assembling.
Long.MAX_VALUE upstream and does not obey downstream requests.buffer operates by default on thecomputationScheduler.timespan - the period of time each buffer collects items before it is emittedtimeskip - the period of time after which a new buffer will be createdunit - the unit of time that applies to thetimespan andtimeskip arguments@CheckReturnValue@BackpressureSupport(value=ERROR)@SchedulerSupport(value="custom")public final Flowable<List<T>> buffer(long timespan, long timeskip,TimeUnit unit,Scheduler scheduler)
timeskip argument, and on the specifiedscheduler. It emits each buffer after a fixed timespan, specified by thetimespan argument. When the source Publisher completes, the resulting Publisher emits the current buffer and propagates the notification from the source Publisher. Note that if the source Publisher issues an onError notification the event is passed on immediately without first emitting the buffer it is in the process of assembling.
Long.MAX_VALUE upstream and does not obey downstream requests.Scheduler this operator will use.timespan - the period of time each buffer collects items before it is emittedtimeskip - the period of time after which a new buffer will be createdunit - the unit of time that applies to thetimespan andtimeskip argumentsscheduler - theScheduler to use when determining the end and start of a buffer@CheckReturnValue@NonNull@BackpressureSupport(value=ERROR)@SchedulerSupport(value="custom")public final <U extendsCollection<? superT>> Flowable<U> buffer(long timespan, long timeskip,TimeUnit unit,Scheduler scheduler,Callable<U> bufferSupplier)
timeskip argument, and on the specifiedscheduler. It emits each buffer after a fixed timespan, specified by thetimespan argument. When the source Publisher completes, the resulting Publisher emits the current buffer and propagates the notification from the source Publisher. Note that if the source Publisher issues an onError notification the event is passed on immediately without first emitting the buffer it is in the process of assembling.
Long.MAX_VALUE upstream and does not obey downstream requests.Scheduler this operator will use.U - the collection subclass type to buffer intotimespan - the period of time each buffer collects items before it is emittedtimeskip - the period of time after which a new buffer will be createdunit - the unit of time that applies to thetimespan andtimeskip argumentsscheduler - theScheduler to use when determining the end and start of a bufferbufferSupplier - a factory function that returns an instance of the collection subclass to be used and returned as the buffer@CheckReturnValue@BackpressureSupport(value=ERROR)@SchedulerSupport(value="io.reactivex:computation")public final Flowable<List<T>> buffer(long timespan,TimeUnit unit)
timespan argument. When the source Publisher completes, the resulting Publisher emits the current buffer and propagates the notification from the source Publisher. Note that if the source Publisher issues an onError notification the event is passed on immediately without first emitting the buffer it is in the process of assembling.
Long.MAX_VALUE upstream and does not obey downstream requests.buffer operates by default on thecomputationScheduler.timespan - the period of time each buffer collects items before it is emitted and replaced with a new bufferunit - the unit of time that applies to thetimespan argument@CheckReturnValue@BackpressureSupport(value=ERROR)@SchedulerSupport(value="io.reactivex:computation")public final Flowable<List<T>> buffer(long timespan,TimeUnit unit, int count)
timespan argument or a maximum size specified by thecount argument (whichever is reached first). When the source Publisher completes, the resulting Publisher emits the current buffer and propagates the notification from the source Publisher. Note that if the source Publisher issues an onError notification the event is passed on immediately without first emitting the buffer it is in the process of assembling.
Long.MAX_VALUE upstream and does not obey downstream requests.buffer operates by default on thecomputationScheduler.timespan - the period of time each buffer collects items before it is emitted and replaced with a new bufferunit - the unit of time which applies to thetimespan argumentcount - the maximum size of each buffer before it is emitted@CheckReturnValue@BackpressureSupport(value=ERROR)@SchedulerSupport(value="custom")public final Flowable<List<T>> buffer(long timespan,TimeUnit unit,Scheduler scheduler, int count)
timespan argument as measured on the specifiedscheduler, or a maximum size specified by thecount argument (whichever is reached first). When the source Publisher completes, the resulting Publisher emits the current buffer and propagates the notification from the source Publisher. Note that if the source Publisher issues an onError notification the event is passed on immediately without first emitting the buffer it is in the process of assembling.
Long.MAX_VALUE upstream and does not obey downstream requests.Scheduler this operator will use.timespan - the period of time each buffer collects items before it is emitted and replaced with a new bufferunit - the unit of time which applies to thetimespan argumentscheduler - theScheduler to use when determining the end and start of a buffercount - the maximum size of each buffer before it is emitted@CheckReturnValue@BackpressureSupport(value=ERROR)@SchedulerSupport(value="custom")public final <U extendsCollection<? superT>> Flowable<U> buffer(long timespan,TimeUnit unit,Scheduler scheduler, int count,Callable<U> bufferSupplier, boolean restartTimerOnMaxSize)
timespan argument as measured on the specifiedscheduler, or a maximum size specified by thecount argument (whichever is reached first). When the source Publisher completes, the resulting Publisher emits the current buffer and propagates the notification from the source Publisher. Note that if the source Publisher issues an onError notification the event is passed on immediately without first emitting the buffer it is in the process of assembling.
Long.MAX_VALUE upstream and does not obey downstream requests.Scheduler this operator will use.U - the collection subclass type to buffer intotimespan - the period of time each buffer collects items before it is emitted and replaced with a new bufferunit - the unit of time which applies to thetimespan argumentscheduler - theScheduler to use when determining the end and start of a buffercount - the maximum size of each buffer before it is emittedbufferSupplier - a factory function that returns an instance of the collection subclass to be used and returned as the bufferrestartTimerOnMaxSize - if true the time window is restarted when the max capacity of the current buffer is reached@CheckReturnValue@BackpressureSupport(value=ERROR)@SchedulerSupport(value="custom")public final Flowable<List<T>> buffer(long timespan,TimeUnit unit,Scheduler scheduler)
timespan argument and on the specifiedscheduler. When the source Publisher completes, the resulting Publisher emits the current buffer and propagates the notification from the source Publisher. Note that if the source Publisher issues an onError notification the event is passed on immediately without first emitting the buffer it is in the process of assembling.
Long.MAX_VALUE upstream and does not obey downstream requests.Scheduler this operator will use.timespan - the period of time each buffer collects items before it is emitted and replaced with a new bufferunit - the unit of time which applies to thetimespan argumentscheduler - theScheduler to use when determining the end and start of a buffer@CheckReturnValue@BackpressureSupport(value=ERROR)@SchedulerSupport(value="none")public final <TOpening,TClosing> Flowable<List<T>> buffer(Flowable<? extends TOpening> openingIndicator,Function<? super TOpening,? extendsPublisher<? extends TClosing>> closingIndicator)
openingIndicator Publisher emits an item, and closes when the Publisher returned fromclosingIndicator emits an item. If any of the source Publisher,openingIndicator orclosingIndicator issues an onError notification the event is passed on immediately without first emitting the buffer it is in the process of assembling.
Long.MAX_VALUE upstream and does not obey downstream requests.buffer does not operate by default on a particularScheduler.TOpening - the element type of the buffer-opening PublisherTClosing - the element type of the individual buffer-closing PublishersopeningIndicator - the Publisher that, when it emits an item, causes a new buffer to be createdclosingIndicator - theFunction that is used to produce a Publisher for every buffer created. When this Publisher emits an item, the associated buffer is emitted.@CheckReturnValue@BackpressureSupport(value=ERROR)@SchedulerSupport(value="none")public final <TOpening,TClosing,U extendsCollection<? superT>> Flowable<U> buffer(Flowable<? extends TOpening> openingIndicator,Function<? super TOpening,? extendsPublisher<? extends TClosing>> closingIndicator,Callable<U> bufferSupplier)
openingIndicator Publisher emits an item, and closes when the Publisher returned fromclosingIndicator emits an item. If any of the source Publisher,openingIndicator orclosingIndicator issues an onError notification the event is passed on immediately without first emitting the buffer it is in the process of assembling.
Long.MAX_VALUE upstream and does not obey downstream requests.buffer does not operate by default on a particularScheduler.U - the collection subclass type to buffer intoTOpening - the element type of the buffer-opening PublisherTClosing - the element type of the individual buffer-closing PublishersopeningIndicator - the Publisher that, when it emits an item, causes a new buffer to be createdclosingIndicator - theFunction that is used to produce a Publisher for every buffer created. When this Publisher emits an item, the associated buffer is emitted.bufferSupplier - a factory function that returns an instance of the collection subclass to be used and returned as the buffer@CheckReturnValue@BackpressureSupport(value=ERROR)@SchedulerSupport(value="none")public final <B> Flowable<List<T>> buffer(Publisher<B> boundaryIndicator)

Completion of either the source or the boundary Publisher causes the returned Publisher to emit the latest buffer and complete. If either the source Publisher or the boundary Publisher issues an onError notification the event is passed on immediately without first emitting the buffer it is in the process of assembling.
Publisherboundary and buffers data. It requestsLong.MAX_VALUE upstream and does not obey downstream requests.buffer does not operate by default on a particularScheduler.B - the boundary value type (ignored)boundaryIndicator - the boundary Publisherbuffer(Publisher, int),ReactiveX operators documentation: Buffer@CheckReturnValue@BackpressureSupport(value=ERROR)@SchedulerSupport(value="none")public final <B> Flowable<List<T>> buffer(Publisher<B> boundaryIndicator, int initialCapacity)

Completion of either the source or the boundary Publisher causes the returned Publisher to emit the latest buffer and complete. If either the source Publisher or the boundary Publisher issues an onError notification the event is passed on immediately without first emitting the buffer it is in the process of assembling.
Publisherboundary and buffers data. It requestsLong.MAX_VALUE upstream and does not obey downstream requests.buffer does not operate by default on a particularScheduler.B - the boundary value type (ignored)boundaryIndicator - the boundary PublisherinitialCapacity - the initial capacity of each buffer chunkbuffer(Publisher)@CheckReturnValue@BackpressureSupport(value=ERROR)@SchedulerSupport(value="none")public final <B,U extendsCollection<? superT>> Flowable<U> buffer(Publisher<B> boundaryIndicator,Callable<U> bufferSupplier)

Completion of either the source or the boundary Publisher causes the returned Publisher to emit the latest buffer and complete. If either the source Publisher or the boundary Publisher issues an onError notification the event is passed on immediately without first emitting the buffer it is in the process of assembling.
Publisherboundary and buffers data. It requestsLong.MAX_VALUE upstream and does not obey downstream requests.buffer does not operate by default on a particularScheduler.U - the collection subclass type to buffer intoB - the boundary value type (ignored)boundaryIndicator - the boundary PublisherbufferSupplier - a factory function that returns an instance of the collection subclass to be used and returned as the bufferbuffer(Publisher, int),ReactiveX operators documentation: Buffer@CheckReturnValue@BackpressureSupport(value=ERROR)@SchedulerSupport(value="none")public final <B> Flowable<List<T>> buffer(Callable<? extendsPublisher<B>> boundaryIndicatorSupplier)
boundaryIndicatorSupplier emits an item.
If either the sourcePublisher or the boundaryPublisher issues anonError notification the event is passed on immediately without first emitting the buffer it is in the process of assembling.
Long.MAX_VALUE upstream and does not obey downstream requests.buffer does not operate by default on a particularScheduler.B - the value type of the boundary-providing PublisherboundaryIndicatorSupplier - aCallable that produces a Publisher that governs the boundary between buffers. Whenever the suppliedPublisher emits an item,buffer emits the current buffer and begins to fill a new oneclosingIndicator argument emits an item@CheckReturnValue@BackpressureSupport(value=ERROR)@SchedulerSupport(value="none")public final <B,U extendsCollection<? superT>> Flowable<U> buffer(Callable<? extendsPublisher<B>> boundaryIndicatorSupplier,Callable<U> bufferSupplier)
boundaryIndicatorSupplier emits an item.
If either the sourcePublisher or the boundaryPublisher issues anonError notification the event is passed on immediately without first emitting the buffer it is in the process of assembling.
Long.MAX_VALUE upstream and does not obey downstream requests.buffer does not operate by default on a particularScheduler.U - the collection subclass type to buffer intoB - the value type of the boundary-providing PublisherboundaryIndicatorSupplier - aCallable that produces a Publisher that governs the boundary between buffers. Whenever the suppliedPublisher emits an item,buffer emits the current buffer and begins to fill a new onebufferSupplier - a factory function that returns an instance of the collection subclass to be used and returned as the bufferclosingIndicator argument emits an item@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final Flowable<T> cache()

This is useful when you want a Publisher to cache responses and you can't control the subscribe/cancel behavior of all theSubscribers.
The operator subscribes only when the first downstream subscriber subscribes and maintains a single subscription towards this Publisher. In contrast, the operator family ofreplay() that return aConnectableFlowable require an explicit call toConnectableFlowable.connect().
Note: You sacrifice the ability to cancel the origin when you use thecache Subscriber so be careful not to use this Subscriber on Publishers that emit an infinite or very large number of items that will use up memory. A possible workaround is to apply `takeUntil` with a predicate or another source before (and perhaps after) the application of cache().
AtomicBoolean shouldStop = new AtomicBoolean(); source.takeUntil(v -> shouldStop.get()) .cache() .takeUntil(v -> shouldStop.get()) .subscribe(...); Since the operator doesn't allow clearing the cached values either, the possible workaround is to forget all references to it viaonTerminateDetach() applied along with the previous workaround: AtomicBoolean shouldStop = new AtomicBoolean(); source.takeUntil(v -> shouldStop.get()) .onTerminateDetach() .cache() .takeUntil(v -> shouldStop.get()) .onTerminateDetach() .subscribe(...);cache does not operate by default on a particularScheduler.@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final Flowable<T> cacheWithInitialCapacity(int initialCapacity)

This is useful when you want a Publisher to cache responses and you can't control the subscribe/cancel behavior of all theSubscribers.
The operator subscribes only when the first downstream subscriber subscribes and maintains a single subscription towards this Publisher. In contrast, the operator family ofreplay() that return aConnectableFlowable require an explicit call toConnectableFlowable.connect().
Note: You sacrifice the ability to cancel the origin when you use thecache Subscriber so be careful not to use this Subscriber on Publishers that emit an infinite or very large number of items that will use up memory. A possible workaround is to apply `takeUntil` with a predicate or another source before (and perhaps after) the application of cache().
AtomicBoolean shouldStop = new AtomicBoolean(); source.takeUntil(v -> shouldStop.get()) .cache() .takeUntil(v -> shouldStop.get()) .subscribe(...); Since the operator doesn't allow clearing the cached values either, the possible workaround is to forget all references to it viaonTerminateDetach() applied along with the previous workaround: AtomicBoolean shouldStop = new AtomicBoolean(); source.takeUntil(v -> shouldStop.get()) .onTerminateDetach() .cache() .takeUntil(v -> shouldStop.get()) .onTerminateDetach() .subscribe(...);cacheWithInitialCapacity does not operate by default on a particularScheduler.Note: The capacity hint is not an upper bound on cache size. For that, considerreplay(int) in combination withConnectableFlowable.autoConnect() or similar.
initialCapacity - hint for number of items to cache (for optimizing underlying data structure)@CheckReturnValue@NonNull@BackpressureSupport(value=PASS_THROUGH)@SchedulerSupport(value="none")public final <U> Flowable<U> cast(Class<U> clazz)

Publisher's backpressure behavior.cast does not operate by default on a particularScheduler.U - the output value type cast toclazz - the target class type thatcast will cast the items emitted by the source Publisher into before emitting them from the resulting Publisher@CheckReturnValue@NonNull@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final <U> Single<U> collect(Callable<? extends U> initialItemSupplier,BiConsumer<? super U,? superT> collector)

This is a simplified version ofreduce that does not need to return the state on each pass.
Note that this operator requires the upstream to signalonComplete for the accumulator object to be emitted. Sources that are infinite and never complete will never emit anything through this operator and an infinite source may lead to a fatalOutOfMemoryError.
onNext.collect does not operate by default on a particularScheduler.U - the accumulator and output typeinitialItemSupplier - the mutable data structure that will collect the itemscollector - a function that accepts thestate and an emitted item, and modifiesstate accordingly@CheckReturnValue@NonNull@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final <U> Single<U> collectInto(U initialItem,BiConsumer<? super U,? superT> collector)

This is a simplified version ofreduce that does not need to return the state on each pass.
Note that this operator requires the upstream to signalonComplete for the accumulator object to be emitted. Sources that are infinite and never complete will never emit anything through this operator and an infinite source may lead to a fatalOutOfMemoryError.
onNext.collectInto does not operate by default on a particularScheduler.U - the accumulator and output typeinitialItem - the mutable data structure that will collect the itemscollector - a function that accepts thestate and an emitted item, and modifiesstate accordingly@CheckReturnValue@BackpressureSupport(value=PASS_THROUGH)@SchedulerSupport(value="none")public final <R> Flowable<R> compose(FlowableTransformer<? superT,? extends R> composer)
This method operates on the Publisher itself whereaslift(io.reactivex.FlowableOperator<? extends R, ? super T>) operates on the Publisher's Subscribers or Subscribers.
If the operator you are creating is designed to act on the individual items emitted by a source Publisher, uselift(io.reactivex.FlowableOperator<? extends R, ? super T>). If your operator is designed to transform the source Publisher as a whole (for instance, by applying a particular set of existing RxJava operators to it) usecompose.
Publisher the transformer returns.compose does not operate by default on a particularScheduler.R - the value type of the output Publishercomposer - implements the function that transforms the source Publisher@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <R> Flowable<R> concatMap(Function<? superT,? extendsPublisher<? extends R>> mapper)

Publishers are expected to honor backpressure as well. If the sourcePublisher violates the rule, the operator will signal aMissingBackpressureException. If any of the innerPublishers doesn't honor backpressure, thatmay throw anIllegalStateException when thatPublisher completes.concatMap does not operate by default on a particularScheduler.R - the type of the inner Publisher sources and thus the output typemapper - a function that, when applied to an item emitted by the source Publisher, returns a Publisher@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <R> Flowable<R> concatMap(Function<? superT,? extendsPublisher<? extends R>> mapper, int prefetch)

Publishers are expected to honor backpressure as well. If the sourcePublisher violates the rule, the operator will signal aMissingBackpressureException. If any of the innerPublishers doesn't honor backpressure, thatmay throw anIllegalStateException when thatPublisher completes.concatMap does not operate by default on a particularScheduler.R - the type of the inner Publisher sources and thus the output typemapper - a function that, when applied to an item emitted by the source Publisher, returns a Publisherprefetch - the number of elements to prefetch from the current Flowable@CheckReturnValue@SchedulerSupport(value="none")@BackpressureSupport(value=FULL)public final Completable concatMapCompletable(Function<? superT,? extendsCompletableSource> mapper)
CompletableSources and subscribes to them one after the other completes.
Flowable violates the rule, the operator will signal aMissingBackpressureException.concatMapCompletable does not operate by default on a particularScheduler.History: 2.1.11 - experimental
mapper - the function called with the upstream item and should return aCompletableSource to become the next source to be subscribed toconcatMapCompletableDelayError(Function)@CheckReturnValue@NonNull@SchedulerSupport(value="none")@BackpressureSupport(value=FULL)public final Completable concatMapCompletable(Function<? superT,? extendsCompletableSource> mapper, int prefetch)
CompletableSources and subscribes to them one after the other completes.
Flowable violates the rule, the operator will signal aMissingBackpressureException.concatMapCompletable does not operate by default on a particularScheduler.History: 2.1.11 - experimental
mapper - the function called with the upstream item and should return aCompletableSource to become the next source to be subscribed toprefetch - The number of upstream items to prefetch so that fresh items are ready to be mapped when a previousCompletableSource terminates. The operator replenishes after half of the prefetch amount has been consumed and turned intoCompletableSources.concatMapCompletableDelayError(Function, boolean, int)@CheckReturnValue@SchedulerSupport(value="none")@BackpressureSupport(value=FULL)public final Completable concatMapCompletableDelayError(Function<? superT,? extendsCompletableSource> mapper)
CompletableSources and subscribes to them one after the other terminates, delaying all errors till both thisFlowable and all innerCompletableSources terminate.
Flowable violates the rule, the operator will signal aMissingBackpressureException.concatMapCompletableDelayError does not operate by default on a particularScheduler.History: 2.1.11 - experimental
mapper - the function called with the upstream item and should return aCompletableSource to become the next source to be subscribed toconcatMapCompletable(Function, int)@CheckReturnValue@SchedulerSupport(value="none")@BackpressureSupport(value=FULL)public final Completable concatMapCompletableDelayError(Function<? superT,? extendsCompletableSource> mapper, boolean tillTheEnd)
CompletableSources and subscribes to them one after the other terminates, optionally delaying all errors till both thisFlowable and all innerCompletableSources terminate.
Flowable violates the rule, the operator will signal aMissingBackpressureException.concatMapCompletableDelayError does not operate by default on a particularScheduler.History: 2.1.11 - experimental
mapper - the function called with the upstream item and should return aCompletableSource to become the next source to be subscribed totillTheEnd - Iftrue, errors from thisFlowable or any of the innerCompletableSources are delayed until all of them terminate. Iffalse, an error from thisFlowable is delayed until the current innerCompletableSource terminates and only then is it emitted to the downstream.concatMapCompletable(Function)@CheckReturnValue@NonNull@SchedulerSupport(value="none")@BackpressureSupport(value=FULL)public final Completable concatMapCompletableDelayError(Function<? superT,? extendsCompletableSource> mapper, boolean tillTheEnd, int prefetch)
CompletableSources and subscribes to them one after the other terminates, optionally delaying all errors till both thisFlowable and all innerCompletableSources terminate.
Flowable violates the rule, the operator will signal aMissingBackpressureException.concatMapCompletableDelayError does not operate by default on a particularScheduler.History: 2.1.11 - experimental
mapper - the function called with the upstream item and should return aCompletableSource to become the next source to be subscribed totillTheEnd - Iftrue, errors from thisFlowable or any of the innerCompletableSources are delayed until all of them terminate. Iffalse, an error from thisFlowable is delayed until the current innerCompletableSource terminates and only then is it emitted to the downstream.prefetch - The number of upstream items to prefetch so that fresh items are ready to be mapped when a previousCompletableSource terminates. The operator replenishes after half of the prefetch amount has been consumed and turned intoCompletableSources.concatMapCompletable(Function, int)@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <R> Flowable<R> concatMapDelayError(Function<? superT,? extendsPublisher<? extends R>> mapper)
Publishers are expected to honor backpressure as well. If the sourcePublisher violates the rule, the operator will signal aMissingBackpressureException. If any of the innerPublishers doesn't honor backpressure, thatmay throw anIllegalStateException when thatPublisher completes.concatMapDelayError does not operate by default on a particularScheduler.R - the result value typemapper - the function that maps the items of this Publisher into the inner Publishers.@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <R> Flowable<R> concatMapDelayError(Function<? superT,? extendsPublisher<? extends R>> mapper, int prefetch, boolean tillTheEnd)
Publishers are expected to honor backpressure as well. If the sourcePublisher violates the rule, the operator will signal aMissingBackpressureException. If any of the innerPublishers doesn't honor backpressure, thatmay throw anIllegalStateException when thatPublisher completes.concatMapDelayError does not operate by default on a particularScheduler.R - the result value typemapper - the function that maps the items of this Publisher into the inner Publishers.prefetch - the number of elements to prefetch from the current FlowabletillTheEnd - if true, all errors from the outer and inner Publisher sources are delayed until the end, if false, an error from the main source is signaled when the current Publisher source terminates@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <R> Flowable<R> concatMapEager(Function<? superT,? extendsPublisher<? extends R>> mapper)
Eager concatenation means that once a subscriber subscribes, this operator subscribes to all of the source Publishers. The operator buffers the values emitted by these Publishers and then drains them in order, each one after the previous one completes.
Scheduler.R - the value typemapper - the function that maps a sequence of values into a sequence of Publishers that will be eagerly concatenated@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <R> Flowable<R> concatMapEager(Function<? superT,? extendsPublisher<? extends R>> mapper, int maxConcurrency, int prefetch)
Eager concatenation means that once a subscriber subscribes, this operator subscribes to all of the source Publishers. The operator buffers the values emitted by these Publishers and then drains them in order, each one after the previous one completes.
Scheduler.R - the value typemapper - the function that maps a sequence of values into a sequence of Publishers that will be eagerly concatenatedmaxConcurrency - the maximum number of concurrent subscribed Publishersprefetch - hints about the number of expected values from each inner Publisher, must be positive@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <R> Flowable<R> concatMapEagerDelayError(Function<? superT,? extendsPublisher<? extends R>> mapper, boolean tillTheEnd)
Eager concatenation means that once a subscriber subscribes, this operator subscribes to all of the source Publishers. The operator buffers the values emitted by these Publishers and then drains them in order, each one after the previous one completes.
Scheduler.R - the value typemapper - the function that maps a sequence of values into a sequence of Publishers that will be eagerly concatenatedtillTheEnd - if true, all errors from the outer and inner Publisher sources are delayed until the end, if false, an error from the main source is signaled when the current Publisher source terminates@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <R> Flowable<R> concatMapEagerDelayError(Function<? superT,? extendsPublisher<? extends R>> mapper, int maxConcurrency, int prefetch, boolean tillTheEnd)
Eager concatenation means that once a subscriber subscribes, this operator subscribes to all of the source Publishers. The operator buffers the values emitted by these Publishers and then drains them in order, each one after the previous one completes.
Scheduler.R - the value typemapper - the function that maps a sequence of values into a sequence of Publishers that will be eagerly concatenatedmaxConcurrency - the maximum number of concurrent subscribed Publishersprefetch - the number of elements to prefetch from each source PublishertillTheEnd - if true, exceptions from the current Flowable and all the inner Publishers are delayed until all of them terminate, if false, exception from the current Flowable is delayed until the currently running Publisher terminates@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <U> Flowable<U> concatMapIterable(Function<? superT,? extendsIterable<? extends U>> mapper)
Publishers is expected to honor backpressure as well. If the sourcePublisher violates the rule, the operator will signal aMissingBackpressureException.concatMapIterable does not operate by default on a particularScheduler.U - the type of item emitted by the resulting Publishermapper - a function that returns an Iterable sequence of values for when given an item emitted by the source PublishercollectionSelector@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <U> Flowable<U> concatMapIterable(Function<? superT,? extendsIterable<? extends U>> mapper, int prefetch)
Publishers is expected to honor backpressure as well. If the sourcePublisher violates the rule, the operator will signal aMissingBackpressureException.concatMapIterable does not operate by default on a particularScheduler.U - the type of item emitted by the resulting Publishermapper - a function that returns an Iterable sequence of values for when given an item emitted by the source Publisherprefetch - the number of elements to prefetch from the current FlowablecollectionSelector@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <R> Flowable<R> concatMapMaybe(Function<? superT,? extendsMaybeSource<? extends R>> mapper)
MaybeSources and subscribes to them one after the other succeeds or completes, emits their success value if available or terminates immediately if either thisFlowable or the current innerMaybeSource fail.
Flowable violates the rule, the operator will signal aMissingBackpressureException.concatMapMaybe does not operate by default on a particularScheduler.History: 2.1.11 - experimental
R - the result type of the innerMaybeSourcesmapper - the function called with the upstream item and should return aMaybeSource to become the next source to be subscribed toconcatMapMaybeDelayError(Function),concatMapMaybe(Function, int)@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <R> Flowable<R> concatMapMaybe(Function<? superT,? extendsMaybeSource<? extends R>> mapper, int prefetch)
MaybeSources and subscribes to them one after the other succeeds or completes, emits their success value if available or terminates immediately if either thisFlowable or the current innerMaybeSource fail.
Flowable violates the rule, the operator will signal aMissingBackpressureException.concatMapMaybe does not operate by default on a particularScheduler.History: 2.1.11 - experimental
R - the result type of the innerMaybeSourcesmapper - the function called with the upstream item and should return aMaybeSource to become the next source to be subscribed toprefetch - The number of upstream items to prefetch so that fresh items are ready to be mapped when a previousMaybeSource terminates. The operator replenishes after half of the prefetch amount has been consumed and turned intoMaybeSources.concatMapMaybe(Function),concatMapMaybeDelayError(Function, boolean, int)@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <R> Flowable<R> concatMapMaybeDelayError(Function<? superT,? extendsMaybeSource<? extends R>> mapper)
MaybeSources and subscribes to them one after the other terminates, emits their success value if available and delaying all errors till both thisFlowable and all innerMaybeSources terminate.
Flowable violates the rule, the operator will signal aMissingBackpressureException.concatMapMaybeDelayError does not operate by default on a particularScheduler.History: 2.1.11 - experimental
R - the result type of the innerMaybeSourcesmapper - the function called with the upstream item and should return aMaybeSource to become the next source to be subscribed toconcatMapMaybe(Function),concatMapMaybeDelayError(Function, boolean)@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <R> Flowable<R> concatMapMaybeDelayError(Function<? superT,? extendsMaybeSource<? extends R>> mapper, boolean tillTheEnd)
MaybeSources and subscribes to them one after the other terminates, emits their success value if available and optionally delaying all errors till both thisFlowable and all innerMaybeSources terminate.
Flowable violates the rule, the operator will signal aMissingBackpressureException.concatMapMaybeDelayError does not operate by default on a particularScheduler.History: 2.1.11 - experimental
R - the result type of the innerMaybeSourcesmapper - the function called with the upstream item and should return aMaybeSource to become the next source to be subscribed totillTheEnd - Iftrue, errors from thisFlowable or any of the innerMaybeSources are delayed until all of them terminate. Iffalse, an error from thisFlowable is delayed until the current innerMaybeSource terminates and only then is it emitted to the downstream.concatMapMaybe(Function, int),concatMapMaybeDelayError(Function, boolean, int)@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <R> Flowable<R> concatMapMaybeDelayError(Function<? superT,? extendsMaybeSource<? extends R>> mapper, boolean tillTheEnd, int prefetch)
MaybeSources and subscribes to them one after the other terminates, emits their success value if available and optionally delaying all errors till both thisFlowable and all innerMaybeSources terminate.
Flowable violates the rule, the operator will signal aMissingBackpressureException.concatMapMaybeDelayError does not operate by default on a particularScheduler.History: 2.1.11 - experimental
R - the result type of the innerMaybeSourcesmapper - the function called with the upstream item and should return aMaybeSource to become the next source to be subscribed totillTheEnd - Iftrue, errors from thisFlowable or any of the innerMaybeSources are delayed until all of them terminate. Iffalse, an error from thisFlowable is delayed until the current innerMaybeSource terminates and only then is it emitted to the downstream.prefetch - The number of upstream items to prefetch so that fresh items are ready to be mapped when a previousMaybeSource terminates. The operator replenishes after half of the prefetch amount has been consumed and turned intoMaybeSources.concatMapMaybe(Function, int)@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <R> Flowable<R> concatMapSingle(Function<? superT,? extendsSingleSource<? extends R>> mapper)
SingleSources and subscribes to them one after the other succeeds, emits their success values or terminates immediately if either thisFlowable or the current innerSingleSource fail.
Flowable violates the rule, the operator will signal aMissingBackpressureException.concatMapSingle does not operate by default on a particularScheduler.History: 2.1.11 - experimental
R - the result type of the innerSingleSourcesmapper - the function called with the upstream item and should return aSingleSource to become the next source to be subscribed toconcatMapSingleDelayError(Function),concatMapSingle(Function, int)@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <R> Flowable<R> concatMapSingle(Function<? superT,? extendsSingleSource<? extends R>> mapper, int prefetch)
SingleSources and subscribes to them one after the other succeeds, emits their success values or terminates immediately if either thisFlowable or the current innerSingleSource fail.
Flowable violates the rule, the operator will signal aMissingBackpressureException.concatMapSingle does not operate by default on a particularScheduler.History: 2.1.11 - experimental
R - the result type of the innerSingleSourcesmapper - the function called with the upstream item and should return aSingleSource to become the next source to be subscribed toprefetch - The number of upstream items to prefetch so that fresh items are ready to be mapped when a previousSingleSource terminates. The operator replenishes after half of the prefetch amount has been consumed and turned intoSingleSources.concatMapSingle(Function),concatMapSingleDelayError(Function, boolean, int)@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <R> Flowable<R> concatMapSingleDelayError(Function<? superT,? extendsSingleSource<? extends R>> mapper)
SingleSources and subscribes to them one after the other succeeds or fails, emits their success values and delays all errors till both thisFlowable and all innerSingleSources terminate.
Flowable violates the rule, the operator will signal aMissingBackpressureException.concatMapSingleDelayError does not operate by default on a particularScheduler.History: 2.1.11 - experimental
R - the result type of the innerSingleSourcesmapper - the function called with the upstream item and should return aSingleSource to become the next source to be subscribed toconcatMapSingle(Function),concatMapSingleDelayError(Function, boolean)@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <R> Flowable<R> concatMapSingleDelayError(Function<? superT,? extendsSingleSource<? extends R>> mapper, boolean tillTheEnd)
SingleSources and subscribes to them one after the other succeeds or fails, emits their success values and optionally delays all errors till both thisFlowable and all innerSingleSources terminate.
Flowable violates the rule, the operator will signal aMissingBackpressureException.concatMapSingleDelayError does not operate by default on a particularScheduler.History: 2.1.11 - experimental
R - the result type of the innerSingleSourcesmapper - the function called with the upstream item and should return aSingleSource to become the next source to be subscribed totillTheEnd - Iftrue, errors from thisFlowable or any of the innerSingleSources are delayed until all of them terminate. Iffalse, an error from thisFlowable is delayed until the current innerSingleSource terminates and only then is it emitted to the downstream.concatMapSingle(Function, int),concatMapSingleDelayError(Function, boolean, int)@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <R> Flowable<R> concatMapSingleDelayError(Function<? superT,? extendsSingleSource<? extends R>> mapper, boolean tillTheEnd, int prefetch)
SingleSources and subscribes to them one after the other succeeds or fails, emits their success values and optionally delays errors till both thisFlowable and all innerSingleSources terminate.
Flowable violates the rule, the operator will signal aMissingBackpressureException.concatMapSingleDelayError does not operate by default on a particularScheduler.History: 2.1.11 - experimental
R - the result type of the innerSingleSourcesmapper - the function called with the upstream item and should return aSingleSource to become the next source to be subscribed totillTheEnd - Iftrue, errors from thisFlowable or any of the innerSingleSources are delayed until all of them terminate. Iffalse, an error from thisFlowable is delayed until the current innerSingleSource terminates and only then is it emitted to the downstream.prefetch - The number of upstream items to prefetch so that fresh items are ready to be mapped when a previousSingleSource terminates. The operator replenishes after half of the prefetch amount has been consumed and turned intoSingleSources.concatMapSingle(Function, int)@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final Flowable<T> concatWith(Publisher<? extendsT> other)

otherPublishers are expected to honor backpressure as well. If any of then violates this rule, itmay throw anIllegalStateException when the sourcePublisher completes.concatWith does not operate by default on a particularScheduler.other - a Publisher to be concatenated after the current@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final Flowable<T> concatWith(@NonNullSingleSource<? extendsT> other)
Flowable that emits the items from thisFlowable followed by the success item or error event of the otherSingleSource.
SingleSource is only emitted when there is a demand for it.concatWith does not operate by default on a particularScheduler.History: 2.1.10 - experimental
other - the SingleSource whose signal should be emitted after thisFlowable completes normally.@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final Flowable<T> concatWith(@NonNullMaybeSource<? extendsT> other)
Flowable that emits the items from thisFlowable followed by the success item or terminal events of the otherMaybeSource.
MaybeSource is only emitted when there is a demand for it.concatWith does not operate by default on a particularScheduler.History: 2.1.10 - experimental
other - the MaybeSource whose signal should be emitted after this Flowable completes normally.@CheckReturnValue@BackpressureSupport(value=PASS_THROUGH)@SchedulerSupport(value="none")public final Flowable<T> concatWith(@NonNullCompletableSource other)
Flowable that emits items from thisFlowable and when it completes normally, the otherCompletableSource is subscribed to and the returnedFlowable emits its terminal events.
Completable, backpressure is no longer present becauseCompletable doesn't have items to apply backpressure to.concatWith does not operate by default on a particularScheduler.History: 2.1.10 - experimental
other - theCompletableSource to subscribe to once the currentFlowable completes normally@CheckReturnValue@NonNull@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final Single<Boolean> contains(Object item)

Publisher in an unbounded manner (i.e., without applying backpressure).contains does not operate by default on a particularScheduler.item - the item to search for in the emissions from the source Publishertrue if the specified item is emitted by the source Publisher, orfalse if the source Publisher completes without emitting that item@CheckReturnValue@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final Single<Long> count()

Publisher in an unbounded manner (i.e., without applying backpressure).count does not operate by default on a particularScheduler.@CheckReturnValue@NonNull@BackpressureSupport(value=ERROR)@SchedulerSupport(value="none")public final <U> Flowable<T> debounce(Function<? superT,? extendsPublisher<U>> debounceIndicator)

The delivery of the item happens on the thread of the firstonNext oronComplete signal of the generatedPublisher sequence, which if takes too long, a newer item may arrive from the upstream, causing the generated sequence to get cancelled, which may also interrupt any downstream blocking operation (yielding anInterruptedException). It is recommended processing items that may take long time to be moved to another thread viaobserveOn(io.reactivex.Scheduler) applied afterdebounce itself.
debounceSelector to mark boundaries.debounce does not operate by default on a particularScheduler.U - the debounce value type (ignored)debounceIndicator - function to retrieve a sequence that indicates the throttle duration for each item@CheckReturnValue@BackpressureSupport(value=ERROR)@SchedulerSupport(value="io.reactivex:computation")public final Flowable<T> debounce(long timeout,TimeUnit unit)
Note: If items keep being emitted by the source Publisher faster than the timeout then no items will be emitted by the resulting Publisher.

Delivery of the item after the grace period happens on thecomputationScheduler'sWorker which if takes too long, a newer item may arrive from the upstream, causing theWorker's task to get disposed, which may also interrupt any downstream blocking operation (yielding anInterruptedException). It is recommended processing items that may take long time to be moved to another thread viaobserveOn(io.reactivex.Scheduler) applied afterdebounce itself.
debounce operates by default on thecomputationScheduler.timeout - the length of the window of time that must pass after the emission of an item from the source Publisher in which that Publisher emits no items in order for the item to be emitted by the resulting Publisherunit - the unit of time for the specifiedtimeoutthrottleWithTimeout(long, TimeUnit)@CheckReturnValue@NonNull@BackpressureSupport(value=ERROR)@SchedulerSupport(value="custom")public final Flowable<T> debounce(long timeout,TimeUnit unit,Scheduler scheduler)
Note: If items keep being emitted by the source Publisher faster than the timeout then no items will be emitted by the resulting Publisher.

Delivery of the item after the grace period happens on the givenScheduler'sWorker which if takes too long, a newer item may arrive from the upstream, causing theWorker's task to get disposed, which may also interrupt any downstream blocking operation (yielding anInterruptedException). It is recommended processing items that may take long time to be moved to another thread viaobserveOn(io.reactivex.Scheduler) applied afterdebounce itself.
Scheduler this operator will use.timeout - the time each item has to be "the most recent" of those emitted by the source Publisher to ensure that it's not droppedunit - the unit of time for the specifiedtimeoutscheduler - theScheduler to use internally to manage the timers that handle the timeout for each itemthrottleWithTimeout(long, TimeUnit, Scheduler)@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final Flowable<T> defaultIfEmpty(T defaultItem)

Publisher is empty, this operator is guaranteed to honor backpressure from downstream. If the sourcePublisher is non-empty, it is expected to honor backpressure as well; if the rule is violated, aMissingBackpressureExceptionmay get signaled somewhere downstream.defaultIfEmpty does not operate by default on a particularScheduler.defaultItem - the item to emit if the source Publisher emits no items@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <U> Flowable<T> delay(Function<? superT,? extendsPublisher<U>> itemDelayIndicator)

Note: the resulting Publisher will immediately propagate anyonError notification from the source Publisher.
Publisher. All of the otherPublishers supplied by the function are consumed in an unbounded manner (i.e., no backpressure applied to them).delay does not operate by default on a particularScheduler.U - the item delay value type (ignored)itemDelayIndicator - a function that returns a Publisher for each item emitted by the source Publisher, which is then used to delay the emission of that item by the resulting Publisher until the Publisher returned fromitemDelay emits an item@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="io.reactivex:computation")public final Flowable<T> delay(long delay,TimeUnit unit)

Publisher.delay operates by default on thecomputationScheduler.delay - the delay to shift the source byunit - theTimeUnit in whichperiod is defined@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="io.reactivex:computation")public final Flowable<T> delay(long delay,TimeUnit unit, boolean delayError)
delayError is true, error notifications will also be delayed.
Publisher.delay operates by default on thecomputationScheduler.delay - the delay to shift the source byunit - theTimeUnit in whichperiod is defineddelayError - if true, the upstream exception is signaled with the given delay, after all preceding normal elements, if false, the upstream exception is signaled immediately@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="custom")public final Flowable<T> delay(long delay,TimeUnit unit,Scheduler scheduler)

Publisher.Scheduler this operator will use.delay - the delay to shift the source byunit - the time unit ofdelayscheduler - theScheduler to use for delaying@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="custom")public final Flowable<T> delay(long delay,TimeUnit unit,Scheduler scheduler, boolean delayError)
delayError is true, error notifications will also be delayed.
Publisher.Scheduler this operator will use.delay - the delay to shift the source byunit - the time unit ofdelayscheduler - theScheduler to use for delayingdelayError - if true, the upstream exception is signaled with the given delay, after all preceding normal elements, if false, the upstream exception is signaled immediately@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <U,V> Flowable<T> delay(Publisher<U> subscriptionIndicator,Function<? superT,? extendsPublisher<V>> itemDelayIndicator)

Note: the resulting Publisher will immediately propagate anyonError notification from the source Publisher.
Publisher. All of the otherPublishers supplied by the functions are consumed in an unbounded manner (i.e., no backpressure applied to them).delay does not operate by default on a particularScheduler.U - the subscription delay value type (ignored)V - the item delay value type (ignored)subscriptionIndicator - a function that returns a Publisher that triggers the subscription to the source Publisher once it emits any itemitemDelayIndicator - a function that returns a Publisher for each item emitted by the source Publisher, which is then used to delay the emission of that item by the resulting Publisher until the Publisher returned fromitemDelay emits an item@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <U> Flowable<T> delaySubscription(Publisher<U> subscriptionIndicator)
Scheduler.U - the value type of the other Publisher, irrelevantsubscriptionIndicator - the other Publisher that should trigger the subscription to this Publisher.@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="io.reactivex:computation")public final Flowable<T> delaySubscription(long delay,TimeUnit unit)

Publisher.delaySubscription operates by default on thecomputationScheduler.delay - the time to delay the subscriptionunit - the time unit ofdelay@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="custom")public final Flowable<T> delaySubscription(long delay,TimeUnit unit,Scheduler scheduler)

Publisher.Scheduler this operator will use.delay - the time to delay the subscriptionunit - the time unit ofdelayscheduler - the Scheduler on which the waiting and subscription will happen@CheckReturnValue@SchedulerSupport(value="none")@BackpressureSupport(value=PASS_THROUGH)@Deprecatedpublic final <T2> Flowable<T2> dematerialize()
dematerialize(Function) instead.materialize by transforming theNotification objects emitted by the source Publisher into the items or notifications they represent.
When the upstream signals anonError oronComplete item, the returned Flowable cancels the flow and terminates with that type of terminal event:
Flowable.just(createOnNext(1), createOnComplete(), createOnNext(2)) .doOnCancel(() -> System.out.println("Cancelled!")); .dematerialize() .test() .assertResult(1); If the upstream signalsonError oronComplete directly, the flow is terminated with the same event. Flowable.just(createOnNext(1), createOnNext(2)) .dematerialize() .test() .assertResult(1, 2); If this behavior is not desired, the completion can be suppressed by applyingconcatWith(Publisher) with anever() source.Publisher's backpressure behavior.dematerialize does not operate by default on a particularScheduler.T2 - the output value typeNotification objects emitted by the source Publisherdematerialize(Function)@CheckReturnValue@NonNull@SchedulerSupport(value="none")@BackpressureSupport(value=PASS_THROUGH)public final <R> Flowable<R> dematerialize(Function<? superT,Notification<R>> selector)
materialize by transforming theNotification objects extracted from the source items via a selector function into their respectiveSubscriber signal types.
The intended use of theselector function is to perform a type-safe identity mapping (see example) on a source that is already of typeNotification<T>. The Java language doesn't allow limiting instance methods to a certain generic argument shape, therefore, a function is used to ensure the conversion remains type safe.
When the upstream signals anonError oronComplete item, the returned Flowable cancels of the flow and terminates with that type of terminal event:
Flowable.just(createOnNext(1), createOnComplete(), createOnNext(2)) .doOnCancel(() -> System.out.println("Canceled!")); .dematerialize(notification -> notification) .test() .assertResult(1); If the upstream signalsonError oronComplete directly, the flow is terminated with the same event. Flowable.just(createOnNext(1), createOnNext(2)) .dematerialize(notification -> notification) .test() .assertResult(1, 2); If this behavior is not desired, the completion can be suppressed by applyingconcatWith(Publisher) with anever() source.Publisher's backpressure behavior.dematerialize does not operate by default on a particularScheduler.R - the output value typeselector - function that returns the upstream item and should return a Notification to signal the correspondingSubscriber event to the downstream.Notification objects selected from the items emitted by the source Flowable@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final Flowable<T> distinct()
Object.equals(Object) comparison.
It is recommended the elements' classT in the flow overrides the defaultObject.equals() andObject.hashCode() to provide a meaningful comparison between items as the default Java implementation only considers reference equivalence.
By default,distinct() uses an internalHashSet per Subscriber to remember previously seen items and usesSet.add(Object) returningfalse as the indicator for duplicates.
Note that this internalHashSet may grow unbounded as items won't be removed from it by the operator. Therefore, using very long or infinite upstream (with very distinct elements) may lead toOutOfMemoryError.
Customizing the retention policy can happen only by providing a customCollection implementation to thedistinct(Function, Callable) overload.
Publisher's backpressure behavior.distinct does not operate by default on a particularScheduler.distinct(Function),distinct(Function, Callable)@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <K> Flowable<T> distinct(Function<? superT,K> keySelector)
Object.equals(Object) comparison of the objects returned by the key selector function.
It is recommended the keys' classK overrides the defaultObject.equals() andObject.hashCode() to provide a meaningful comparison between the key objects as the default Java implementation only considers reference equivalence.
By default,distinct() uses an internalHashSet per Subscriber to remember previously seen keys and usesSet.add(Object) returningfalse as the indicator for duplicates.
Note that this internalHashSet may grow unbounded as keys won't be removed from it by the operator. Therefore, using very long or infinite upstream (with very distinct keys) may lead toOutOfMemoryError.
Customizing the retention policy can happen only by providing a customCollection implementation to thedistinct(Function, Callable) overload.
Publisher's backpressure behavior.distinct does not operate by default on a particularScheduler.K - the key typekeySelector - a function that projects an emitted item to a key value that is used to decide whether an item is distinct from another one or notdistinct(Function, Callable)@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <K> Flowable<T> distinct(Function<? superT,K> keySelector,Callable<? extendsCollection<? super K>> collectionSupplier)
Object.equals(Object) comparison of the objects returned by the key selector function.
It is recommended the keys' classK overrides the defaultObject.equals() andObject.hashCode() to provide a meaningful comparison between the key objects as the default Java implementation only considers reference equivalence.
Publisher's backpressure behavior.distinct does not operate by default on a particularScheduler.K - the key typekeySelector - a function that projects an emitted item to a key value that is used to decide whether an item is distinct from another one or notcollectionSupplier - function called for each individual Subscriber to return a Collection subtype for holding the extracted keys and whose add() method's return indicates uniqueness.@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final Flowable<T> distinctUntilChanged()
Object.equals(Object) comparison.
It is recommended the elements' classT in the flow overrides the defaultObject.equals() to provide a meaningful comparison between items as the default Java implementation only considers reference equivalence. Alternatively, use thedistinctUntilChanged(BiPredicate) overload and provide a comparison function in case the classT can't be overridden with customequals() or the comparison itself should happen on different terms or properties of the classT.
Note that the operator always retains the latest item from upstream regardless of the comparison result and uses it in the next comparison with the next upstream item.
Note that if element typeT in the flow is mutable, the comparison of the previous and current item may yield unexpected results if the items are mutated externally. Common cases are mutableCharSequences orLists where the objects will actually have the same references when they are modified anddistinctUntilChanged will evaluate subsequent items as same. To avoid such situation, it is recommended that mutable data is converted to an immutable one, for example usingmap(CharSequence::toString) ormap(list -> Collections.unmodifiableList(new ArrayList<>(list))).
Publisher's backpressure behavior.distinctUntilChanged does not operate by default on a particularScheduler.distinctUntilChanged(BiPredicate)@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <K> Flowable<T> distinctUntilChanged(Function<? superT,K> keySelector)
Object.equals(Object) comparison of those objects returned by the key selector function.
It is recommended the keys' classK overrides the defaultObject.equals() to provide a meaningful comparison between the key objects as the default Java implementation only considers reference equivalence. Alternatively, use thedistinctUntilChanged(BiPredicate) overload and provide a comparison function in case the classK can't be overridden with customequals() or the comparison itself should happen on different terms or properties of the item classT (for which the keys can be derived via a similar selector).
Note that the operator always retains the latest key from upstream regardless of the comparison result and uses it in the next comparison with the next key derived from the next upstream item.
Note that if element typeT in the flow is mutable, the comparison of the previous and current item may yield unexpected results if the items are mutated externally. Common cases are mutableCharSequences orLists where the objects will actually have the same references when they are modified anddistinctUntilChanged will evaluate subsequent items as same. To avoid such situation, it is recommended that mutable data is converted to an immutable one, for example usingmap(CharSequence::toString) ormap(list -> Collections.unmodifiableList(new ArrayList<>(list))).
Publisher's backpressure behavior.distinctUntilChanged does not operate by default on a particularScheduler.K - the key typekeySelector - a function that projects an emitted item to a key value that is used to decide whether an item is distinct from another one or not@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final Flowable<T> distinctUntilChanged(BiPredicate<? superT,? superT> comparer)

Note that the operator always retains the latest item from upstream regardless of the comparison result and uses it in the next comparison with the next upstream item.
Note that if element typeT in the flow is mutable, the comparison of the previous and current item may yield unexpected results if the items are mutated externally. Common cases are mutableCharSequences orLists where the objects will actually have the same references when they are modified anddistinctUntilChanged will evaluate subsequent items as same. To avoid such situation, it is recommended that mutable data is converted to an immutable one, for example usingmap(CharSequence::toString) ormap(list -> Collections.unmodifiableList(new ArrayList<>(list))).
Publisher's backpressure behavior.distinctUntilChanged does not operate by default on a particularScheduler.comparer - the function that receives the previous item and the current item and is expected to return true if the two are equal, thus skipping the current value.@CheckReturnValue@BackpressureSupport(value=PASS_THROUGH)@SchedulerSupport(value="none")public final Flowable<T> doFinally(Action onFinally)
In case of a race between a terminal event and a cancellation, the providedonFinally action is executed once per subscription.
Note that theonFinally action is shared between subscriptions and as such should be thread-safe.
Publisher's backpressure behavior.doFinally does not operate by default on a particularScheduler.History: 2.0.1 - experimental
onFinally - the action called when this Flowable terminates or gets canceled@CheckReturnValue@BackpressureSupport(value=PASS_THROUGH)@SchedulerSupport(value="none")public final Flowable<T> doAfterNext(Consumer<? superT> onAfterNext)
Note that theonAfterNext action is shared between subscriptions and as such should be thread-safe.
Publisher's backpressure behavior.doAfterNext does not operate by default on a particularScheduler.History: 2.0.1 - experimental
onAfterNext - the Consumer that will be called after emitting an item from upstream to the downstream@CheckReturnValue@BackpressureSupport(value=PASS_THROUGH)@SchedulerSupport(value="none")public final Flowable<T> doAfterTerminate(Action onAfterTerminate)
Action to be called when this Publisher invokes eitheronComplete oronError.
Publisher's backpressure behavior.doAfterTerminate does not operate by default on a particularScheduler.onAfterTerminate - anAction to be invoked when the source Publisher finishesActiondoOnTerminate(Action)@CheckReturnValue@BackpressureSupport(value=PASS_THROUGH)@SchedulerSupport(value="none")public final Flowable<T> doOnCancel(Action onCancel)
Action if the downstream cancels the sequence.The action is shared between subscriptions and thus may be called concurrently from multiple threads; the action must be thread-safe.
If the action throws a runtime exception, that exception is rethrown by theonCancel() call, sometimes as aCompositeException if there were multiple exceptions along the way.
Note that terminal events trigger the action unless thePublisher is subscribed to viaunsafeSubscribe().

doOnCancel does not interact with backpressure requests or value delivery; backpressure behavior is preserved between its upstream and its downstream.doOnCancel does not operate by default on a particularScheduler.onCancel - the action that gets called when the sourcePublisher's Subscription is canceledPublisher modified so as to call this Action when appropriate@CheckReturnValue@BackpressureSupport(value=PASS_THROUGH)@SchedulerSupport(value="none")public final Flowable<T> doOnComplete(Action onComplete)
onComplete.
Publisher's backpressure behavior.doOnComplete does not operate by default on a particularScheduler.onComplete - the action to invoke when the source Publisher callsonComplete@CheckReturnValue@NonNull@BackpressureSupport(value=PASS_THROUGH)@SchedulerSupport(value="none")public final Flowable<T> doOnEach(Consumer<? superNotification<T>> onNotification)

Publisher's backpressure behavior.doOnEach does not operate by default on a particularScheduler.onNotification - the action to invoke for each item emitted by the source Publisher@CheckReturnValue@NonNull@BackpressureSupport(value=PASS_THROUGH)@SchedulerSupport(value="none")public final Flowable<T> doOnEach(Subscriber<? superT> subscriber)
In case theonError of the supplied Subscriber throws, the downstream will receive a composite exception containing the original exception and the exception thrown byonError. If either theonNext or theonComplete method of the supplied Subscriber throws, the downstream will be terminated and will receive this thrown exception.

Publisher's backpressure behavior.doOnEach does not operate by default on a particularScheduler.subscriber - the Subscriber to be notified about onNext, onError and onComplete events on its respective methods before the actual downstream Subscriber gets notified.@CheckReturnValue@BackpressureSupport(value=PASS_THROUGH)@SchedulerSupport(value="none")public final Flowable<T> doOnError(Consumer<? superThrowable> onError)
onError. In case theonError action throws, the downstream will receive a composite exception containing the original exception and the exception thrown byonError.

Publisher's backpressure behavior.doOnError does not operate by default on a particularScheduler.onError - the action to invoke if the source Publisher callsonError@CheckReturnValue@NonNull@BackpressureSupport(value=PASS_THROUGH)@SchedulerSupport(value="none")public final Flowable<T> doOnLifecycle(Consumer<? superSubscription> onSubscribe,LongConsumer onRequest,Action onCancel)

Publisher's backpressure behavior.doOnLifecycle does not operate by default on a particularScheduler.onSubscribe - a Consumer called with the Subscription sent via Subscriber.onSubscribe()onRequest - a LongConsumer called with the request amount sent via Subscription.request()onCancel - called when the downstream cancels the Subscription via cancel()@CheckReturnValue@BackpressureSupport(value=PASS_THROUGH)@SchedulerSupport(value="none")public final Flowable<T> doOnNext(Consumer<? superT> onNext)
onNext.
Publisher's backpressure behavior.doOnNext does not operate by default on a particularScheduler.onNext - the action to invoke when the source Publisher callsonNext@CheckReturnValue@BackpressureSupport(value=PASS_THROUGH)@SchedulerSupport(value="none")public final Flowable<T> doOnRequest(LongConsumer onRequest)
Publisher so that it invokes the given action when it receives a request for more items.Note: This operator is for tracing the internal behavior of back-pressure request patterns and generally intended for debugging use.
Publisher's backpressure behavior.doOnRequest does not operate by default on a particularScheduler.onRequest - the action that gets called when a Subscriber requests items from thisPublisherPublisher modified so as to call this Action when appropriate@CheckReturnValue@BackpressureSupport(value=PASS_THROUGH)@SchedulerSupport(value="none")public final Flowable<T> doOnSubscribe(Consumer<? superSubscription> onSubscribe)
Publisher so that it invokes the given action when it is subscribed from its subscribers. Each subscription will result in an invocation of the given action except when the sourcePublisher is reference counted, in which case the sourcePublisher will invoke the given action for the first subscription.
Publisher's backpressure behavior.doOnSubscribe does not operate by default on a particularScheduler.onSubscribe - the Consumer that gets called when a Subscriber subscribes to the currentFlowablePublisher modified so as to call this Consumer when appropriate@CheckReturnValue@BackpressureSupport(value=PASS_THROUGH)@SchedulerSupport(value="none")public final Flowable<T> doOnTerminate(Action onTerminate)
onComplete oronError.
This differs fromdoAfterTerminate in that this happensbefore theonComplete oronError notification.
Publisher's backpressure behavior.doOnTerminate does not operate by default on a particularScheduler.onTerminate - the action to invoke when the source Publisher callsonComplete oronErrordoAfterTerminate(Action)@CheckReturnValue@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final Maybe<T> elementAt(long index)

Publisher in an unbounded manner (i.e., no backpressure applied to it).elementAt does not operate by default on a particularScheduler.index - the zero-based index of the item to retrieve@CheckReturnValue@NonNull@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final Single<T> elementAt(long index,T defaultItem)

Publisher in an unbounded manner (i.e., no backpressure applied to it).elementAt does not operate by default on a particularScheduler.index - the zero-based index of the item to retrievedefaultItem - the default itemIndexOutOfBoundsException - ifindex is less than 0@CheckReturnValue@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final Single<T> elementAtOrError(long index)
NoSuchElementException if this Flowable has fewer elements than index.
Publisher in an unbounded manner (i.e., no backpressure applied to it).elementAtOrError does not operate by default on a particularScheduler.index - the zero-based index of the item to retrieveIndexOutOfBoundsException - ifindex is less than 0@CheckReturnValue@NonNull@BackpressureSupport(value=PASS_THROUGH)@SchedulerSupport(value="none")public final Flowable<T> filter(Predicate<? superT> predicate)

Publisher's backpressure behavior.filter does not operate by default on a particularScheduler.predicate - a function that evaluates each item emitted by the source Publisher, returningtrue if it passes the filtertrue@CheckReturnValue@BackpressureSupport(value=SPECIAL)@SchedulerSupport(value="none")public final Maybe<T> firstElement()

Publisher in an unbounded manner (i.e., without applying backpressure).firstElement does not operate by default on a particularScheduler.@CheckReturnValue@BackpressureSupport(value=SPECIAL)@SchedulerSupport(value="none")public final Single<T> first(T defaultItem)

Publisher in an unbounded manner (i.e., without applying backpressure).first does not operate by default on a particularScheduler.defaultItem - the default item to emit if the source Publisher doesn't emit anything@CheckReturnValue@BackpressureSupport(value=SPECIAL)@SchedulerSupport(value="none")public final Single<T> firstOrError()
NoSuchElementException if this Flowable is empty.
Publisher in an unbounded manner (i.e., without applying backpressure).firstOrError does not operate by default on a particularScheduler.@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <R> Flowable<R> flatMap(Function<? superT,? extendsPublisher<? extends R>> mapper)

bufferSize() outstanding request amount for items). The innerPublishers are expected to honor backpressure; if violated, the operatormay signalMissingBackpressureException.flatMap does not operate by default on a particularScheduler.R - the value type of the inner Publishers and the output typemapper - a function that, when applied to an item emitted by the source Publisher, returns a Publisher@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <R> Flowable<R> flatMap(Function<? superT,? extendsPublisher<? extends R>> mapper, boolean delayErrors)

bufferSize() outstanding request amount for items). The innerPublishers are expected to honor backpressure; if violated, the operatormay signalMissingBackpressureException.flatMap does not operate by default on a particularScheduler.R - the value type of the inner Publishers and the output typemapper - a function that, when applied to an item emitted by the source Publisher, returns a PublisherdelayErrors - if true, exceptions from the current Flowable and all inner Publishers are delayed until all of them terminate if false, the first one signaling an exception will terminate the whole sequence immediately@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <R> Flowable<R> flatMap(Function<? superT,? extendsPublisher<? extends R>> mapper, int maxConcurrency)
maxConcurrency outstanding request amount for items). The innerPublishers are expected to honor backpressure; if violated, the operatormay signalMissingBackpressureException.flatMap does not operate by default on a particularScheduler.R - the value type of the inner Publishers and the output typemapper - a function that, when applied to an item emitted by the source Publisher, returns a PublishermaxConcurrency - the maximum number of Publishers that may be subscribed to concurrently@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <R> Flowable<R> flatMap(Function<? superT,? extendsPublisher<? extends R>> mapper, boolean delayErrors, int maxConcurrency)
maxConcurrency outstanding request amount for items). The innerPublishers are expected to honor backpressure; if violated, the operatormay signalMissingBackpressureException.flatMap does not operate by default on a particularScheduler.R - the value type of the inner Publishers and the output typemapper - a function that, when applied to an item emitted by the source Publisher, returns a PublishermaxConcurrency - the maximum number of Publishers that may be subscribed to concurrentlydelayErrors - if true, exceptions from the current Flowable and all inner Publishers are delayed until all of them terminate if false, the first one signaling an exception will terminate the whole sequence immediately@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <R> Flowable<R> flatMap(Function<? superT,? extendsPublisher<? extends R>> mapper, boolean delayErrors, int maxConcurrency, int bufferSize)
maxConcurrency outstanding request amount for items). The innerPublishers are expected to honor backpressure; if violated, the operatormay signalMissingBackpressureException.flatMap does not operate by default on a particularScheduler.R - the value type of the inner Publishers and the output typemapper - a function that, when applied to an item emitted by the source Publisher, returns a PublishermaxConcurrency - the maximum number of Publishers that may be subscribed to concurrentlydelayErrors - if true, exceptions from the current Flowable and all inner Publishers are delayed until all of them terminate if false, the first one signaling an exception will terminate the whole sequence immediatelybufferSize - the number of elements to prefetch from each inner Publisher@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <R> Flowable<R> flatMap(Function<? superT,? extendsPublisher<? extends R>> onNextMapper,Function<? superThrowable,? extendsPublisher<? extends R>> onErrorMapper,Callable<? extendsPublisher<? extends R>> onCompleteSupplier)

bufferSize() outstanding request amount for items). The innerPublishers are expected to honor backpressure; if violated, the operatormay signalMissingBackpressureException.flatMap does not operate by default on a particularScheduler.R - the result typeonNextMapper - a function that returns a Publisher to merge for each item emitted by the source PublisheronErrorMapper - a function that returns a Publisher to merge for an onError notification from the source PublisheronCompleteSupplier - a function that returns a Publisher to merge for an onComplete notification from the source Publisher@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <R> Flowable<R> flatMap(Function<? superT,? extendsPublisher<? extends R>> onNextMapper,Function<Throwable,? extendsPublisher<? extends R>> onErrorMapper,Callable<? extendsPublisher<? extends R>> onCompleteSupplier, int maxConcurrency)
maxConcurrency outstanding request amount for items). The innerPublishers are expected to honor backpressure; if violated, the operatormay signalMissingBackpressureException.flatMap does not operate by default on a particularScheduler.R - the result typeonNextMapper - a function that returns a Publisher to merge for each item emitted by the source PublisheronErrorMapper - a function that returns a Publisher to merge for an onError notification from the source PublisheronCompleteSupplier - a function that returns a Publisher to merge for an onComplete notification from the source PublishermaxConcurrency - the maximum number of Publishers that may be subscribed to concurrently@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <U,R> Flowable<R> flatMap(Function<? superT,? extendsPublisher<? extends U>> mapper,BiFunction<? superT,? super U,? extends R> combiner)

maxConcurrency outstanding request amount for items). The innerPublishers are expected to honor backpressure; if violated, the operatormay signalMissingBackpressureException.flatMap does not operate by default on a particularScheduler.U - the type of items emitted by the inner PublishersR - the type of items emitted by the combiner functionmapper - a function that returns a Publisher for each item emitted by the source Publishercombiner - a function that combines one item emitted by each of the source and collection Publishers and returns an item to be emitted by the resulting Publisher@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <U,R> Flowable<R> flatMap(Function<? superT,? extendsPublisher<? extends U>> mapper,BiFunction<? superT,? super U,? extends R> combiner, boolean delayErrors)

bufferSize() outstanding request amount for items). The innerPublishers are expected to honor backpressure; if violated, the operatormay signalMissingBackpressureException.flatMap does not operate by default on a particularScheduler.U - the type of items emitted by the inner PublishersR - the type of items emitted by the combiner functionsmapper - a function that returns a Publisher for each item emitted by the source Publishercombiner - a function that combines one item emitted by each of the source and collection Publishers and returns an item to be emitted by the resulting PublisherdelayErrors - if true, exceptions from the current Flowable and all inner Publishers are delayed until all of them terminate if false, the first one signaling an exception will terminate the whole sequence immediately@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <U,R> Flowable<R> flatMap(Function<? superT,? extendsPublisher<? extends U>> mapper,BiFunction<? superT,? super U,? extends R> combiner, boolean delayErrors, int maxConcurrency)
maxConcurrency outstanding request amount for items). The innerPublishers are expected to honor backpressure; if violated, the operatormay signalMissingBackpressureException.flatMap does not operate by default on a particularScheduler.U - the type of items emitted by the inner PublishersR - the type of items emitted by the combiner functionmapper - a function that returns a Publisher for each item emitted by the source Publishercombiner - a function that combines one item emitted by each of the source and collection Publishers and returns an item to be emitted by the resulting PublishermaxConcurrency - the maximum number of Publishers that may be subscribed to concurrentlydelayErrors - if true, exceptions from the current Flowable and all inner Publishers are delayed until all of them terminate if false, the first one signaling an exception will terminate the whole sequence immediately@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <U,R> Flowable<R> flatMap(Function<? superT,? extendsPublisher<? extends U>> mapper,BiFunction<? superT,? super U,? extends R> combiner, boolean delayErrors, int maxConcurrency, int bufferSize)
maxConcurrency outstanding request amount for items). The innerPublishers are expected to honor backpressure; if violated, the operatormay signalMissingBackpressureException.flatMap does not operate by default on a particularScheduler.U - the type of items emitted by the inner PublishersR - the type of items emitted by the combiner functionmapper - a function that returns a Publisher for each item emitted by the source Publishercombiner - a function that combines one item emitted by each of the source and collection Publishers and returns an item to be emitted by the resulting PublishermaxConcurrency - the maximum number of Publishers that may be subscribed to concurrentlydelayErrors - if true, exceptions from the current Flowable and all inner Publishers are delayed until all of them terminate if false, the first one signaling an exception will terminate the whole sequence immediatelybufferSize - the number of elements to prefetch from the inner Publishers.@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <U,R> Flowable<R> flatMap(Function<? superT,? extendsPublisher<? extends U>> mapper,BiFunction<? superT,? super U,? extends R> combiner, int maxConcurrency)
bufferSize() outstanding request amount for items). The innerPublishers are expected to honor backpressure; if violated, the operatormay signalMissingBackpressureException.flatMap does not operate by default on a particularScheduler.U - the type of items emitted by the inner PublishersR - the type of items emitted by the combiner functionmapper - a function that returns a Publisher for each item emitted by the source Publishercombiner - a function that combines one item emitted by each of the source and collection Publishers and returns an item to be emitted by the resulting PublishermaxConcurrency - the maximum number of Publishers that may be subscribed to concurrently@CheckReturnValue@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final Completable flatMapCompletable(Function<? superT,? extendsCompletableSource> mapper)
flatMapCompletable does not operate by default on a particularScheduler.mapper - the function that received each source value and transforms them into CompletableSources.@CheckReturnValue@NonNull@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final Completable flatMapCompletable(Function<? superT,? extendsCompletableSource> mapper, boolean delayErrors, int maxConcurrency)
maxConcurrency == Integer.MAX_VALUE the operator consumes the upstream in an unbounded manner. Otherwise, the operator expects the upstream to honor backpressure. If the upstream doesn't support backpressure the operator behaves as ifmaxConcurrency == Integer.MAX_VALUE was used.flatMapCompletable does not operate by default on a particularScheduler.mapper - the function that received each source value and transforms them into CompletableSources.delayErrors - if true errors from the upstream and inner CompletableSources are delayed until each of them terminates.maxConcurrency - the maximum number of active subscriptions to the CompletableSources.@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <U> Flowable<U> flatMapIterable(Function<? superT,? extendsIterable<? extends U>> mapper)

Publishers is expected to honor backpressure as well. If the sourcePublisher violates the rule, the operator will signal aMissingBackpressureException.flatMapIterable does not operate by default on a particularScheduler.U - the type of item emitted by the resulting Iterablemapper - a function that returns an Iterable sequence of values for when given an item emitted by the source PublishercollectionSelector@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <U> Flowable<U> flatMapIterable(Function<? superT,? extendsIterable<? extends U>> mapper, int bufferSize)

Publishers is expected to honor backpressure as well. If the sourcePublisher violates the rule, the operator will signal aMissingBackpressureException.flatMapIterable does not operate by default on a particularScheduler.U - the type of item emitted by the resulting Iterablemapper - a function that returns an Iterable sequence of values for when given an item emitted by the source PublisherbufferSize - the number of elements to prefetch from the current FlowablecollectionSelector@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <U,V> Flowable<V> flatMapIterable(Function<? superT,? extendsIterable<? extends U>> mapper,BiFunction<? superT,? super U,? extends V> resultSelector)

Publishers is consumed in an unbounded manner (i.e., no backpressure is applied to it).flatMapIterable does not operate by default on a particularScheduler.U - the collection element typeV - the type of item emitted by the resulting Iterablemapper - a function that returns an Iterable sequence of values for each item emitted by the source PublisherresultSelector - a function that returns an item based on the item emitted by the source Publisher and the Iterable returned for that item by thecollectionSelectorresultSelector for each item in the source Publisher@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <U,V> Flowable<V> flatMapIterable(Function<? superT,? extendsIterable<? extends U>> mapper,BiFunction<? superT,? super U,? extends V> resultSelector, int prefetch)

Publishers is expected to honor backpressure as well. If the sourcePublisher violates the rule, the operator will signal aMissingBackpressureException.flatMapIterable does not operate by default on a particularScheduler.U - the element type of the inner Iterable sequencesV - the type of item emitted by the resulting Publishermapper - a function that returns an Iterable sequence of values for when given an item emitted by the source PublisherresultSelector - a function that returns an item based on the item emitted by the source Publisher and the Iterable returned for that item by thecollectionSelectorprefetch - the number of elements to prefetch from the current FlowablecollectionSelector@CheckReturnValue@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final <R> Flowable<R> flatMapMaybe(Function<? superT,? extendsMaybeSource<? extends R>> mapper)
flatMapMaybe does not operate by default on a particularScheduler.R - the result value typemapper - the function that received each source value and transforms them into MaybeSources.@CheckReturnValue@NonNull@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final <R> Flowable<R> flatMapMaybe(Function<? superT,? extendsMaybeSource<? extends R>> mapper, boolean delayErrors, int maxConcurrency)
maxConcurrency MaybeSources at a time and merges their onSuccess values, in no particular order, into a single Flowable sequence, optionally delaying all errors.maxConcurrency == Integer.MAX_VALUE the operator consumes the upstream in an unbounded manner. Otherwise, the operator expects the upstream to honor backpressure. If the upstream doesn't support backpressure the operator behaves as ifmaxConcurrency == Integer.MAX_VALUE was used.flatMapMaybe does not operate by default on a particularScheduler.R - the result value typemapper - the function that received each source value and transforms them into MaybeSources.delayErrors - if true errors from the upstream and inner MaybeSources are delayed until each of them terminates.maxConcurrency - the maximum number of active subscriptions to the MaybeSources.@CheckReturnValue@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final <R> Flowable<R> flatMapSingle(Function<? superT,? extendsSingleSource<? extends R>> mapper)
flatMapSingle does not operate by default on a particularScheduler.R - the result value typemapper - the function that received each source value and transforms them into SingleSources.@CheckReturnValue@NonNull@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final <R> Flowable<R> flatMapSingle(Function<? superT,? extendsSingleSource<? extends R>> mapper, boolean delayErrors, int maxConcurrency)
maxConcurrency SingleSources at a time and merges their onSuccess values, in no particular order, into a single Flowable sequence, optionally delaying all errors.maxConcurrency == Integer.MAX_VALUE the operator consumes the upstream in an unbounded manner. Otherwise, the operator expects the upstream to honor backpressure. If the upstream doesn't support backpressure the operator behaves as ifmaxConcurrency == Integer.MAX_VALUE was used.flatMapSingle does not operate by default on a particularScheduler.R - the result value typemapper - the function that received each source value and transforms them into SingleSources.delayErrors - if true errors from the upstream and inner SingleSources are delayed until each of them terminates.maxConcurrency - the maximum number of active subscriptions to the SingleSources.@CheckReturnValue@BackpressureSupport(value=NONE)@SchedulerSupport(value="none")public final Disposable forEach(Consumer<? superT> onNext)
Publisher and receives notifications for each element. Alias tosubscribe(Consumer)
Publisher in an unbounded manner (i.e., no backpressure is applied to it).forEach does not operate by default on a particularScheduler.onNext -Consumer to execute for each item.NullPointerException - ifonNext is null@CheckReturnValue@BackpressureSupport(value=NONE)@SchedulerSupport(value="none")public final Disposable forEachWhile(Predicate<? superT> onNext)
Publisher and receives notifications for each element until the onNext Predicate returns false. If the Flowable emits an error, it is wrapped into anOnErrorNotImplementedException and routed to the RxJavaPlugins.onError handler.
Publisher in an unbounded manner (i.e., no backpressure is applied to it).forEachWhile does not operate by default on a particularScheduler.onNext -Predicate to execute for each item.Disposable that allows canceling an asynchronous sequenceNullPointerException - ifonNext is null@CheckReturnValue@BackpressureSupport(value=NONE)@SchedulerSupport(value="none")public final Disposable forEachWhile(Predicate<? superT> onNext,Consumer<? superThrowable> onError)
Publisher and receives notifications for each element and error events until the onNext Predicate returns false.Publisher in an unbounded manner (i.e., no backpressure is applied to it).forEachWhile does not operate by default on a particularScheduler.onNext -Predicate to execute for each item.onError -Consumer to execute when an error is emitted.Disposable that allows canceling an asynchronous sequenceNullPointerException - ifonNext is null, or ifonError is null@CheckReturnValue@NonNull@BackpressureSupport(value=NONE)@SchedulerSupport(value="none")public final Disposable forEachWhile(Predicate<? superT> onNext,Consumer<? superThrowable> onError,Action onComplete)
Publisher and receives notifications for each element and the terminal events until the onNext Predicate returns false.Publisher in an unbounded manner (i.e., no backpressure is applied to it).forEachWhile does not operate by default on a particularScheduler.onNext -Predicate to execute for each item.onError -Consumer to execute when an error is emitted.onComplete -Action to execute when completion is signaled.Disposable that allows canceling an asynchronous sequenceNullPointerException - ifonNext is null, or ifonError is null, or ifonComplete is null@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <K> Flowable<GroupedFlowable<K,T>> groupBy(Function<? superT,? extends K> keySelector)
Publisher according to a specified criterion, and emits these grouped items asGroupedFlowables. The emittedGroupedPublisher allows only a singleSubscriber during its lifetime and if thisSubscriber cancels before the source terminates, the next emission by the source having the same key will trigger a newGroupedPublisher emission.
Note: AGroupedFlowable will cache the items it is to emit until such time as it is subscribed to. For this reason, in order to avoid memory leaks, you should not simply ignore thoseGroupedPublishers that do not concern you. Instead, you can signal to them that they may discard their buffers by applying an operator likeignoreElements() to them.
Note that theGroupedFlowables should be subscribed to as soon as possible, otherwise, the unconsumed groups may starve other groups due to the internal backpressure coordination of thegroupBy operator. Such hangs can be usually avoided by usingflatMap(Function, int) orconcatMapEager(Function, int, int) and overriding the default maximum concurrency value to be greater or equal to the expected number of groups, possibly usingInteger.MAX_VALUE if the number of expected groups is unknown.
Publishers honor backpressure and the sourcePublisher is consumed in a bounded mode (i.e., requested a fixed amount upfront and replenished based on downstream consumption). Note that both the returned and its innerPublishers use unbounded internal buffers and if the sourcePublisher doesn't honor backpressure, thatmay lead toOutOfMemoryError.groupBy does not operate by default on a particularScheduler.K - the key typekeySelector - a function that extracts the key for each itemPublisher that emitsGroupedFlowables, each of which corresponds to a unique key value and each of which emits those items from the source Publisher that share that key value@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <K> Flowable<GroupedFlowable<K,T>> groupBy(Function<? superT,? extends K> keySelector, boolean delayError)
Publisher according to a specified criterion, and emits these grouped items asGroupedFlowables. The emittedGroupedPublisher allows only a singleSubscriber during its lifetime and if thisSubscriber cancels before the source terminates, the next emission by the source having the same key will trigger a newGroupedPublisher emission.
Note: AGroupedFlowable will cache the items it is to emit until such time as it is subscribed to. For this reason, in order to avoid memory leaks, you should not simply ignore thoseGroupedPublishers that do not concern you. Instead, you can signal to them that they may discard their buffers by applying an operator likeignoreElements() to them.
Note that theGroupedFlowables should be subscribed to as soon as possible, otherwise, the unconsumed groups may starve other groups due to the internal backpressure coordination of thegroupBy operator. Such hangs can be usually avoided by usingflatMap(Function, int) orconcatMapEager(Function, int, int) and overriding the default maximum concurrency value to be greater or equal to the expected number of groups, possibly usingInteger.MAX_VALUE if the number of expected groups is unknown.
Publishers honor backpressure and the sourcePublisher is consumed in a bounded mode (i.e., requested a fixed amount upfront and replenished based on downstream consumption). Note that both the returned and its innerPublishers use unbounded internal buffers and if the sourcePublisher doesn't honor backpressure, thatmay lead toOutOfMemoryError.groupBy does not operate by default on a particularScheduler.K - the key typekeySelector - a function that extracts the key for each itemdelayError - if true, the exception from the current Flowable is delayed in each group until that specific group emitted the normal values; if false, the exception bypasses values in the groups and is reported immediately.Publisher that emitsGroupedFlowables, each of which corresponds to a unique key value and each of which emits those items from the source Publisher that share that key value@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <K,V> Flowable<GroupedFlowable<K,V>> groupBy(Function<? superT,? extends K> keySelector,Function<? superT,? extends V> valueSelector)
Publisher according to a specified criterion, and emits these grouped items asGroupedFlowables. The emittedGroupedPublisher allows only a singleSubscriber during its lifetime and if thisSubscriber cancels before the source terminates, the next emission by the source having the same key will trigger a newGroupedPublisher emission.
Note: AGroupedFlowable will cache the items it is to emit until such time as it is subscribed to. For this reason, in order to avoid memory leaks, you should not simply ignore thoseGroupedPublishers that do not concern you. Instead, you can signal to them that they may discard their buffers by applying an operator likeignoreElements() to them.
Note that theGroupedFlowables should be subscribed to as soon as possible, otherwise, the unconsumed groups may starve other groups due to the internal backpressure coordination of thegroupBy operator. Such hangs can be usually avoided by usingflatMap(Function, int) orconcatMapEager(Function, int, int) and overriding the default maximum concurrency value to be greater or equal to the expected number of groups, possibly usingInteger.MAX_VALUE if the number of expected groups is unknown.
Publishers honor backpressure and the sourcePublisher is consumed in a bounded mode (i.e., requested a fixed amount upfront and replenished based on downstream consumption). Note that both the returned and its innerPublishers use unbounded internal buffers and if the sourcePublisher doesn't honor backpressure, thatmay lead toOutOfMemoryError.groupBy does not operate by default on a particularScheduler.K - the key typeV - the element typekeySelector - a function that extracts the key for each itemvalueSelector - a function that extracts the return element for each itemPublisher that emitsGroupedFlowables, each of which corresponds to a unique key value and each of which emits those items from the source Publisher that share that key value@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <K,V> Flowable<GroupedFlowable<K,V>> groupBy(Function<? superT,? extends K> keySelector,Function<? superT,? extends V> valueSelector, boolean delayError)
Publisher according to a specified criterion, and emits these grouped items asGroupedFlowables. The emittedGroupedPublisher allows only a singleSubscriber during its lifetime and if thisSubscriber cancels before the source terminates, the next emission by the source having the same key will trigger a newGroupedPublisher emission.
Note: AGroupedFlowable will cache the items it is to emit until such time as it is subscribed to. For this reason, in order to avoid memory leaks, you should not simply ignore thoseGroupedPublishers that do not concern you. Instead, you can signal to them that they may discard their buffers by applying an operator likeignoreElements() to them.
Note that theGroupedFlowables should be subscribed to as soon as possible, otherwise, the unconsumed groups may starve other groups due to the internal backpressure coordination of thegroupBy operator. Such hangs can be usually avoided by usingflatMap(Function, int) orconcatMapEager(Function, int, int) and overriding the default maximum concurrency value to be greater or equal to the expected number of groups, possibly usingInteger.MAX_VALUE if the number of expected groups is unknown.
Publishers honor backpressure and the sourcePublisher is consumed in a bounded mode (i.e., requested a fixed amount upfront and replenished based on downstream consumption). Note that both the returned and its innerPublishers use unbounded internal buffers and if the sourcePublisher doesn't honor backpressure, thatmay lead toOutOfMemoryError.groupBy does not operate by default on a particularScheduler.K - the key typeV - the element typekeySelector - a function that extracts the key for each itemvalueSelector - a function that extracts the return element for each itemdelayError - if true, the exception from the current Flowable is delayed in each group until that specific group emitted the normal values; if false, the exception bypasses values in the groups and is reported immediately.Publisher that emitsGroupedFlowables, each of which corresponds to a unique key value and each of which emits those items from the source Publisher that share that key value@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <K,V> Flowable<GroupedFlowable<K,V>> groupBy(Function<? superT,? extends K> keySelector,Function<? superT,? extends V> valueSelector, boolean delayError, int bufferSize)
Publisher according to a specified criterion, and emits these grouped items asGroupedFlowables. The emittedGroupedPublisher allows only a singleSubscriber during its lifetime and if thisSubscriber cancels before the source terminates, the next emission by the source having the same key will trigger a newGroupedPublisher emission.
Note: AGroupedFlowable will cache the items it is to emit until such time as it is subscribed to. For this reason, in order to avoid memory leaks, you should not simply ignore thoseGroupedPublishers that do not concern you. Instead, you can signal to them that they may discard their buffers by applying an operator likeignoreElements() to them.
Note that theGroupedFlowables should be subscribed to as soon as possible, otherwise, the unconsumed groups may starve other groups due to the internal backpressure coordination of thegroupBy operator. Such hangs can be usually avoided by usingflatMap(Function, int) orconcatMapEager(Function, int, int) and overriding the default maximum concurrency value to be greater or equal to the expected number of groups, possibly usingInteger.MAX_VALUE if the number of expected groups is unknown.
Publishers honor backpressure and the sourcePublisher is consumed in a bounded mode (i.e., requested a fixed amount upfront and replenished based on downstream consumption). Note that both the returned and its innerPublishers use unbounded internal buffers and if the sourcePublisher doesn't honor backpressure, thatmay lead toOutOfMemoryError.groupBy does not operate by default on a particularScheduler.K - the key typeV - the element typekeySelector - a function that extracts the key for each itemvalueSelector - a function that extracts the return element for each itemdelayError - if true, the exception from the current Flowable is delayed in each group until that specific group emitted the normal values; if false, the exception bypasses values in the groups and is reported immediately.bufferSize - the hint for how manyGroupedFlowables and element in eachGroupedFlowable should be bufferedPublisher that emitsGroupedFlowables, each of which corresponds to a unique key value and each of which emits those items from the source Publisher that share that key value@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <K,V> Flowable<GroupedFlowable<K,V>> groupBy(Function<? superT,? extends K> keySelector,Function<? superT,? extends V> valueSelector, boolean delayError, int bufferSize,Function<? superConsumer<Object>,? extendsMap<K,Object>> evictingMapFactory)
Publisher according to a specified criterion, and emits these grouped items asGroupedFlowables. The emittedGroupedFlowable allows only a singleSubscriber during its lifetime and if thisSubscriber cancels before the source terminates, the next emission by the source having the same key will trigger a newGroupedPublisher emission. TheevictingMapFactory is used to create a map that will be used to hold theGroupedFlowables by key. The evicting map created by this factory must notify the providedConsumer<Object> with the entry value (not the key!) when an entry in this map has been evicted. The next source emission will bring about the completion of the evictedGroupedFlowables and the arrival of an item with the same key as a completedGroupedFlowable will prompt the creation and emission of a newGroupedFlowable with that key.A use case for specifying anevictingMapFactory is where the source is infinite and fast and over time the number of keys grows enough to be a concern in terms of the memory footprint of the internal hash map containing theGroupedFlowables.
The map created by anevictingMapFactory must be thread-safe.
An example of anevictingMapFactory usingCacheBuilder from the Guava library is below:
Function<Consumer<Object>, Map<Integer, Object>> evictingMapFactory = notify -> CacheBuilder .newBuilder() .maximumSize(3) .removalListener(entry -> { try { // emit the value not the key! notify.accept(entry.getValue()); } catch (Exception e) { throw new RuntimeException(e); } }) .<Integer, Object> build() .asMap(); // Emit 1000 items but ensure that the // internal map never has more than 3 items in it Flowable .range(1, 1000) // note that number of keys is 10 .groupBy(x -> x % 10, x -> x, true, 16, evictingMapFactory) .flatMap(g -> g) .forEach(System.out::println);
Note: AGroupedFlowable will cache the items it is to emit until such time as it is subscribed to. For this reason, in order to avoid memory leaks, you should not simply ignore thoseGroupedFlowables that do not concern you. Instead, you can signal to them that they may discard their buffers by applying an operator likeignoreElements() to them.
Note that theGroupedFlowables should be subscribed to as soon as possible, otherwise, the unconsumed groups may starve other groups due to the internal backpressure coordination of thegroupBy operator. Such hangs can be usually avoided by usingflatMap(Function, int) orconcatMapEager(Function, int, int) and overriding the default maximum concurrency value to be greater or equal to the expected number of groups, possibly usingInteger.MAX_VALUE if the number of expected groups is unknown.
GroupedFlowables honor backpressure and the sourcePublisher is consumed in a bounded mode (i.e., requested a fixed amount upfront and replenished based on downstream consumption). Note that both the returned and its innerGroupedFlowables use unbounded internal buffers and if the sourcePublisher doesn't honor backpressure, thatmay lead toOutOfMemoryError.groupBy does not operate by default on a particularScheduler.History: 2.1.10 - beta
K - the key typeV - the element typekeySelector - a function that extracts the key for each itemvalueSelector - a function that extracts the return element for each itemdelayError - if true, the exception from the current Flowable is delayed in each group until that specific group emitted the normal values; if false, the exception bypasses values in the groups and is reported immediately.bufferSize - the hint for how manyGroupedFlowables and element in eachGroupedFlowable should be bufferedevictingMapFactory - The factory used to create a map that will be used by the implementation to hold theGroupedFlowables. The evicting map created by this factory must notify the providedConsumer<Object> with the entry value (not the key!) when an entry in this map has been evicted. The next source emission will bring about the completion of the evictedGroupedFlowables. See example above.Publisher that emitsGroupedFlowables, each of which corresponds to a unique key value and each of which emits those items from the source Publisher that share that key value@CheckReturnValue@NonNull@BackpressureSupport(value=ERROR)@SchedulerSupport(value="none")public final <TRight,TLeftEnd,TRightEnd,R> Flowable<R> groupJoin(Publisher<? extends TRight> other,Function<? superT,? extendsPublisher<TLeftEnd>> leftEnd,Function<? super TRight,? extendsPublisher<TRightEnd>> rightEnd,BiFunction<? superT,? superFlowable<TRight>,? extends R> resultSelector)
There are no guarantees in what order the items get combined when multiple items from one or both source Publishers overlap.

Publishers in an unbounded mode (i.e., not applying any backpressure to them).groupJoin does not operate by default on a particularScheduler.TRight - the value type of the right Publisher sourceTLeftEnd - the element type of the left duration PublishersTRightEnd - the element type of the right duration PublishersR - the result typeother - the other Publisher to correlate items from the source Publisher withleftEnd - a function that returns a Publisher whose emissions indicate the duration of the values of the source PublisherrightEnd - a function that returns a Publisher whose emissions indicate the duration of the values of theright PublisherresultSelector - a function that takes an item emitted by each Publisher and returns the value to be emitted by the resulting Publisher@CheckReturnValue@BackpressureSupport(value=PASS_THROUGH)@SchedulerSupport(value="none")public final Flowable<T> hide()
Allows hiding extra features such asProcessor'sSubscriber methods or preventing certain identity-based optimizations (fusion).
hide does not operate by default on a particularScheduler.@CheckReturnValue@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final Completable ignoreElements()
onComplete oronError.
Publisher in an unbounded manner (i.e., no backpressure is applied to it).ignoreElements does not operate by default on a particularScheduler.onComplete oronError, based on which one is called by the source Publisher@CheckReturnValue@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final Single<Boolean> isEmpty()
true if the source Publisher is empty, otherwisefalse. In Rx.Net this is negated as theany Subscriber but we renamed this in RxJava to better match Java naming idioms.

Publisher in an unbounded manner (i.e., without applying backpressure).isEmpty does not operate by default on a particularScheduler.@CheckReturnValue@NonNull@BackpressureSupport(value=ERROR)@SchedulerSupport(value="none")public final <TRight,TLeftEnd,TRightEnd,R> Flowable<R> join(Publisher<? extends TRight> other,Function<? superT,? extendsPublisher<TLeftEnd>> leftEnd,Function<? super TRight,? extendsPublisher<TRightEnd>> rightEnd,BiFunction<? superT,? super TRight,? extends R> resultSelector)
There are no guarantees in what order the items get combined when multiple items from one or both source Publishers overlap.

Publishers in an unbounded mode (i.e., not applying any backpressure to them).join does not operate by default on a particularScheduler.TRight - the value type of the right Publisher sourceTLeftEnd - the element type of the left duration PublishersTRightEnd - the element type of the right duration PublishersR - the result typeother - the second Publisher to join items fromleftEnd - a function to select a duration for each item emitted by the source Publisher, used to determine overlaprightEnd - a function to select a duration for each item emitted by theright Publisher, used to determine overlapresultSelector - a function that computes an item to be emitted by the resulting Publisher for any two overlapping items emitted by the two Publishers@CheckReturnValue@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final Maybe<T> lastElement()

Publisher in an unbounded manner (i.e., without applying backpressure).lastElement does not operate by default on a particularScheduler.@CheckReturnValue@NonNull@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final Single<T> last(T defaultItem)

Publisher in an unbounded manner (i.e., without applying backpressure).last does not operate by default on a particularScheduler.defaultItem - the default item to emit if the source Publisher is empty@CheckReturnValue@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final Single<T> lastOrError()
NoSuchElementException if this Flowable is empty.
Publisher in an unbounded manner (i.e., without applying backpressure).lastOrError does not operate by default on a particularScheduler.@CheckReturnValue@NonNull@BackpressureSupport(value=SPECIAL)@SchedulerSupport(value="none")public final <R> Flowable<R> lift(FlowableOperator<? extends R,? superT> lifter)
Flowable which, when subscribed to, invokes theapply(Subscriber) method of the providedFlowableOperator for each individual downstreamSubscriber and allows the insertion of a custom operator by accessing the downstream'sSubscriber during 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. Generally, such a newSubscriber will wrap the downstream'sSubscriber and forwards theonNext,onError andonComplete events from the upstream directly or according to the emission pattern the custom operator's business logic requires. In addition, such operator can intercept the flow control calls ofcancel andrequest that would have traveled upstream and perform additional actions depending on the same business logic requirements.
Example:
// Step 1: Create the consumer type that will be returned by the FlowableOperator.apply(): public final class CustomSubscriber<T> implements FlowableSubscriber<T>, Subscription { // The downstream's Subscriber that will receive the onXXX events final Subscriber<? super String> downstream; // The connection to the upstream source that will call this class' onXXX methods Subscription upstream; // The constructor takes the downstream subscriber and usually any other parameters public CustomSubscriber(Subscriber<? super String> downstream) { this.downstream = downstream; } // In the subscription phase, the upstream sends a Subscription to this class // and subsequently this class has to send a Subscription to the downstream. // Note that relaying the upstream's Subscription instance directly is not allowed in RxJava @Override public void onSubscribe(Subscription s) { if (upstream != null) { s.cancel(); } else { upstream = s; downstream.onSubscribe(this); } } // The upstream calls this with the next item and the implementation's // responsibility is to emit an item to the downstream based on the intended // business logic, or if it can't do so for the particular item, // request more from the upstream @Override public void onNext(T item) { String str = item.toString(); if (str.length() < 2) { downstream.onNext(str); } else { upstream.request(1); } } // Some operators may handle the upstream's error while others // could just forward it to the downstream. @Override public void onError(Throwable throwable) { downstream.onError(throwable); } // When the upstream completes, usually the downstream should complete as well. @Override public void onComplete() { downstream.onComplete(); } // Some operators have to intercept the downstream's request calls to trigger // the emission of queued items while others can simply forward the request // amount as is. @Override public void request(long n) { upstream.request(n); } // Some operators may use their own resources which should be cleaned up if // the downstream cancels the flow before it completed. Operators without // resources can simply forward the cancellation to the upstream. // In some cases, a canceled flag may be set by this method so that other parts // of this class may detect the cancellation and stop sending events // to the downstream. @Override public void cancel() { upstream.cancel(); } } // Step 2: Create a class that implements the FlowableOperator interface and // returns the custom consumer type from above in its apply() method. // Such class may define additional parameters to be submitted to // the custom consumer type. final class CustomOperator<T> implements FlowableOperator<String> { @Override public Subscriber<? super String> apply(Subscriber<? super T> upstream) { return new CustomSubscriber<T>(upstream); } } // Step 3: Apply the custom operator via lift() in a flow by creating an instance of it // or reusing an existing one. Flowable.range(5, 10) .lift(new CustomOperator<Integer>()) .test() .assertResult("5", "6", "7", "8", "9");Creating custom operators can be complicated and it is recommended one consults theRxJava wiki: Writing operators page about the tools, requirements, rules, considerations and pitfalls of implementing them.
Note that implementing custom operators via thislift() method adds slightly more overhead by requiring an additional allocation and indirection per assembled flows. Instead, extending the abstractFlowable class and creating aFlowableTransformer with it is recommended.
Note also that it is not possible to stop the subscription phase inlift() as theapply() method requires a non-nullSubscriber instance to be returned, which is then unconditionally subscribed to the upstreamFlowable. For example, if the operator decided there is no reason to subscribe to the upstream source because of some optimization possibility or a failure to prepare the operator, it still has to return aSubscriber that should immediately cancel the upstream'sSubscription in itsonSubscribe method. Again, using aFlowableTransformer and extending theFlowable is a better option assubscribeActual(org.reactivestreams.Subscriber<? super T>) can decide to not subscribe to its upstream after all.
Subscriber instance returned by theFlowableOperator is responsible to be backpressure-aware or document the fact that the consumer of the returnedPublisher has to apply one of theonBackpressureXXX operators.lift does not operate by default on a particularScheduler, however, theFlowableOperator may use aScheduler to support its own asynchronous behavior.R - the output value typelifter - theFlowableOperator that receives the downstream'sSubscriber and should return aSubscriber with custom behavior to be used as the consumer for the currentFlowable.compose(FlowableTransformer)@BackpressureSupport(value=SPECIAL)@SchedulerSupport(value="none")@CheckReturnValuepublic final Flowable<T> limit(long count)
The operator requests at most the givencount of items from upstream even if the downstream requests more than that. For example, given alimit(5), if the downstream requests 1, a request of 1 is submitted to the upstream and the operator remembers that only 4 items can be requested now on. A request of 5 at this point will request 4 from the upstream and any subsequent requests will be ignored.
Note that requests are negotiated on an operator boundary andlimit's amount may not be preserved further upstream. For example,source.observeOn(Schedulers.computation()).limit(5) will still request the default (128) elements from the givensource.
The main use of this operator is with sources that are async boundaries that don't interfere with request amounts, such as certainFlowable-based network endpoints that relay downstream request amounts unchanged and are, therefore, prone to trigger excessive item creation/transmission over the network.
count items from the upstream.limit does not operate by default on a particularScheduler.History: 2.1.6 - experimental
count - the maximum number of items and the total request amount, non-negative. Zero will immediately cancel the upstream on subscription and complete the downstream.take(long),rebatchRequests(int)@CheckReturnValue@NonNull@BackpressureSupport(value=PASS_THROUGH)@SchedulerSupport(value="none")public final <R> Flowable<R> map(Function<? superT,? extends R> mapper)

Publisher's backpressure behavior.map does not operate by default on a particularScheduler.R - the output typemapper - a function to apply to each item emitted by the Publisher@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final Flowable<Notification<T>> materialize()
Notification objects.
Publisher. If this expectation is violated, the operatormay throw anIllegalStateException.materialize does not operate by default on a particularScheduler.dematerialize(Function)@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final Flowable<T> mergeWith(Publisher<? extendsT> other)

You can combine items emitted by multiple Publishers so that they appear as a single Publisher, by using themergeWith method.
Publishers are expected to honor backpressure; if violated, the operatormay signalMissingBackpressureException.mergeWith does not operate by default on a particularScheduler.other - a Publisher to be merged@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final Flowable<T> mergeWith(@NonNullSingleSource<? extendsT> other)

The success value of the otherSingleSource can get interleaved at any point of thisFlowable sequence.
SingleSource is emitted only when there is a downstream demand.mergeWith does not operate by default on a particularScheduler.History: 2.1.10 - experimental
other - theSingleSource whose success value to merge with@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final Flowable<T> mergeWith(@NonNullMaybeSource<? extendsT> other)

The success value of the otherMaybeSource can get interleaved at any point of thisFlowable sequence.
MaybeSource is emitted only when there is a downstream demand.mergeWith does not operate by default on a particularScheduler.History: 2.1.10 - experimental
other - theMaybeSource which provides a success value to merge with or completes@CheckReturnValue@NonNull@BackpressureSupport(value=PASS_THROUGH)@SchedulerSupport(value="none")public final Flowable<T> mergeWith(@NonNullCompletableSource other)

Publisher's backpressure behavior.mergeWith does not operate by default on a particularScheduler.History: 2.1.10 - experimental
other - theCompletableSource to await for completion@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="custom")public final Flowable<T> observeOn(Scheduler scheduler)
Scheduler, asynchronously with a bounded buffer ofbufferSize() slots.Note that onError notifications will cut ahead of onNext notifications on the emission thread if Scheduler is truly asynchronous. If strict event ordering is required, consider using theobserveOn(Scheduler, boolean) overload.

This operator keeps emitting as many signals as it can on the given Scheduler's Worker thread, which may result in a longer than expected occupation of this thread. In other terms, it does not allow per-signal fairness in case the worker runs on a shared underlying thread. If such fairness and signal/work interleaving is preferred, use the delay operator with zero time instead.
Publisher. Violating this expectation will lead toMissingBackpressureException. This is the most common operator where the exception pops up; look for sources up the chain that don't support backpressure, such asinterval,timer, {code PublishSubject} orBehaviorSubject and apply any of theonBackpressureXXX operatorsbefore applyingobserveOn itself.Scheduler this operator will use.scheduler - theScheduler to notifySubscribers onSubscribers are notified on the specifiedSchedulersubscribeOn(io.reactivex.Scheduler),observeOn(Scheduler, boolean),observeOn(Scheduler, boolean, int),delay(long, TimeUnit, Scheduler)@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="custom")public final Flowable<T> observeOn(Scheduler scheduler, boolean delayError)
Scheduler, asynchronously with a bounded buffer and optionally delays onError notifications.
This operator keeps emitting as many signals as it can on the given Scheduler's Worker thread, which may result in a longer than expected occupation of this thread. In other terms, it does not allow per-signal fairness in case the worker runs on a shared underlying thread. If such fairness and signal/work interleaving is preferred, use the delay operator with zero time instead.
Publisher. Violating this expectation will lead toMissingBackpressureException. This is the most common operator where the exception pops up; look for sources up the chain that don't support backpressure, such asinterval,timer, {code PublishSubject} orBehaviorSubject and apply any of theonBackpressureXXX operatorsbefore applyingobserveOn itself.Scheduler this operator will use.scheduler - theScheduler to notifySubscribers ondelayError - indicates if the onError notification may not cut ahead of onNext notification on the other side of the scheduling boundary. If true a sequence ending in onError will be replayed in the same order as was received from upstreamSubscribers are notified on the specifiedSchedulersubscribeOn(io.reactivex.Scheduler),observeOn(Scheduler),observeOn(Scheduler, boolean, int),delay(long, TimeUnit, Scheduler, boolean)@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="custom")public final Flowable<T> observeOn(Scheduler scheduler, boolean delayError, int bufferSize)
Scheduler, asynchronously with a bounded buffer of configurable size and optionally delays onError notifications.
This operator keeps emitting as many signals as it can on the given Scheduler's Worker thread, which may result in a longer than expected occupation of this thread. In other terms, it does not allow per-signal fairness in case the worker runs on a shared underlying thread. If such fairness and signal/work interleaving is preferred, use the delay operator with zero time instead.
Publisher. Violating this expectation will lead toMissingBackpressureException. This is the most common operator where the exception pops up; look for sources up the chain that don't support backpressure, such asinterval,timer, {code PublishSubject} orBehaviorSubject and apply any of theonBackpressureXXX operatorsbefore applyingobserveOn itself.Scheduler this operator will use.scheduler - theScheduler to notifySubscribers ondelayError - indicates if the onError notification may not cut ahead of onNext notification on the other side of the scheduling boundary. If true a sequence ending in onError will be replayed in the same order as was received from upstreambufferSize - the size of the buffer.Subscribers are notified on the specifiedSchedulersubscribeOn(io.reactivex.Scheduler),observeOn(Scheduler),observeOn(Scheduler, boolean),delay(long, TimeUnit, Scheduler, boolean)@CheckReturnValue@NonNull@BackpressureSupport(value=PASS_THROUGH)@SchedulerSupport(value="none")public final <U> Flowable<U> ofType(Class<U> clazz)

Publisher's backpressure behavior.ofType does not operate by default on a particularScheduler.U - the output typeclazz - the class type to filter the items emitted by the source Publisherclazz@CheckReturnValue@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final Flowable<T> onBackpressureBuffer()

Publisher in an unbounded manner (i.e., not applying backpressure to it).onBackpressureBuffer does not operate by default on a particularScheduler.@CheckReturnValue@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final Flowable<T> onBackpressureBuffer(boolean delayError)

Publisher in an unbounded manner (i.e., not applying backpressure to it).onBackpressureBuffer does not operate by default on a particularScheduler.delayError - if true, an exception from the current Flowable is delayed until all buffered elements have been consumed by the downstream; if false, an exception is immediately signaled to the downstream, skipping any buffered element@CheckReturnValue@BackpressureSupport(value=ERROR)@SchedulerSupport(value="none")public final Flowable<T> onBackpressureBuffer(int capacity)
BufferOverflowException viaonError as soon as the buffer's capacity is exceeded, dropping all undelivered items, and canceling the source.
Publisher in an unbounded manner (i.e., not applying backpressure to it).onBackpressureBuffer does not operate by default on a particularScheduler.capacity - number of slots available in the buffer.Publisher modified to buffer items up to the given capacity.@CheckReturnValue@BackpressureSupport(value=ERROR)@SchedulerSupport(value="none")public final Flowable<T> onBackpressureBuffer(int capacity, boolean delayError)
BufferOverflowException viaonError as soon as the buffer's capacity is exceeded, dropping all undelivered items, and canceling the source.
Publisher in an unbounded manner (i.e., not applying backpressure to it).onBackpressureBuffer does not operate by default on a particularScheduler.capacity - number of slots available in the buffer.delayError - if true, an exception from the current Flowable is delayed until all buffered elements have been consumed by the downstream; if false, an exception is immediately signaled to the downstream, skipping any buffered elementPublisher modified to buffer items up to the given capacity.@CheckReturnValue@BackpressureSupport(value=SPECIAL)@SchedulerSupport(value="none")public final Flowable<T> onBackpressureBuffer(int capacity, boolean delayError, boolean unbounded)
BufferOverflowException viaonError as soon as the buffer's capacity is exceeded, dropping all undelivered items, and canceling the source.
Publisher in an unbounded manner (i.e., not applying backpressure to it).onBackpressureBuffer does not operate by default on a particularScheduler.capacity - number of slots available in the buffer.delayError - if true, an exception from the current Flowable is delayed until all buffered elements have been consumed by the downstream; if false, an exception is immediately signaled to the downstream, skipping any buffered elementunbounded - if true, the capacity value is interpreted as the internal "island" size of the unbounded bufferPublisher modified to buffer items up to the given capacity.@CheckReturnValue@NonNull@BackpressureSupport(value=SPECIAL)@SchedulerSupport(value="none")public final Flowable<T> onBackpressureBuffer(int capacity, boolean delayError, boolean unbounded,Action onOverflow)
BufferOverflowException viaonError as soon as the buffer's capacity is exceeded, dropping all undelivered items, canceling the source, and notifying the producer withonOverflow.
Publisher in an unbounded manner (i.e., not applying backpressure to it).onBackpressureBuffer does not operate by default on a particularScheduler.capacity - number of slots available in the buffer.delayError - if true, an exception from the current Flowable is delayed until all buffered elements have been consumed by the downstream; if false, an exception is immediately signaled to the downstream, skipping any buffered elementunbounded - if true, the capacity value is interpreted as the internal "island" size of the unbounded bufferonOverflow - action to execute if an item needs to be buffered, but there are no available slots. Null is allowed.Publisher modified to buffer items up to the given capacity@CheckReturnValue@BackpressureSupport(value=ERROR)@SchedulerSupport(value="none")public final Flowable<T> onBackpressureBuffer(int capacity,Action onOverflow)
BufferOverflowException viaonError as soon as the buffer's capacity is exceeded, dropping all undelivered items, canceling the source, and notifying the producer withonOverflow.
Publisher in an unbounded manner (i.e., not applying backpressure to it).onBackpressureBuffer does not operate by default on a particularScheduler.capacity - number of slots available in the buffer.onOverflow - action to execute if an item needs to be buffered, but there are no available slots. Null is allowed.Publisher modified to buffer items up to the given capacity@CheckReturnValue@NonNull@BackpressureSupport(value=SPECIAL)@SchedulerSupport(value="none")public final Flowable<T> onBackpressureBuffer(long capacity,Action onOverflow,BackpressureOverflowStrategy overflowStrategy)
overflowStrategy if the buffer capacity is exceeded.BackpressureOverflow.Strategy.ON_OVERFLOW_ERROR (default) will callonError dropping all undelivered items, canceling the source, and notifying the producer withonOverflow.BackpressureOverflow.Strategy.ON_OVERFLOW_DROP_LATEST will drop any new items emitted by the producer while the buffer is full, without generating anyonError. Each drop will, however, invokeonOverflow to signal the overflow to the producer.BackpressureOverflow.Strategy.ON_OVERFLOW_DROP_OLDEST will drop the oldest items in the buffer in order to make room for newly emitted ones. Overflow will not generate anonError, but each drop will invokeonOverflow to signal the overflow to the producer.
Publisher in an unbounded manner (i.e., not applying backpressure to it).onBackpressureBuffer does not operate by default on a particularScheduler.capacity - number of slots available in the buffer.onOverflow - action to execute if an item needs to be buffered, but there are no available slots. Null is allowed.overflowStrategy - how should thePublisher react to buffer overflows. Null is not allowed.Flowable modified to buffer items up to the given capacity@CheckReturnValue@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final Flowable<T> onBackpressureDrop()

If the downstream request count hits 0 then the Publisher will refrain from callingonNext until the Subscriber invokesrequest(n) again to increase the request count.
Publisher in an unbounded manner (i.e., not applying backpressure to it).onBackpressureDrop does not operate by default on a particularScheduler.onNext notifications on overflow@CheckReturnValue@NonNull@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final Flowable<T> onBackpressureDrop(Consumer<? superT> onDrop)

If the downstream request count hits 0 then the Publisher will refrain from callingonNext until the Subscriber invokesrequest(n) again to increase the request count.
Publisher in an unbounded manner (i.e., not applying backpressure to it).onBackpressureDrop does not operate by default on a particularScheduler.onDrop - the action to invoke for each item dropped. onDrop action should be fast and should never block.onNext notifications on overflow@CheckReturnValue@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final Flowable<T> onBackpressureLatest()

Its behavior is logically equivalent toblockingLatest() with the exception that the downstream is not blocking while requesting more values.
Note that if the upstream Publisher does support backpressure, this operator ignores that capability and doesn't propagate any backpressure requests from downstream.
Note that due to the nature of how backpressure requests are propagated through subscribeOn/observeOn, requesting more than 1 from downstream doesn't guarantee a continuous delivery of onNext events.
Publisher in an unbounded manner (i.e., not applying backpressure to it).onBackpressureLatest does not operate by default on a particularScheduler.@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final Flowable<T> onErrorResumeNext(Function<? superThrowable,? extendsPublisher<? extendsT>> resumeFunction)
onError if it encounters an error.
By default, when a Publisher encounters an error that prevents it from emitting the expected item to itsSubscriber, the Publisher invokes its Subscriber'sonError method, and then quits without invoking any more of its Subscriber's methods. TheonErrorResumeNext method changes this behavior. If you pass a function that returns a Publisher (resumeFunction) toonErrorResumeNext, if the original Publisher encounters an error, instead of invoking its Subscriber'sonError method, it will instead relinquish control to the Publisher returned fromresumeFunction, which will invoke the Subscriber'sonNext method if it is able to do so. In such a case, because no Publisher necessarily invokesonError, the Subscriber may never know that an error happened.
You can use this to prevent errors from propagating or to supply fallback data should errors be encountered.
Publishers are expected to honor backpressure as well. If any of them violate this expectation, the operatormay throw anIllegalStateException when the sourcePublisher completes or aMissingBackpressureException is signaled somewhere downstream.onErrorResumeNext does not operate by default on a particularScheduler.resumeFunction - a function that returns a Publisher that will take over if the source Publisher encounters an error@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final Flowable<T> onErrorResumeNext(Publisher<? extendsT> next)
onError if it encounters an error.
By default, when a Publisher encounters an error that prevents it from emitting the expected item to itsSubscriber, the Publisher invokes its Subscriber'sonError method, and then quits without invoking any more of its Subscriber's methods. TheonErrorResumeNext method changes this behavior. If you pass another Publisher (resumeSequence) to a Publisher'sonErrorResumeNext method, if the original Publisher encounters an error, instead of invoking its Subscriber'sonError method, it will instead relinquish control toresumeSequence which will invoke the Subscriber'sonNext method if it is able to do so. In such a case, because no Publisher necessarily invokesonError, the Subscriber may never know that an error happened.
You can use this to prevent errors from propagating or to supply fallback data should errors be encountered.
Publishers are expected to honor backpressure as well. If any of them violate this expectation, the operatormay throw anIllegalStateException when the sourcePublisher completes orMissingBackpressureException is signaled somewhere downstream.onErrorResumeNext does not operate by default on a particularScheduler.next - the next Publisher source that will take over if the source Publisher encounters an error@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final Flowable<T> onErrorReturn(Function<? superThrowable,? extendsT> valueSupplier)
onError if it encounters an error.
By default, when a Publisher encounters an error that prevents it from emitting the expected item to itsSubscriber, the Publisher invokes its Subscriber'sonError method, and then quits without invoking any more of its Subscriber's methods. TheonErrorReturn method changes this behavior. If you pass a function (resumeFunction) to a Publisher'sonErrorReturn method, if the original Publisher encounters an error, instead of invoking its Subscriber'sonError method, it will instead emit the return value ofresumeFunction.
You can use this to prevent errors from propagating or to supply fallback data should errors be encountered.
Publishers is expected to honor backpressure as well. If it this expectation is violated, the operatormay throwIllegalStateException when the sourcePublisher completes orMissingBackpressureException is signaled somewhere downstream.onErrorReturn does not operate by default on a particularScheduler.valueSupplier - a function that returns a single value that will be emitted along with a regular onComplete in case the current Flowable signals an onError event@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final Flowable<T> onErrorReturnItem(T item)
onError if it encounters an error.
By default, when a Publisher encounters an error that prevents it from emitting the expected item to itsSubscriber, the Publisher invokes its Subscriber'sonError method, and then quits without invoking any more of its Subscriber's methods. TheonErrorReturn method changes this behavior. If you pass a function (resumeFunction) to a Publisher'sonErrorReturn method, if the original Publisher encounters an error, instead of invoking its Subscriber'sonError method, it will instead emit the return value ofresumeFunction.
You can use this to prevent errors from propagating or to supply fallback data should errors be encountered.
Publishers is expected to honor backpressure as well. If it this expectation is violated, the operatormay throwIllegalStateException when the sourcePublisher completes orMissingBackpressureException is signaled somewhere downstream.onErrorReturnItem does not operate by default on a particularScheduler.item - the value that is emitted along with a regular onComplete in case the current Flowable signals an exception@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final Flowable<T> onExceptionResumeNext(Publisher<? extendsT> next)
onError if it encounters anException. This differs fromonErrorResumeNext(io.reactivex.functions.Function<? super java.lang.Throwable, ? extends org.reactivestreams.Publisher<? extends T>>) in that this one does not handleThrowable orError but lets those continue through.

By default, when a Publisher encounters an exception that prevents it from emitting the expected item to itsSubscriber, the Publisher invokes its Subscriber'sonError method, and then quits without invoking any more of its Subscriber's methods. TheonExceptionResumeNext method changes this behavior. If you pass another Publisher (resumeSequence) to a Publisher'sonExceptionResumeNext method, if the original Publisher encounters an exception, instead of invoking its Subscriber'sonError method, it will instead relinquish control toresumeSequence which will invoke the Subscriber'sonNext method if it is able to do so. In such a case, because no Publisher necessarily invokesonError, the Subscriber may never know that an exception happened.
You can use this to prevent exceptions from propagating or to supply fallback data should exceptions be encountered.
Publishers are expected to honor backpressure as well. If any of them violate this expectation, the operatormay throw anIllegalStateException when the sourcePublisher completes orMissingBackpressureException is signaled somewhere downstream.onExceptionResumeNext does not operate by default on a particularScheduler.next - the next Publisher that will take over if the source Publisher encounters an exception@CheckReturnValue@BackpressureSupport(value=PASS_THROUGH)@SchedulerSupport(value="none")public final Flowable<T> onTerminateDetach()
Publisher's backpressure behavior.onTerminateDetach does not operate by default on a particularScheduler.@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")@CheckReturnValuepublic final ParallelFlowable<T> parallel()
Note that the rails don't execute in parallel on their own and one needs to applyParallelFlowable.runOn(Scheduler) to specify the Scheduler where each rail will execute.
To merge the parallel 'rails' back into a single sequence, useParallelFlowable.sequential().

parallel does not operate by default on a particularScheduler.History: 2.0.5 - experimental; 2.1 - beta
@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")@CheckReturnValuepublic final ParallelFlowable<T> parallel(int parallelism)
Note that the rails don't execute in parallel on their own and one needs to applyParallelFlowable.runOn(Scheduler) to specify the Scheduler where each rail will execute.
To merge the parallel 'rails' back into a single sequence, useParallelFlowable.sequential().

parallel does not operate by default on a particularScheduler.History: 2.0.5 - experimental; 2.1 - beta
parallelism - the number of 'rails' to use@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")@CheckReturnValuepublic final ParallelFlowable<T> parallel(int parallelism, int prefetch)
Note that the rails don't execute in parallel on their own and one needs to applyParallelFlowable.runOn(Scheduler) to specify the Scheduler where each rail will execute.
To merge the parallel 'rails' back into a single sequence, useParallelFlowable.sequential().

parallel does not operate by default on a particularScheduler.History: 2.0.5 - experimental; 2.1 - beta
parallelism - the number of 'rails' to useprefetch - the number of items each 'rail' should prefetch@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final ConnectableFlowable<T> publish()
ConnectableFlowable, which is a variety of Publisher that waits until itsconnect method is called before it begins emitting items to thoseSubscribers that have subscribed to it.
ConnectableFlowable honors backpressure for each of itsSubscribers and expects the sourcePublisher to honor backpressure as well. If this expectation is violated, the operator will signal aMissingBackpressureException to itsSubscribers and disconnect.publish does not operate by default on a particularScheduler.ConnectableFlowable that upon connection causes the source Publisher to emit items to itsSubscribers@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <R> Flowable<R> publish(Function<? superFlowable<T>,? extendsPublisher<R>> selector)
ConnectableFlowable that shares a single subscription to the underlying sequence.
Publisher to honor backpressure and if this expectation is violated, the operator will signal aMissingBackpressureException through thePublisher provided to the function. Since thePublisher returned by theselector may be independent of the providedPublisher to the function, the output's backpressure behavior is determined by this returnedPublisher.publish does not operate by default on a particularScheduler.R - the type of items emitted by the resulting Publisherselector - a function that can use the multicasted source sequence as many times as needed, without causing multiple subscriptions to the source sequence. Subscribers to the given source will receive all notifications of the source from the time of the subscription forward.ConnectableFlowable that shares a single subscription to the underlying sequence@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <R> Flowable<R> publish(Function<? superFlowable<T>,? extendsPublisher<? extends R>> selector, int prefetch)
ConnectableFlowable that shares a single subscription to the underlying sequence.
Publisher to honor backpressure and if this expectation is violated, the operator will signal aMissingBackpressureException through thePublisher provided to the function. Since thePublisher returned by theselector may be independent of the providedPublisher to the function, the output's backpressure behavior is determined by this returnedPublisher.publish does not operate by default on a particularScheduler.R - the type of items emitted by the resulting Publisherselector - a function that can use the multicasted source sequence as many times as needed, without causing multiple subscriptions to the source sequence. Subscribers to the given source will receive all notifications of the source from the time of the subscription forward.prefetch - the number of elements to prefetch from the current FlowableConnectableFlowable that shares a single subscription to the underlying sequence@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final ConnectableFlowable<T> publish(int bufferSize)
ConnectableFlowable, which is a variety of Publisher that waits until itsconnect method is called before it begins emitting items to thoseSubscribers that have subscribed to it.
ConnectableFlowable honors backpressure for each of itsSubscribers and expects the sourcePublisher to honor backpressure as well. If this expectation is violated, the operator will signal aMissingBackpressureException to itsSubscribers and disconnect.publish does not operate by default on a particularScheduler.bufferSize - the number of elements to prefetch from the current FlowableConnectableFlowable that upon connection causes the source Publisher to emit items to itsSubscribers@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final Flowable<T> rebatchRequests(int n)
n initially from the upstream and then 75% ofn subsequently after 75% ofn values have been emitted to the downstream.This operator allows preventing the downstream to trigger unbounded mode viarequest(Long.MAX_VALUE) or compensate for the per-item overhead of small and frequent requests.
rebatchRequests does not operate by default on a particularScheduler.n - the initial request amount, further request will happen after 75% of this value@CheckReturnValue@NonNull@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final Maybe<T> reduce(BiFunction<T,T,T> reducer)

This technique, which is called "reduce" here, is sometimes called "aggregate," "fold," "accumulate," "compress," or "inject" in other programming contexts. Groovy, for instance, has aninject method that does a similar operation on lists.
Note that this operator requires the upstream to signalonComplete for the accumulator object to be emitted. Sources that are infinite and never complete will never emit anything through this operator and an infinite source may lead to a fatalOutOfMemoryError.
reduce does not operate by default on a particularScheduler.reducer - an accumulator function to be invoked on each item emitted by the source Publisher, whose result will be used in the next accumulator call@CheckReturnValue@NonNull@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final <R> Single<R> reduce(R seed,BiFunction<R,? superT,R> reducer)

This technique, which is called "reduce" here, is sometimes called "aggregate," "fold," "accumulate," "compress," or "inject" in other programming contexts. Groovy, for instance, has aninject method that does a similar operation on lists.
Note that theseed is shared among all subscribers to the resulting Publisher and may cause problems if it is mutable. To make sure each subscriber gets its own value, defer the application of this operator viadefer(Callable):
Publisher<T> source = ... Single.defer(() -> source.reduce(new ArrayList<>(), (list, item) -> list.add(item))); // alternatively, by using compose to stay fluent source.compose(o -> Flowable.defer(() -> o.reduce(new ArrayList<>(), (list, item) -> list.add(item)).toFlowable()) ).firstOrError(); // or, by using reduceWith instead of reduce source.reduceWith(() -> new ArrayList<>(), (list, item) -> list.add(item))); Note that this operator requires the upstream to signalonComplete for the accumulator object to be emitted. Sources that are infinite and never complete will never emit anything through this operator and an infinite source may lead to a fatalOutOfMemoryError.
reduce does not operate by default on a particularScheduler.R - the accumulator and output value typeseed - the initial (seed) accumulator valuereducer - an accumulator function to be invoked on each item emitted by the source Publisher, the result of which will be used in the next accumulator callreduceWith(Callable, BiFunction)@CheckReturnValue@NonNull@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final <R> Single<R> reduceWith(Callable<R> seedSupplier,BiFunction<R,? superT,R> reducer)

This technique, which is called "reduce" here, is sometimes called "aggregate," "fold," "accumulate," "compress," or "inject" in other programming contexts. Groovy, for instance, has aninject method that does a similar operation on lists.
Note that this operator requires the upstream to signalonComplete for the accumulator object to be emitted. Sources that are infinite and never complete will never emit anything through this operator and an infinite source may lead to a fatalOutOfMemoryError.
reduceWith does not operate by default on a particularScheduler.R - the accumulator and output value typeseedSupplier - the Callable that provides the initial (seed) accumulator value for each individual Subscriberreducer - an accumulator function to be invoked on each item emitted by the source Publisher, the result of which will be used in the next accumulator call@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final Flowable<T> repeat()

Publisher to honor backpressure as well. If this expectation is violated, the operatormay throw anIllegalStateException.repeat does not operate by default on a particularScheduler.@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final Flowable<T> repeat(long times)
count times.
Publisher to honor backpressure as well. If this expectation is violated, the operatormay throw anIllegalStateException.repeat does not operate by default on a particularScheduler.times - the number of times the source Publisher items are repeated, a count of 0 will yield an empty sequencecount timesIllegalArgumentException - ifcount is less than zero@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final Flowable<T> repeatUntil(BooleanSupplier stop)

Publisher to honor backpressure as well. If this expectation is violated, the operatormay throw anIllegalStateException.repeatUntil does not operate by default on a particularScheduler.stop - a boolean supplier that is called when the current Flowable completes and unless it returns false, the current Flowable is resubscribedNullPointerException - ifstop is null@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final Flowable<T> repeatWhen(Function<? superFlowable<Object>,? extendsPublisher<?>> handler)
onComplete. AnonComplete notification from the source will result in the emission of avoid item to the Publisher provided as an argument to thenotificationHandler function. If that Publisher callsonComplete oronError thenrepeatWhen will callonComplete oronError on the child subscription. Otherwise, this Publisher will resubscribe to the source Publisher.
Publisher to honor backpressure as well. If this expectation is violated, the operatormay throw anIllegalStateException.repeatWhen does not operate by default on a particularScheduler.handler - receives a Publisher of notifications with which a user can complete or error, aborting the repeat.@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final ConnectableFlowable<T> replay()
ConnectableFlowable that shares a single subscription to the underlying Publisher that will replay all of its items and notifications to any futureSubscriber. A Connectable Publisher resembles an ordinary Publisher, except that it does not begin emitting items when it is subscribed to, but only when itsconnect method is called.
replay does not operate by default on a particularScheduler.ConnectableFlowable that upon connection causes the source Publisher to emit its items to itsSubscribers@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <R> Flowable<R> replay(Function<? superFlowable<T>,? extendsPublisher<R>> selector)
ConnectableFlowable that shares a single subscription to the source Publisher.
replay does not operate by default on a particularScheduler.R - the type of items emitted by the resulting Publisherselector - the selector function, which can use the multicasted sequence as many times as needed, without causing multiple subscriptions to the PublisherConnectableFlowable that shares a single subscription to the source Publisher@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <R> Flowable<R> replay(Function<? superFlowable<T>,? extendsPublisher<R>> selector, int bufferSize)
ConnectableFlowable that shares a single subscription to the source Publisher, replayingbufferSize notifications. Note that due to concurrency requirements,replay(bufferSize) may hold strong references to more thanbufferSize source emissions.

replay does not operate by default on a particularScheduler.R - the type of items emitted by the resulting Publisherselector - the selector function, which can use the multicasted sequence as many times as needed, without causing multiple subscriptions to the PublisherbufferSize - the buffer size that limits the number of items the connectable Publisher can replayConnectableFlowable that shares a single subscription to the source Publisher replaying no more thanbufferSize items@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="io.reactivex:computation")public final <R> Flowable<R> replay(Function<? superFlowable<T>,? extendsPublisher<R>> selector, int bufferSize, long time,TimeUnit unit)
ConnectableFlowable that shares a single subscription to the source Publisher, replaying no more thanbufferSize items that were emitted within a specified time window. Note that due to concurrency requirements,replay(bufferSize) may hold strong references to more thanbufferSize source emissions.

replay operates by default on thecomputationScheduler.R - the type of items emitted by the resulting Publisherselector - a selector function, which can use the multicasted sequence as many times as needed, without causing multiple subscriptions to the PublisherbufferSize - the buffer size that limits the number of items the connectable Publisher can replaytime - the duration of the window in which the replayed items must have been emittedunit - the time unit oftimeConnectableFlowable that shares a single subscription to the source Publisher, and replays no more thanbufferSize items that were emitted within the window defined bytime@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="custom")public final <R> Flowable<R> replay(Function<? superFlowable<T>,? extendsPublisher<R>> selector, int bufferSize, long time,TimeUnit unit,Scheduler scheduler)
ConnectableFlowable that shares a single subscription to the source Publisher, replaying no more thanbufferSize items that were emitted within a specified time window. Note that due to concurrency requirements,replay(bufferSize) may hold strong references to more thanbufferSize source emissions.

Scheduler this operator will use.R - the type of items emitted by the resulting Publisherselector - a selector function, which can use the multicasted sequence as many times as needed, without causing multiple subscriptions to the PublisherbufferSize - the buffer size that limits the number of items the connectable Publisher can replaytime - the duration of the window in which the replayed items must have been emittedunit - the time unit oftimescheduler - the Scheduler that is the time source for the windowConnectableFlowable that shares a single subscription to the source Publisher, and replays no more thanbufferSize items that were emitted within the window defined bytimeIllegalArgumentException - ifbufferSize is less than zero@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="custom")public final <R> Flowable<R> replay(Function<? superFlowable<T>,? extendsPublisher<R>> selector, int bufferSize,Scheduler scheduler)
ConnectableFlowable that shares a single subscription to the source Publisher, replaying a maximum ofbufferSize items. Note that due to concurrency requirements,replay(bufferSize) may hold strong references to more thanbufferSize source emissions.

Scheduler this operator will use.R - the type of items emitted by the resulting Publisherselector - a selector function, which can use the multicasted sequence as many times as needed, without causing multiple subscriptions to the PublisherbufferSize - the buffer size that limits the number of items the connectable Publisher can replayscheduler - the Scheduler on which the replay is observedConnectableFlowable that shares a single subscription to the source Publisher, replaying no more thanbufferSize notifications@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="io.reactivex:computation")public final <R> Flowable<R> replay(Function<? superFlowable<T>,? extendsPublisher<R>> selector, long time,TimeUnit unit)
ConnectableFlowable that shares a single subscription to the source Publisher, replaying all items that were emitted within a specified time window.
replay operates by default on thecomputationScheduler.R - the type of items emitted by the resulting Publisherselector - a selector function, which can use the multicasted sequence as many times as needed, without causing multiple subscriptions to the Publishertime - the duration of the window in which the replayed items must have been emittedunit - the time unit oftimeConnectableFlowable that shares a single subscription to the source Publisher, replaying all items that were emitted within the window defined bytime@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="custom")public final <R> Flowable<R> replay(Function<? superFlowable<T>,? extendsPublisher<R>> selector, long time,TimeUnit unit,Scheduler scheduler)
ConnectableFlowable that shares a single subscription to the source Publisher, replaying all items that were emitted within a specified time window.
Scheduler this operator will use.R - the type of items emitted by the resulting Publisherselector - a selector function, which can use the multicasted sequence as many times as needed, without causing multiple subscriptions to the Publishertime - the duration of the window in which the replayed items must have been emittedunit - the time unit oftimescheduler - the scheduler that is the time source for the windowConnectableFlowable that shares a single subscription to the source Publisher, replaying all items that were emitted within the window defined bytime@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="custom")public final <R> Flowable<R> replay(Function<? superFlowable<T>,? extendsPublisher<R>> selector,Scheduler scheduler)
ConnectableFlowable that shares a single subscription to the source Publisher.
Scheduler this operator will use.R - the type of items emitted by the resulting Publisherselector - a selector function, which can use the multicasted sequence as many times as needed, without causing multiple subscriptions to the Publisherscheduler - the Scheduler where the replay is observedConnectableFlowable that shares a single subscription to the source Publisher, replaying all items@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final ConnectableFlowable<T> replay(int bufferSize)
ConnectableFlowable that shares a single subscription to the source Publisher that replays at mostbufferSize items emitted by that Publisher. A Connectable Publisher resembles an ordinary Publisher, except that it does not begin emitting items when it is subscribed to, but only when itsconnect method is called. Note that due to concurrency requirements,replay(bufferSize) may hold strong references to more thanbufferSize source emissions.

replay does not operate by default on a particularScheduler.bufferSize - the buffer size that limits the number of items that can be replayedConnectableFlowable that shares a single subscription to the source Publisher and replays at mostbufferSize items emitted by that Publisher@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="io.reactivex:computation")public final ConnectableFlowable<T> replay(int bufferSize, long time,TimeUnit unit)
ConnectableFlowable that shares a single subscription to the source Publisher and replays at mostbufferSize items that were emitted during a specified time window. A Connectable Publisher resembles an ordinary Publisher, except that it does not begin emitting items when it is subscribed to, but only when itsconnect method is called. Note that due to concurrency requirements,replay(bufferSize) may hold strong references to more thanbufferSize source emissions.

replay operates by default on thecomputationScheduler.bufferSize - the buffer size that limits the number of items that can be replayedtime - the duration of the window in which the replayed items must have been emittedunit - the time unit oftimeConnectableFlowable that shares a single subscription to the source Publisher and replays at mostbufferSize items that were emitted during the window defined bytime@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="custom")public final ConnectableFlowable<T> replay(int bufferSize, long time,TimeUnit unit,Scheduler scheduler)
ConnectableFlowable that shares a single subscription to the source Publisher and that replays a maximum ofbufferSize items that are emitted within a specified time window. A Connectable Publisher resembles an ordinary Publisher, except that it does not begin emitting items when it is subscribed to, but only when itsconnect method is called. Note that due to concurrency requirements,replay(bufferSize) may hold strong references to more thanbufferSize source emissions.

Scheduler this operator will use.bufferSize - the buffer size that limits the number of items that can be replayedtime - the duration of the window in which the replayed items must have been emittedunit - the time unit oftimescheduler - the scheduler that is used as a time source for the windowConnectableFlowable that shares a single subscription to the source Publisher and replays at mostbufferSize items that were emitted during the window defined bytimeIllegalArgumentException - ifbufferSize is less than zero@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="custom")public final ConnectableFlowable<T> replay(int bufferSize,Scheduler scheduler)
ConnectableFlowable that shares a single subscription to the source Publisher and replays at mostbufferSize items emitted by that Publisher. A Connectable Publisher resembles an ordinary Publisher, except that it does not begin emitting items when it is subscribed to, but only when itsconnect method is called. Note that due to concurrency requirements,replay(bufferSize) may hold strong references to more thanbufferSize source emissions.

Scheduler this operator will use.bufferSize - the buffer size that limits the number of items that can be replayedscheduler - the scheduler on which the Subscribers will observe the emitted itemsConnectableFlowable that shares a single subscription to the source Publisher and replays at mostbufferSize items that were emitted by the Publisher@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="io.reactivex:computation")public final ConnectableFlowable<T> replay(long time,TimeUnit unit)
ConnectableFlowable that shares a single subscription to the source Publisher and replays all items emitted by that Publisher within a specified time window. A Connectable Publisher resembles an ordinary Publisher, except that it does not begin emitting items when it is subscribed to, but only when itsconnect method is called.
replay operates by default on thecomputationScheduler.time - the duration of the window in which the replayed items must have been emittedunit - the time unit oftimeConnectableFlowable that shares a single subscription to the source Publisher and replays the items that were emitted during the window defined bytime@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="custom")public final ConnectableFlowable<T> replay(long time,TimeUnit unit,Scheduler scheduler)
ConnectableFlowable that shares a single subscription to the source Publisher and replays all items emitted by that Publisher within a specified time window. A Connectable Publisher resembles an ordinary Publisher, except that it does not begin emitting items when it is subscribed to, but only when itsconnect method is called.
Scheduler this operator will use.time - the duration of the window in which the replayed items must have been emittedunit - the time unit oftimescheduler - the Scheduler that is the time source for the windowConnectableFlowable that shares a single subscription to the source Publisher and replays the items that were emitted during the window defined bytime@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="custom")public final ConnectableFlowable<T> replay(Scheduler scheduler)
ConnectableFlowable that shares a single subscription to the source Publisher that will replay all of its items and notifications to any futureSubscriber on the givenScheduler. A Connectable Publisher resembles an ordinary Publisher, except that it does not begin emitting items when it is subscribed to, but only when itsconnect method is called.
Scheduler this operator will use.scheduler - the Scheduler on which the Subscribers will observe the emitted itemsConnectableFlowable that shares a single subscription to the source Publisher that will replay all of its items and notifications to any futureSubscriber on the givenScheduler@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final Flowable<T> retry()
onError (infinite retry count).
If the source Publisher callsSubscriber.onError(java.lang.Throwable), this method will resubscribe to the source Publisher rather than propagating theonError call.
Any and all items emitted by the source Publisher will be emitted by the resulting Publisher, even those emitted during failed subscriptions. For example, if a Publisher fails at first but emits[1, 2] then succeeds the second time and emits[1, 2, 3, 4, 5] then the complete sequence of emissions and notifications would be[1, 2, 1, 2, 3, 4, 5, onComplete].
Publisher to honor backpressure as well. If this expectation is violated, the operatormay throw anIllegalStateException.retry does not operate by default on a particularScheduler.@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final Flowable<T> retry(BiPredicate<? superInteger,? superThrowable> predicate)
onError and the predicate returns true for that specific exception and retry count.
Publisher to honor backpressure as well. If this expectation is violated, the operatormay throw anIllegalStateException.retry does not operate by default on a particularScheduler.predicate - the predicate that determines if a resubscription may happen in case of a specific exception and retry countretry(),ReactiveX operators documentation: Retry@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final Flowable<T> retry(long count)
onError up to a specified number of retries.
If the source Publisher callsSubscriber.onError(java.lang.Throwable), this method will resubscribe to the source Publisher for a maximum ofcount resubscriptions rather than propagating theonError call.
Any and all items emitted by the source Publisher will be emitted by the resulting Publisher, even those emitted during failed subscriptions. For example, if a Publisher fails at first but emits[1, 2] then succeeds the second time and emits[1, 2, 3, 4, 5] then the complete sequence of emissions and notifications would be[1, 2, 1, 2, 3, 4, 5, onComplete].
Publisher to honor backpressure as well. If this expectation is violated, the operatormay throw anIllegalStateException.retry does not operate by default on a particularScheduler.count - the number of times to resubscribe if the current Flowable fails@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final Flowable<T> retry(long times,Predicate<? superThrowable> predicate)
Publisher to honor backpressure as well. If this expectation is violated, the operatormay throw anIllegalStateException.retry does not operate by default on a particularScheduler.times - the number of times to resubscribe if the current Flowable failspredicate - the predicate called with the failure Throwable and should return true to trigger a retry.@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final Flowable<T> retry(Predicate<? superThrowable> predicate)
Publisher to honor backpressure as well. If this expectation is violated, the operatormay throw anIllegalStateException.retry does not operate by default on a particularScheduler.predicate - the predicate that receives the failure Throwable and should return true to trigger a retry.@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final Flowable<T> retryUntil(BooleanSupplier stop)
Publisher to honor backpressure as well. If this expectation is violated, the operatormay throw anIllegalStateException.retryUntil does not operate by default on a particularScheduler.stop - the function that should return true to stop retrying@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final Flowable<T> retryWhen(Function<? superFlowable<Throwable>,? extendsPublisher<?>> handler)
onError. AnonError notification from the source will result in the emission of aThrowable item to the Publisher provided as an argument to thenotificationHandler function. If that Publisher callsonComplete oronError thenretry will callonComplete oronError on the child subscription. Otherwise, this Publisher will resubscribe to the source Publisher.
Example: This retries 3 times, each time incrementing the number of seconds it waits.
Flowable.create((FlowableEmitter<? super String> s) -> { System.out.println("subscribing"); s.onError(new RuntimeException("always fails")); }, BackpressureStrategy.BUFFER).retryWhen(attempts -> { return attempts.zipWith(Flowable.range(1, 3), (n, i) -> i).flatMap(i -> { System.out.println("delay retry by " + i + " second(s)"); return Flowable.timer(i, TimeUnit.SECONDS); }); }).blockingForEach(System.out::println); Output is: subscribing delay retry by 1 second(s) subscribing delay retry by 2 second(s) subscribing delay retry by 3 second(s) subscribing Note that the innerPublisher returned by the handler function should signal eitheronNext,onError oronComplete in response to the receivedThrowable to indicate the operator should retry or terminate. If the upstream to the operator is asynchronous, signaling onNext followed by onComplete immediately may result in the sequence to be completed immediately. Similarly, if this innerPublisher signalsonError oronComplete while the upstream is active, the sequence is terminated with the same signal immediately.
The following example demonstrates how to retry an asynchronous source with a delay:
Flowable.timer(1, TimeUnit.SECONDS) .doOnSubscribe(s -> System.out.println("subscribing")) .map(v -> { throw new RuntimeException(); }) .retryWhen(errors -> { AtomicInteger counter = new AtomicInteger(); return errors .takeWhile(e -> counter.getAndIncrement() != 3) .flatMap(e -> { System.out.println("delay retry by " + counter.get() + " second(s)"); return Flowable.timer(counter.get(), TimeUnit.SECONDS); }); }) .blockingSubscribe(System.out::println, System.out::println);Publishers to honor backpressure as well. If this expectation is violated, the operatormay throw anIllegalStateException.retryWhen does not operate by default on a particularScheduler.handler - receives a Publisher of notifications with which a user can complete or error, aborting the retry@BackpressureSupport(value=PASS_THROUGH)@SchedulerSupport(value="none")public final void safeSubscribe(Subscriber<? superT> s)
safeSubscribe does not operate by default on a particularScheduler.s - the incoming Subscriber instanceNullPointerException - if s is null@CheckReturnValue@BackpressureSupport(value=ERROR)@SchedulerSupport(value="io.reactivex:computation")public final Flowable<T> sample(long period,TimeUnit unit)

sample operates by default on thecomputationScheduler.period - the sampling rateunit - theTimeUnit in whichperiod is definedthrottleLast(long, TimeUnit)@CheckReturnValue@BackpressureSupport(value=ERROR)@SchedulerSupport(value="io.reactivex:computation")public final Flowable<T> sample(long period,TimeUnit unit, boolean emitLast)

sample operates by default on thecomputationScheduler.History: 2.0.5 - experimental
period - the sampling rateunit - theTimeUnit in whichperiod is definedemitLast - if true and the upstream completes while there is still an unsampled item available, that item is emitted to downstream before completion if false, an unsampled last item is ignored.throttleLast(long, TimeUnit)@CheckReturnValue@NonNull@BackpressureSupport(value=ERROR)@SchedulerSupport(value="custom")public final Flowable<T> sample(long period,TimeUnit unit,Scheduler scheduler)

Scheduler this operator will use.period - the sampling rateunit - theTimeUnit in whichperiod is definedscheduler - theScheduler to use when samplingthrottleLast(long, TimeUnit, Scheduler)@CheckReturnValue@NonNull@BackpressureSupport(value=ERROR)@SchedulerSupport(value="custom")public final Flowable<T> sample(long period,TimeUnit unit,Scheduler scheduler, boolean emitLast)

Scheduler this operator will use.History: 2.0.5 - experimental
period - the sampling rateunit - theTimeUnit in whichperiod is definedscheduler - theScheduler to use when samplingemitLast - if true and the upstream completes while there is still an unsampled item available, that item is emitted to downstream before completion if false, an unsampled last item is ignored.throttleLast(long, TimeUnit, Scheduler)@CheckReturnValue@NonNull@BackpressureSupport(value=ERROR)@SchedulerSupport(value="none")public final <U> Flowable<T> sample(Publisher<U> sampler)
sampler Publisher emits an item or completes, emits the most recently emitted item (if any) emitted by the source Publisher since the previous emission from thesampler Publisher.
sampler Publisher to control data flow.sample does not operate by default on a particularScheduler.U - the element type of the sampler Publishersampler - the Publisher to use for sampling the source Publishersampler Publisher emits an item or completes@CheckReturnValue@NonNull@BackpressureSupport(value=ERROR)@SchedulerSupport(value="none")public final <U> Flowable<T> sample(Publisher<U> sampler, boolean emitLast)
sampler Publisher emits an item or completes, emits the most recently emitted item (if any) emitted by the source Publisher since the previous emission from thesampler Publisher and optionally emit the very last upstream item when the upstream or other Publisher complete.
sampler Publisher to control data flow.sample does not operate by default on a particularScheduler.History: 2.0.5 - experimental
U - the element type of the sampler Publishersampler - the Publisher to use for sampling the source PublisheremitLast - if true and the upstream completes while there is still an unsampled item available, that item is emitted to downstream before completion if false, an unsampled last item is ignored.sampler Publisher emits an item or completes@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final Flowable<T> scan(BiFunction<T,T,T> accumulator)

This sort of function is sometimes called an accumulator.
Publisher to honor backpressure as well. Violating this expectation, aMissingBackpressureExceptionmay get signaled somewhere downstream.scan does not operate by default on a particularScheduler.accumulator - an accumulator function to be invoked on each item emitted by the source Publisher, whose result will be emitted toSubscribers viaonNext and used in the next accumulator call@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <R> Flowable<R> scan(R initialValue,BiFunction<R,? superT,R> accumulator)

This sort of function is sometimes called an accumulator.
Note that the Publisher that results from this method will emitinitialValue as its first emitted item.
Note that theinitialValue is shared among all subscribers to the resulting Publisher and may cause problems if it is mutable. To make sure each subscriber gets its own value, defer the application of this operator viadefer(Callable):
Publisher<T> source = ... Flowable.defer(() -> source.scan(new ArrayList<>(), (list, item) -> list.add(item))); // alternatively, by using compose to stay fluent source.compose(o -> Flowable.defer(() -> o.scan(new ArrayList<>(), (list, item) -> list.add(item))) );Publisher to honor backpressure as well. Violating this expectation, aMissingBackpressureExceptionmay get signaled somewhere downstream.scan does not operate by default on a particularScheduler.R - the initial, accumulator and result typeinitialValue - the initial (seed) accumulator itemaccumulator - an accumulator function to be invoked on each item emitted by the source Publisher, whose result will be emitted toSubscribers viaonNext and used in the next accumulator callinitialValue followed by the results of each call to the accumulator function@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <R> Flowable<R> scanWith(Callable<R> seedSupplier,BiFunction<R,? superT,R> accumulator)

This sort of function is sometimes called an accumulator.
Note that the Publisher that results from this method will emit the value returned by theseedSupplier as its first item.
Publisher to honor backpressure as well. Violating this expectation, aMissingBackpressureExceptionmay get signaled somewhere downstream.scanWith does not operate by default on a particularScheduler.R - the initial, accumulator and result typeseedSupplier - a Callable that returns the initial (seed) accumulator item for each individual Subscriberaccumulator - an accumulator function to be invoked on each item emitted by the source Publisher, whose result will be emitted toSubscribers viaonNext and used in the next accumulator callinitialValue followed by the results of each call to the accumulator function@CheckReturnValue@BackpressureSupport(value=PASS_THROUGH)@SchedulerSupport(value="none")public final Flowable<T> serialize()
It is possible for a Publisher to invoke its Subscribers' methods asynchronously, perhaps from different threads. This could make such a Publisher poorly-behaved, in that it might try to invokeonComplete oronError before one of itsonNext invocations, or it might callonNext from two different threads concurrently. You can force such a Publisher to be well-behaved and sequential by applying theserialize method to it.

Publisher's backpressure behavior.serialize does not operate by default on a particularScheduler.Publisher that is guaranteed to be well-behaved and to make only serialized calls to its Subscribers@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final Flowable<T> share()
Publisher that multicasts (and shares a single subscription to) the originalPublisher. As long as there is at least oneSubscriber thisPublisher will be subscribed and emitting data. When all subscribers have canceled it will cancel the sourcePublisher. This is an alias forpublish().refCount().

Publisher to honor backpressure as well. If this expectation is violated, the operator will signal aMissingBackpressureException to itsSubscribers.share does not operate by default on a particularScheduler.Publisher that upon connection causes the sourcePublisher to emit items to itsSubscribers@CheckReturnValue@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final Maybe<T> singleElement()
IllegalArgumentException if this Flowable signals more than one item.
Publisher in an unbounded manner (i.e., without applying backpressure).singleElement does not operate by default on a particularScheduler.@CheckReturnValue@NonNull@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final Single<T> single(T defaultItem)
IllegalArgumentException is signaled instead.
Publisher in an unbounded manner (i.e., without applying backpressure).single does not operate by default on a particularScheduler.defaultItem - a default value to emit if the source Publisher emits no item@CheckReturnValue@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final Single<T> singleOrError()
NoSuchElementException will be signaled and if this Flowable emits more than one item, anIllegalArgumentException will be signaled.
Publisher in an unbounded manner (i.e., without applying backpressure).singleOrError does not operate by default on a particularScheduler.@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final Flowable<T> skip(long count)
count items emitted by the source Publisher and emits the remainder.
Publisher's backpressure behavior.skip does not operate by default on a particularScheduler.count - the number of items to skipcount items that the source Publisher emits@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final Flowable<T> skip(long time,TimeUnit unit)

Publisher in an unbounded manner (i.e., no backpressure applied to it).skip does not operate on any particular scheduler but uses the current time from thecomputationScheduler.time - the length of the time window to skipunit - the time unit oftimetime elapses and the emits the remainder@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="custom")public final Flowable<T> skip(long time,TimeUnit unit,Scheduler scheduler)
Scheduler elapses.
Publisher in an unbounded manner (i.e., no backpressure applied to it).Scheduler this operator will use for the timed skippingtime - the length of the time window to skipunit - the time unit oftimescheduler - theScheduler on which the timed wait happenstime andscheduler elapses, and then emits the remainder@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final Flowable<T> skipLast(int count)

This Subscriber accumulates a queue long enough to store the firstcount items. As more items are received, items are taken from the front of the queue and emitted by the returned Publisher. This causes such items to be delayed.
Publisher's backpressure behavior.skipLast does not operate by default on a particularScheduler.count - number of items to drop from the end of the source sequenceIndexOutOfBoundsException - ifcount is less than zero@CheckReturnValue@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final Flowable<T> skipLast(long time,TimeUnit unit)

Note: this action will cache the latest items arriving in the specified time window.
Publisher in an unbounded manner (i.e., no backpressure applied to it).skipLast does not operate on any particular scheduler but uses the current time from thecomputationScheduler.time - the length of the time windowunit - the time unit oftimetime@CheckReturnValue@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final Flowable<T> skipLast(long time,TimeUnit unit, boolean delayError)

Note: this action will cache the latest items arriving in the specified time window.
Publisher in an unbounded manner (i.e., no backpressure applied to it).skipLast does not operate on any particular scheduler but uses the current time from thecomputationScheduler.time - the length of the time windowunit - the time unit oftimedelayError - if true, an exception signaled by the current Flowable is delayed until the regular elements are consumed by the downstream; if false, an exception is immediately signaled and all regular elements droppedtime@CheckReturnValue@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="custom")public final Flowable<T> skipLast(long time,TimeUnit unit,Scheduler scheduler)

Note: this action will cache the latest items arriving in the specified time window.
Publisher in an unbounded manner (i.e., no backpressure applied to it).Scheduler this operator will use for tracking the current timetime - the length of the time windowunit - the time unit oftimescheduler - the scheduler used as the time sourcetime andscheduler@CheckReturnValue@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="custom")public final Flowable<T> skipLast(long time,TimeUnit unit,Scheduler scheduler, boolean delayError)

Note: this action will cache the latest items arriving in the specified time window.
Publisher in an unbounded manner (i.e., no backpressure applied to it).Scheduler this operator will use to track the current timetime - the length of the time windowunit - the time unit oftimescheduler - the scheduler used as the time sourcedelayError - if true, an exception signaled by the current Flowable is delayed until the regular elements are consumed by the downstream; if false, an exception is immediately signaled and all regular elements droppedtime andscheduler@CheckReturnValue@NonNull@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="custom")public final Flowable<T> skipLast(long time,TimeUnit unit,Scheduler scheduler, boolean delayError, int bufferSize)

Note: this action will cache the latest items arriving in the specified time window.
Publisher in an unbounded manner (i.e., no backpressure applied to it).Scheduler this operator will use.time - the length of the time windowunit - the time unit oftimescheduler - the scheduler used as the time sourcedelayError - if true, an exception signaled by the current Flowable is delayed until the regular elements are consumed by the downstream; if false, an exception is immediately signaled and all regular elements droppedbufferSize - the hint about how many elements to expect to be skippedtime andscheduler@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <U> Flowable<T> skipUntil(Publisher<U> other)

Publisher's backpressure behavior.skipUntil does not operate by default on a particularScheduler.U - the element type of the other Publisherother - the second Publisher that has to emit an item before the source Publisher's elements begin to be mirrored by the resulting Publisher@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final Flowable<T> skipWhile(Predicate<? superT> predicate)

Publisher's backpressure behavior.skipWhile does not operate by default on a particularScheduler.predicate - a function to test each item emitted from the source Publisher@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final Flowable<T> sorted()
Comparable with respect to all other items in the sequence.If any item emitted by this Flowable does not implementComparable with respect to all other items emitted by this Flowable, no items will be emitted and the sequence is terminated with aClassCastException.
Note that callingsorted with long, non-terminating or infinite sources might causeOutOfMemoryError
Publisher in an unbounded manner (i.e., without applying backpressure to it).sorted does not operate by default on a particularScheduler.@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final Flowable<T> sorted(Comparator<? superT> sortFunction)
Note that callingsorted with long, non-terminating or infinite sources might causeOutOfMemoryError
Publisher in an unbounded manner (i.e., without applying backpressure to it).sorted does not operate by default on a particularScheduler.sortFunction - a function that compares two items emitted by the source Publisher and returns an Integer that indicates their sort order@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final Flowable<T> startWith(Iterable<? extendsT> items)
Iterable before it begins to emit items emitted by the source Publisher.
Publisher is expected to honor backpressure as well. If it violates this rule, itmay throw anIllegalStateException when the sourcePublisher completes.startWith does not operate by default on a particularScheduler.items - an Iterable that contains the items you want the modified Publisher to emit firstIterable and then emits the items emitted by the source Publisher@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final Flowable<T> startWith(Publisher<? extendsT> other)
Publisher before it begins to emit items emitted by the source Publisher.
otherPublishers are expected to honor backpressure as well. If any of then violates this rule, itmay throw anIllegalStateException when the sourcePublisher completes.startWith does not operate by default on a particularScheduler.other - a Publisher that contains the items you want the modified Publisher to emit firstPublisher and then emits the items emitted by the source Publisher@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final Flowable<T> startWith(T value)

Publisher is expected to honor backpressure as well. If it violates this rule, itmay throw anIllegalStateException when the sourcePublisher completes.startWith does not operate by default on a particularScheduler.value - the item to emit first@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final Flowable<T> startWithArray(T... items)

Publisher is expected to honor backpressure as well. If it violates this rule, itmay throw anIllegalStateException when the sourcePublisher completes.startWithArray does not operate by default on a particularScheduler.items - the array of values to emit first@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final Disposable subscribe()
onNext andonComplete emissions. If the Flowable emits an error, it is wrapped into anOnErrorNotImplementedException and routed to the RxJavaPlugins.onError handler.
Publisher in an unbounded manner (i.e., no backpressure is applied to it).subscribe does not operate by default on a particularScheduler.Disposable reference with which the caller can stop receiving items before the Publisher has finished sending them@CheckReturnValue@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final Disposable subscribe(Consumer<? superT> onNext)
If the Flowable emits an error, it is wrapped into anOnErrorNotImplementedException and routed to the RxJavaPlugins.onError handler.
Publisher in an unbounded manner (i.e., no backpressure is applied to it).subscribe does not operate by default on a particularScheduler.onNext - theConsumer<T> you have designed to accept emissions from the PublisherDisposable reference with which the caller can stop receiving items before the Publisher has finished sending themNullPointerException - ifonNext is null@CheckReturnValue@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final Disposable subscribe(Consumer<? superT> onNext,Consumer<? superThrowable> onError)
Publisher in an unbounded manner (i.e., no backpressure is applied to it).subscribe does not operate by default on a particularScheduler.onNext - theConsumer<T> you have designed to accept emissions from the PublisheronError - theConsumer<Throwable> you have designed to accept any error notification from the PublisherDisposable reference with which the caller can stop receiving items before the Publisher has finished sending themNullPointerException - ifonNext is null, or ifonError is null@CheckReturnValue@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final Disposable subscribe(Consumer<? superT> onNext,Consumer<? superThrowable> onError,Action onComplete)
Publisher in an unbounded manner (i.e., no backpressure is applied to it).subscribe does not operate by default on a particularScheduler.onNext - theConsumer<T> you have designed to accept emissions from the PublisheronError - theConsumer<Throwable> you have designed to accept any error notification from the PublisheronComplete - theAction you have designed to accept a completion notification from the PublisherDisposable reference with which the caller can stop receiving items before the Publisher has finished sending themNullPointerException - ifonNext is null, or ifonError is null, or ifonComplete is null@CheckReturnValue@NonNull@BackpressureSupport(value=SPECIAL)@SchedulerSupport(value="none")public final Disposable subscribe(Consumer<? superT> onNext,Consumer<? superThrowable> onError,Action onComplete,Consumer<? superSubscription> onSubscribe)
Publisher in an unbounded manner (i.e., no backpressure is applied to it).subscribe does not operate by default on a particularScheduler.onNext - theConsumer<T> you have designed to accept emissions from the PublisheronError - theConsumer<Throwable> you have designed to accept any error notification from the PublisheronComplete - theAction you have designed to accept a completion notification from the PublisheronSubscribe - theConsumer that receives the upstream's SubscriptionDisposable reference with which the caller can stop receiving items before the Publisher has finished sending themNullPointerException - ifonNext is null, or ifonError is null, or ifonComplete is null, or ifonSubscribe is null@BackpressureSupport(value=SPECIAL)@SchedulerSupport(value="none")public final void subscribe(Subscriber<? superT> s)
@BackpressureSupport(value=SPECIAL)@SchedulerSupport(value="none")public final void subscribe(FlowableSubscriber<? superT> s)
This is a "factory method" and can be called multiple times, each time starting a newSubscription.
EachSubscription will work for only a singleFlowableSubscriber.
If the sameFlowableSubscriber instance is subscribed to multipleFlowables and/or the sameFlowable multiple times, it must ensure the serialization over itsonXXX methods manually.
If theFlowable rejects the subscription attempt or otherwise fails it will signal the error viaSubscriber.onError(Throwable).
This subscribe method relaxes the following Reactive Streams rules:
FlowableSubscriber.subscribe does not operate by default on a particularScheduler.History: 2.0.7 - experimental; 2.1 - beta
s - the FlowableSubscriber that will consume signals from this Flowableprotected abstract void subscribeActual(Subscriber<? superT> s)
Subscribers.There is no need to call any of the plugin hooks on the currentFlowable instance or theSubscriber; all hooks and basic safeguards have been applied bysubscribe(Subscriber) before this method gets called.
s - the incoming Subscriber, never null@CheckReturnValue@BackpressureSupport(value=SPECIAL)@SchedulerSupport(value="none")public final <E extendsSubscriber<? superT>> E subscribeWith(E subscriber)
Usage example:
Flowable<Integer> source = Flowable.range(1, 10); CompositeDisposable composite = new CompositeDisposable(); ResourceSubscriber<Integer> rs = new ResourceSubscriber<>() { // ... }; composite.add(source.subscribeWith(rs));Subscriber.subscribeWith does not operate by default on a particularScheduler.E - the type of the Subscriber to use and returnsubscriber - the Subscriber (subclass) to use and return, not nullsubscriberNullPointerException - ifsubscriber is null@CheckReturnValue@NonNull@BackpressureSupport(value=PASS_THROUGH)@SchedulerSupport(value="custom")public final Flowable<T> subscribeOn(@NonNullScheduler scheduler)
Scheduler. If there is acreate(FlowableOnSubscribe, BackpressureStrategy) type source up in the chain, it is recommended to usesubscribeOn(scheduler, false) instead to avoid same-pool deadlock because requests may pile up behind an eager/blocking emitter.

Publisher's backpressure behavior.Scheduler this operator will use.scheduler - theScheduler to perform subscription actions onSchedulerobserveOn(io.reactivex.Scheduler),subscribeOn(Scheduler, boolean)@CheckReturnValue@NonNull@BackpressureSupport(value=PASS_THROUGH)@SchedulerSupport(value="custom")public final Flowable<T> subscribeOn(@NonNullScheduler scheduler, boolean requestOn)
Scheduler optionally reroutes requests from other threads to the sameScheduler thread. If there is acreate(FlowableOnSubscribe, BackpressureStrategy) type source up in the chain, it is recommended to haverequestOn false to avoid same-pool deadlock because requests may pile up behind an eager/blocking emitter.

Publisher's backpressure behavior.Scheduler this operator will use.History: 2.1.1 - experimental
scheduler - theScheduler to perform subscription actions onrequestOn - if true, requests are rerouted to the given Scheduler as well (strong pipelining) if false, requests coming from any thread are simply forwarded to the upstream on the same thread (weak pipelining)SchedulerobserveOn(io.reactivex.Scheduler)@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final Flowable<T> switchIfEmpty(Publisher<? extendsT> other)

Publisher is empty, the alternatePublisher is expected to honor backpressure. If the sourcePublisher is non-empty, it is expected to honor backpressure as instead. In either case, if violated, aMissingBackpressureExceptionmay get signaled somewhere downstream.switchIfEmpty does not operate by default on a particularScheduler.other - the alternate Publisher to subscribe to if the source does not emit any items@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <R> Flowable<R> switchMap(Function<? superT,? extendsPublisher<? extends R>> mapper)
The resulting Publisher completes if both the upstream Publisher and the last inner Publisher, if any, complete. If the upstream Publisher signals an onError, the inner Publisher is canceled and the error delivered in-sequence.

Publisher is consumed in an unbounded manner (i.e., without backpressure) and the innerPublishers are expected to honor backpressure but it is not enforced; the operator won't signal aMissingBackpressureException but the violationmay lead toOutOfMemoryError due to internal buffer bloat.switchMap does not operate by default on a particularScheduler.R - the element type of the inner Publishers and the outputmapper - a function that, when applied to an item emitted by the source Publisher, returns a Publisherfunc to the most recently emitted item emitted by the source PublisherswitchMapDelayError(Function)@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <R> Flowable<R> switchMap(Function<? superT,? extendsPublisher<? extends R>> mapper, int bufferSize)
The resulting Publisher completes if both the upstream Publisher and the last inner Publisher, if any, complete. If the upstream Publisher signals an onError, the inner Publisher is canceled and the error delivered in-sequence.

Publisher is consumed in an unbounded manner (i.e., without backpressure) and the innerPublishers are expected to honor backpressure but it is not enforced; the operator won't signal aMissingBackpressureException but the violationmay lead toOutOfMemoryError due to internal buffer bloat.switchMap does not operate by default on a particularScheduler.R - the element type of the inner Publishers and the outputmapper - a function that, when applied to an item emitted by the source Publisher, returns a PublisherbufferSize - the number of elements to prefetch from the current active inner Publisherfunc to the most recently emitted item emitted by the source PublisherswitchMapDelayError(Function, int)@CheckReturnValue@NonNull@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final Completable switchMapCompletable(@NonNullFunction<? superT,? extendsCompletableSource> mapper)
CompletableSources, subscribes to the newer one while disposing the subscription to the previousCompletableSource, thus keeping at most one activeCompletableSource running.
Since aCompletableSource doesn't produce any items, the resulting reactive type of this operator is aCompletable that can only indicate successful completion or a failure in any of the innerCompletableSources or the failure of the currentFlowable.
Flowable in an unbounded manner and otherwise does not have backpressure in its return type because no items are ever produced.switchMapCompletable does not operate by default on a particularScheduler.Flowable or the activeCompletableSource signals anonError, the resultingCompletable is terminated immediately with thatThrowable. Use theswitchMapCompletableDelayError(Function) to delay such inner failures until every innerCompletableSources and the mainFlowable terminates in some fashion. If they fail concurrently, the operator may combine theThrowables into aCompositeException and signal it to the downstream instead. If any inactivated (switched out)CompletableSource signals anonError late, theThrowables will be signaled to the global error handler viaRxJavaPlugins.onError(Throwable) method asUndeliverableException errors.History: 2.1.11 - experimental
mapper - the function called with each upstream item and should return aCompletableSource to be subscribed to and awaited for (non blockingly) for its terminal eventswitchMapCompletableDelayError(Function)@CheckReturnValue@NonNull@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final Completable switchMapCompletableDelayError(@NonNullFunction<? superT,? extendsCompletableSource> mapper)
CompletableSources, subscribes to the newer one while disposing the subscription to the previousCompletableSource, thus keeping at most one activeCompletableSource running and delaying any main or inner errors until all of them terminate.
Since aCompletableSource doesn't produce any items, the resulting reactive type of this operator is aCompletable that can only indicate successful completion or a failure in any of the innerCompletableSources or the failure of the currentFlowable.
Flowable in an unbounded manner and otherwise does not have backpressure in its return type because no items are ever produced.switchMapCompletableDelayError does not operate by default on a particularScheduler.Flowable and all theCompletableSources, who had the chance to run to their completion, are delayed until all of them terminate in some fashion. At this point, if there was only one failure, the respectiveThrowable is emitted to the downstream. If there was more than one failure, the operator combines allThrowables into aCompositeException and signals that to the downstream. If any inactivated (switched out)CompletableSource signals anonError late, theThrowables will be signaled to the global error handler viaRxJavaPlugins.onError(Throwable) method asUndeliverableException errors.History: 2.1.11 - experimental
mapper - the function called with each upstream item and should return aCompletableSource to be subscribed to and awaited for (non blockingly) for its terminal eventswitchMapCompletable(Function)@CheckReturnValue@BackpressureSupport(value=SPECIAL)@SchedulerSupport(value="none")public final <R> Flowable<R> switchMapDelayError(Function<? superT,? extendsPublisher<? extends R>> mapper)
The resulting Publisher completes if both the upstream Publisher and the last inner Publisher, if any, complete. If the upstream Publisher signals an onError, the termination of the last inner Publisher will emit that error as is or wrapped into a CompositeException along with the other possible errors the former inner Publishers signaled.

Publisher is consumed in an unbounded manner (i.e., without backpressure) and the innerPublishers are expected to honor backpressure but it is not enforced; the operator won't signal aMissingBackpressureException but the violationmay lead toOutOfMemoryError due to internal buffer bloat.switchMapDelayError does not operate by default on a particularScheduler.R - the element type of the inner Publishers and the outputmapper - a function that, when applied to an item emitted by the source Publisher, returns a Publisherfunc to the most recently emitted item emitted by the source PublisherswitchMap(Function)@CheckReturnValue@BackpressureSupport(value=SPECIAL)@SchedulerSupport(value="none")public final <R> Flowable<R> switchMapDelayError(Function<? superT,? extendsPublisher<? extends R>> mapper, int bufferSize)
The resulting Publisher completes if both the upstream Publisher and the last inner Publisher, if any, complete. If the upstream Publisher signals an onError, the termination of the last inner Publisher will emit that error as is or wrapped into a CompositeException along with the other possible errors the former inner Publishers signaled.

Publisher is consumed in an unbounded manner (i.e., without backpressure) and the innerPublishers are expected to honor backpressure but it is not enforced; the operator won't signal aMissingBackpressureException but the violationmay lead toOutOfMemoryError due to internal buffer bloat.switchMapDelayError does not operate by default on a particularScheduler.R - the element type of the inner Publishers and the outputmapper - a function that, when applied to an item emitted by the source Publisher, returns a PublisherbufferSize - the number of elements to prefetch from the current active inner Publisherfunc to the most recently emitted item emitted by the source PublisherswitchMap(Function, int)@CheckReturnValue@NonNull@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final <R> Flowable<R> switchMapMaybe(@NonNullFunction<? superT,? extendsMaybeSource<? extends R>> mapper)
MaybeSources 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 thisFlowable or any of the active innerMaybeSources fail.
Flowable is consumed in an unbounded manner (i.e., without backpressure).switchMapMaybe does not operate by default on a particularScheduler.onError if thisFlowable or any of the innerMaybeSources fail while they are active. When this happens concurrently, their individualThrowable errors may get combined and emitted as a singleCompositeException. Otherwise, a late (i.e., inactive or switched out)onError from thisFlowable or from any of the innerMaybeSources will be forwarded to the global error handler viaRxJavaPlugins.onError(Throwable) asUndeliverableExceptionHistory: 2.1.11 - experimental
R - the output value typemapper - the function called with the current upstream event and should return aMaybeSource to replace the current active inner source and get subscribed to.switchMapMaybe(Function),switchMapMaybeDelayError(Function)@CheckReturnValue@NonNull@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final <R> Flowable<R> switchMapMaybeDelayError(@NonNullFunction<? superT,? extendsMaybeSource<? extends R>> mapper)
MaybeSources 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 thisFlowable or the innerMaybeSources until all terminate.
Flowable is consumed in an unbounded manner (i.e., without backpressure).switchMapMaybeDelayError does not operate by default on a particularScheduler.History: 2.1.11 - experimental
R - the output value typemapper - the function called with the current upstream event and should return aMaybeSource to replace the current active inner source and get subscribed to.switchMapMaybe(Function)@CheckReturnValue@NonNull@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final <R> Flowable<R> switchMapSingle(@NonNullFunction<? superT,? extendsSingleSource<? extends R>> mapper)
SingleSources 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 thisFlowable or any of the active innerSingleSources fail.
Flowable is consumed in an unbounded manner (i.e., without backpressure).switchMapSingle does not operate by default on a particularScheduler.onError if thisFlowable or any of the innerSingleSources fail while they are active. When this happens concurrently, their individualThrowable errors may get combined and emitted as a singleCompositeException. Otherwise, a late (i.e., inactive or switched out)onError from thisFlowable or from any of the innerSingleSources will be forwarded to the global error handler viaRxJavaPlugins.onError(Throwable) asUndeliverableExceptionHistory: 2.1.11 - experimental
R - the output value typemapper - the function called with the current upstream event and should return aSingleSource to replace the current active inner source and get subscribed to.switchMapSingleDelayError(Function)@CheckReturnValue@NonNull@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final <R> Flowable<R> switchMapSingleDelayError(@NonNullFunction<? superT,? extendsSingleSource<? extends R>> mapper)
SingleSources 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 thisFlowable or the innerSingleSources until all terminate.
Flowable is consumed in an unbounded manner (i.e., without backpressure).switchMapSingleDelayError does not operate by default on a particularScheduler.History: 2.1.11 - experimental
R - the output value typemapper - the function called with the current upstream event and should return aSingleSource to replace the current active inner source and get subscribed to.switchMapSingle(Function)@CheckReturnValue@BackpressureSupport(value=SPECIAL)@SchedulerSupport(value="none")public final Flowable<T> take(long count)
count items emitted by the source Publisher. If the source emits fewer thancount items then all of its items are emitted.
This method returns a Publisher that will invoke a subscribingSubscriber'sonNext function a maximum ofcount times before invokingonComplete.
Publisher's backpressure behavior in case the first request is smaller than thecount. Otherwise, the sourcePublisher is consumed in an unbounded manner (i.e., without applying backpressure to it).take does not operate by default on a particularScheduler.count - the maximum number of items to emitcount items emitted by the source Publisher, or all of the items from the source Publisher if that Publisher emits fewer thancount items@CheckReturnValue@BackpressureSupport(value=PASS_THROUGH)@SchedulerSupport(value="io.reactivex:computation")public final Flowable<T> take(long time,TimeUnit unit)
If time runs out before theFlowable completes normally, theonComplete event will be signaled on the defaultcomputationScheduler.

Publisher's backpressure behavior.take operates by default on thecomputationScheduler.time - the length of the time windowunit - the time unit oftime@CheckReturnValue@BackpressureSupport(value=PASS_THROUGH)@SchedulerSupport(value="custom")public final Flowable<T> take(long time,TimeUnit unit,Scheduler scheduler)
If time runs out before theFlowable completes normally, theonComplete event will be signaled on the providedScheduler.

Publisher's backpressure behavior.Scheduler this operator will use.time - the length of the time windowunit - the time unit oftimescheduler - the Scheduler used for time source@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final Flowable<T> takeLast(int count)
count items emitted by the source Publisher. If the source emits fewer thancount items then all of its items are emitted.
count is non-zero; ignores backpressure if thecount is zero as it doesn't signal any values.takeLast does not operate by default on a particularScheduler.count - the maximum number of items to emit from the end of the sequence of items emitted by the source Publishercount items emitted by the source PublisherIndexOutOfBoundsException - ifcount is less than zero@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final Flowable<T> takeLast(long count, long time,TimeUnit unit)

Publisher in an unbounded manner (i.e., no backpressure is applied to it).takeLast does not operate on any particular scheduler but uses the current time from thecomputationScheduler.count - the maximum number of items to emittime - the length of the time windowunit - the time unit oftimecount items from the source Publisher that were emitted in a specified window of time before the Publisher completed@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="custom")public final Flowable<T> takeLast(long count, long time,TimeUnit unit,Scheduler scheduler)

Publisher in an unbounded manner (i.e., no backpressure is applied to it).Scheduler this operator will use for tracking the current timecount - the maximum number of items to emittime - the length of the time windowunit - the time unit oftimescheduler - theScheduler that provides the timestamps for the observed itemscount items from the source Publisher that were emitted in a specified window of time before the Publisher completed, where the timing information is provided by the givenschedulerIndexOutOfBoundsException - ifcount is less than zero@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="custom")public final Flowable<T> takeLast(long count, long time,TimeUnit unit,Scheduler scheduler, boolean delayError, int bufferSize)

Publisher in an unbounded manner (i.e., no backpressure is applied to it).Scheduler this operator will use for tracking the current timecount - the maximum number of items to emittime - the length of the time windowunit - the time unit oftimescheduler - theScheduler that provides the timestamps for the observed itemsdelayError - if true, an exception signaled by the current Flowable is delayed until the regular elements are consumed by the downstream; if false, an exception is immediately signaled and all regular elements droppedbufferSize - the hint about how many elements to expect to be lastcount items from the source Publisher that were emitted in a specified window of time before the Publisher completed, where the timing information is provided by the givenschedulerIndexOutOfBoundsException - ifcount is less than zero@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="io.reactivex:computation")public final Flowable<T> takeLast(long time,TimeUnit unit)

Publisher in an unbounded manner (i.e., no backpressure is applied to it) but note that thismay lead toOutOfMemoryError due to internal buffer bloat. Consider usingtakeLast(long, long, TimeUnit) in this case.takeLast operates by default on thecomputationScheduler.time - the length of the time windowunit - the time unit oftimetime@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="io.reactivex:computation")public final Flowable<T> takeLast(long time,TimeUnit unit, boolean delayError)

Publisher in an unbounded manner (i.e., no backpressure is applied to it) but note that thismay lead toOutOfMemoryError due to internal buffer bloat. Consider usingtakeLast(long, long, TimeUnit) in this case.takeLast operates by default on thecomputationScheduler.time - the length of the time windowunit - the time unit oftimedelayError - if true, an exception signaled by the current Flowable is delayed until the regular elements are consumed by the downstream; if false, an exception is immediately signaled and all regular elements droppedtime@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="custom")public final Flowable<T> takeLast(long time,TimeUnit unit,Scheduler scheduler)

Publisher in an unbounded manner (i.e., no backpressure is applied to it) but note that thismay lead toOutOfMemoryError due to internal buffer bloat. Consider usingtakeLast(long, long, TimeUnit, Scheduler) in this case.Scheduler this operator will use.time - the length of the time windowunit - the time unit oftimescheduler - the Scheduler that provides the timestamps for the Observed itemstime, where the timing information is provided byscheduler@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="custom")public final Flowable<T> takeLast(long time,TimeUnit unit,Scheduler scheduler, boolean delayError)

Publisher in an unbounded manner (i.e., no backpressure is applied to it) but note that thismay lead toOutOfMemoryError due to internal buffer bloat. Consider usingtakeLast(long, long, TimeUnit, Scheduler) in this case.Scheduler this operator will use.time - the length of the time windowunit - the time unit oftimescheduler - the Scheduler that provides the timestamps for the Observed itemsdelayError - if true, an exception signaled by the current Flowable is delayed until the regular elements are consumed by the downstream; if false, an exception is immediately signaled and all regular elements droppedtime, where the timing information is provided byscheduler@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="custom")public final Flowable<T> takeLast(long time,TimeUnit unit,Scheduler scheduler, boolean delayError, int bufferSize)

Publisher in an unbounded manner (i.e., no backpressure is applied to it) but note that thismay lead toOutOfMemoryError due to internal buffer bloat. Consider usingtakeLast(long, long, TimeUnit, Scheduler) in this case.Scheduler this operator will use.time - the length of the time windowunit - the time unit oftimescheduler - the Scheduler that provides the timestamps for the Observed itemsdelayError - if true, an exception signaled by the current Flowable is delayed until the regular elements are consumed by the downstream; if false, an exception is immediately signaled and all regular elements droppedbufferSize - the hint about how many elements to expect to be lasttime, where the timing information is provided byscheduler@CheckReturnValue@NonNull@BackpressureSupport(value=PASS_THROUGH)@SchedulerSupport(value="none")public final Flowable<T> takeUntil(Predicate<? superT> stopPredicate)

The difference between this operator andtakeWhile(Predicate) is that here, the condition is evaluatedafter the item is emitted.
takeUntil does not operate by default on a particularScheduler.stopPredicate - a function that evaluates an item emitted by the source Publisher and returns a BooleantakeWhile(Predicate)@CheckReturnValue@NonNull@BackpressureSupport(value=PASS_THROUGH)@SchedulerSupport(value="none")public final <U> Flowable<T> takeUntil(Publisher<U> other)

Publisher's backpressure behavior.takeUntil does not operate by default on a particularScheduler.U - the type of items emitted byotherother - the Publisher whose first emitted item will causetakeUntil to stop emitting items from the source Publisherother emits its first item@CheckReturnValue@NonNull@BackpressureSupport(value=PASS_THROUGH)@SchedulerSupport(value="none")public final Flowable<T> takeWhile(Predicate<? superT> predicate)

Publisher's backpressure behavior.takeWhile does not operate by default on a particularScheduler.predicate - a function that evaluates an item emitted by the source Publisher and returns a Booleanpredicate, then completestakeUntil(Predicate)@CheckReturnValue@BackpressureSupport(value=ERROR)@SchedulerSupport(value="io.reactivex:computation")public final Flowable<T> throttleFirst(long windowDuration,TimeUnit unit)
This differs fromthrottleLast(long, java.util.concurrent.TimeUnit) in that this only tracks the passage of time whereasthrottleLast(long, java.util.concurrent.TimeUnit) ticks at scheduled intervals.

throttleFirst operates by default on thecomputationScheduler.windowDuration - time to wait before emitting another item after emitting the last itemunit - the unit of time ofwindowDuration@CheckReturnValue@NonNull@BackpressureSupport(value=ERROR)@SchedulerSupport(value="custom")public final Flowable<T> throttleFirst(long skipDuration,TimeUnit unit,Scheduler scheduler)
This differs fromthrottleLast(long, java.util.concurrent.TimeUnit) in that this only tracks the passage of time whereasthrottleLast(long, java.util.concurrent.TimeUnit) ticks at scheduled intervals.

Scheduler this operator will use.skipDuration - time to wait before emitting another item after emitting the last itemunit - the unit of time ofskipDurationscheduler - theScheduler to use internally to manage the timers that handle timeout for each event@CheckReturnValue@BackpressureSupport(value=ERROR)@SchedulerSupport(value="io.reactivex:computation")public final Flowable<T> throttleLast(long intervalDuration,TimeUnit unit)
This differs fromthrottleFirst(long, java.util.concurrent.TimeUnit) in that this ticks along at a scheduled interval whereasthrottleFirst(long, java.util.concurrent.TimeUnit) does not tick, it just tracks the passage of time.

throttleLast operates by default on thecomputationScheduler.intervalDuration - duration of windows within which the last item emitted by the source Publisher will be emittedunit - the unit of time ofintervalDurationsample(long, TimeUnit)@CheckReturnValue@BackpressureSupport(value=ERROR)@SchedulerSupport(value="custom")public final Flowable<T> throttleLast(long intervalDuration,TimeUnit unit,Scheduler scheduler)
This differs fromthrottleFirst(long, java.util.concurrent.TimeUnit) in that this ticks along at a scheduled interval whereasthrottleFirst(long, java.util.concurrent.TimeUnit) does not tick, it just tracks the passage of time.

Scheduler this operator will use.intervalDuration - duration of windows within which the last item emitted by the source Publisher will be emittedunit - the unit of time ofintervalDurationscheduler - theScheduler to use internally to manage the timers that handle timeout for each eventsample(long, TimeUnit, Scheduler)@CheckReturnValue@BackpressureSupport(value=ERROR)@SchedulerSupport(value="io.reactivex:computation")public final Flowable<T> throttleLatest(long timeout,TimeUnit unit)
Flowable by first emitting the next item from upstream, then periodically emitting the latest item (if any) when the specified timeout elapses between them.
Unlike the option withthrottleLatest(long, TimeUnit, boolean), the very last item being held back (if any) is not emitted when the upstream completes.
If no items were emitted from the upstream during this timeout phase, the next upstream item is emitted immediately and the timeout window starts from then.
MissingBackpressureException will be signaled.throttleLatest operates by default on thecomputationScheduler.History: 2.1.14 - experimental
timeout - the time to wait after an item emission towards the downstream before trying to emit the latest item from upstream againunit - the time unitthrottleLatest(long, TimeUnit, boolean),throttleLatest(long, TimeUnit, Scheduler)@CheckReturnValue@BackpressureSupport(value=ERROR)@SchedulerSupport(value="io.reactivex:computation")public final Flowable<T> throttleLatest(long timeout,TimeUnit unit, boolean emitLast)
Flowable by first emitting the next item from upstream, then periodically emitting the latest item (if any) when the specified timeout elapses between them.
If no items were emitted from the upstream during this timeout phase, the next upstream item is emitted immediately and the timeout window starts from then.
MissingBackpressureException will be signaled.throttleLatest operates by default on thecomputationScheduler.History: 2.1.14 - experimental
timeout - the time to wait after an item emission towards the downstream before trying to emit the latest item from upstream againunit - the time unitemitLast - Iftrue, the very last item from the upstream will be emitted immediately when the upstream completes, regardless if there is a timeout window active or not. Iffalse, the very last upstream item is ignored and the flow terminates.throttleLatest(long, TimeUnit, Scheduler, boolean)@CheckReturnValue@BackpressureSupport(value=ERROR)@SchedulerSupport(value="custom")public final Flowable<T> throttleLatest(long timeout,TimeUnit unit,Scheduler scheduler)
Flowable by first emitting the next item from upstream, then periodically emitting the latest item (if any) when the specified timeout elapses between them.
Unlike the option withthrottleLatest(long, TimeUnit, Scheduler, boolean), the very last item being held back (if any) is not emitted when the upstream completes.
If no items were emitted from the upstream during this timeout phase, the next upstream item is emitted immediately and the timeout window starts from then.
MissingBackpressureException will be signaled.Scheduler this operator will use.History: 2.1.14 - experimental
timeout - the time to wait after an item emission towards the downstream before trying to emit the latest item from upstream againunit - the time unitscheduler - theScheduler where the timed wait and latest item emission will be performedthrottleLatest(long, TimeUnit, Scheduler, boolean)@CheckReturnValue@NonNull@BackpressureSupport(value=ERROR)@SchedulerSupport(value="custom")public final Flowable<T> throttleLatest(long timeout,TimeUnit unit,Scheduler scheduler, boolean emitLast)
Flowable by first emitting the next item from upstream, then periodically emitting the latest item (if any) when the specified timeout elapses between them.
If no items were emitted from the upstream during this timeout phase, the next upstream item is emitted immediately and the timeout window starts from then.
MissingBackpressureException will be signaled.Scheduler this operator will use.History: 2.1.14 - experimental
timeout - the time to wait after an item emission towards the downstream before trying to emit the latest item from upstream againunit - the time unitscheduler - theScheduler where the timed wait and latest item emission will be performedemitLast - Iftrue, the very last item from the upstream will be emitted immediately when the upstream completes, regardless if there is a timeout window active or not. Iffalse, the very last upstream item is ignored and the flow terminates.@CheckReturnValue@BackpressureSupport(value=ERROR)@SchedulerSupport(value="io.reactivex:computation")public final Flowable<T> throttleWithTimeout(long timeout,TimeUnit unit)
debounce(long, TimeUnit)).Note: If items keep being emitted by the source Publisher faster than the timeout then no items will be emitted by the resulting Publisher.

throttleWithTimeout operates by default on thecomputationScheduler.timeout - the length of the window of time that must pass after the emission of an item from the source Publisher in which that Publisher emits no items in order for the item to be emitted by the resulting Publisherunit - the unit of time for the specifiedtimeoutdebounce(long, TimeUnit)@CheckReturnValue@BackpressureSupport(value=ERROR)@SchedulerSupport(value="custom")public final Flowable<T> throttleWithTimeout(long timeout,TimeUnit unit,Scheduler scheduler)
debounce(long, TimeUnit, Scheduler)).Note: If items keep being emitted by the source Publisher faster than the timeout then no items will be emitted by the resulting Publisher.

Scheduler this operator will use.timeout - the length of the window of time that must pass after the emission of an item from the source Publisher in which that Publisher emits no items in order for the item to be emitted by the resulting Publisherunit - the unit of time for the specifiedtimeoutscheduler - theScheduler to use internally to manage the timers that handle the timeout for each itemdebounce(long, TimeUnit, Scheduler)@CheckReturnValue@BackpressureSupport(value=PASS_THROUGH)@SchedulerSupport(value="none")public final Flowable<Timed<T>> timeInterval()

Publisher's backpressure behavior.timeInterval does not operate on any particular scheduler but uses the current time from thecomputationScheduler.@CheckReturnValue@BackpressureSupport(value=PASS_THROUGH)@SchedulerSupport(value="none")public final Flowable<Timed<T>> timeInterval(Scheduler scheduler)

Publisher's backpressure behavior.Scheduler.scheduler - theScheduler used to compute time intervals@CheckReturnValue@BackpressureSupport(value=PASS_THROUGH)@SchedulerSupport(value="none")public final Flowable<Timed<T>> timeInterval(TimeUnit unit)

Publisher's backpressure behavior.timeInterval does not operate on any particular scheduler but uses the current time from thecomputationScheduler.unit - the time unit for the current time@CheckReturnValue@BackpressureSupport(value=PASS_THROUGH)@SchedulerSupport(value="none")public final Flowable<Timed<T>> timeInterval(TimeUnit unit,Scheduler scheduler)

Publisher's backpressure behavior.Scheduler.unit - the time unit for the current timescheduler - theScheduler used to compute time intervals@CheckReturnValue@BackpressureSupport(value=PASS_THROUGH)@SchedulerSupport(value="none")public final <V> Flowable<T> timeout(Function<? superT,? extendsPublisher<V>> itemTimeoutIndicator)
TimeoutException if an item emitted by the source Publisher doesn't arrive within a window of time after the emission of the previous item, where that period of time is measured by a Publisher that is a function of the previous item.
Note: The arrival of the first source item is never timed out.
Publisher sources are expected to honor backpressure as well. If any of the sourcePublishers violate this, itmay throw anIllegalStateException when the sourcePublisher completes.timeout operates by default on theimmediateScheduler.V - the timeout value type (ignored)itemTimeoutIndicator - a function that returns a Publisher for each item emitted by the source Publisher and that determines the timeout window for the subsequent itemTimeoutException if an item emitted by the source Publisher takes longer to arrive than the time window defined by the selector for the previously emitted item@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <V> Flowable<T> timeout(Function<? superT,? extendsPublisher<V>> itemTimeoutIndicator,Flowable<? extendsT> other)

Note: The arrival of the first source item is never timed out.
Publisher sources are expected to honor backpressure as well. If any of the sourcePublishers violate this, itmay throw anIllegalStateException when the sourcePublisher completes.timeout operates by default on theimmediateScheduler.V - the timeout value type (ignored)itemTimeoutIndicator - a function that returns a Publisher, for each item emitted by the source Publisher, that determines the timeout window for the subsequent itemother - the fallback Publisher to switch to if the source Publisher times out@CheckReturnValue@BackpressureSupport(value=PASS_THROUGH)@SchedulerSupport(value="io.reactivex:computation")public final Flowable<T> timeout(long timeout,TimeUnit timeUnit)
TimeoutException.
Publisher's backpressure behavior.timeout operates by default on thecomputationScheduler.timeout - maximum duration between emitted items before a timeout occurstimeUnit - the unit of time that applies to thetimeout argument.TimeoutException in case of a timeout@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="io.reactivex:computation")public final Flowable<T> timeout(long timeout,TimeUnit timeUnit,Publisher<? extendsT> other)

Publisher sources are expected to honor backpressure as well. If any of the sourcePublishers violate this, itmay throw anIllegalStateException when the sourcePublisher completes.timeout operates by default on thecomputationScheduler.timeout - maximum duration between items before a timeout occurstimeUnit - the unit of time that applies to thetimeout argumentother - the fallback Publisher to use in case of a timeout@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="custom")public final Flowable<T> timeout(long timeout,TimeUnit timeUnit,Scheduler scheduler,Publisher<? extendsT> other)

Publisher sources are expected to honor backpressure as well. If any of the sourcePublishers violate this, itmay throw anIllegalStateException when the sourcePublisher completes.Scheduler this operator will use.timeout - maximum duration between items before a timeout occurstimeUnit - the unit of time that applies to thetimeout argumentscheduler - theScheduler to run the timeout timers onother - the Publisher to use as the fallback in case of a timeout@CheckReturnValue@BackpressureSupport(value=PASS_THROUGH)@SchedulerSupport(value="custom")public final Flowable<T> timeout(long timeout,TimeUnit timeUnit,Scheduler scheduler)
TimeoutException.
Publisher's backpressure behavior.Scheduler this operator will use.timeout - maximum duration between items before a timeout occurstimeUnit - the unit of time that applies to thetimeout argumentscheduler - the Scheduler to run the timeout timers onTimeoutException in case of a timeout@CheckReturnValue@NonNull@BackpressureSupport(value=PASS_THROUGH)@SchedulerSupport(value="none")public final <U,V> Flowable<T> timeout(Publisher<U> firstTimeoutIndicator,Function<? superT,? extendsPublisher<V>> itemTimeoutIndicator)
TimeoutException if either the first item emitted by the source Publisher or any subsequent item doesn't arrive within time windows defined by other Publishers.
Publishers are expected to honor backpressure as well. If any of then violates this rule, itmay throw anIllegalStateException when thePublisher completes.timeout does not operate by default on anyScheduler.U - the first timeout value type (ignored)V - the subsequent timeout value type (ignored)firstTimeoutIndicator - a function that returns a Publisher that determines the timeout window for the first source itemitemTimeoutIndicator - a function that returns a Publisher for each item emitted by the source Publisher and that determines the timeout window in which the subsequent source item must arrive in order to continue the sequenceTimeoutException if either the first item or any subsequent item doesn't arrive within the time windows specified by the timeout selectors@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <U,V> Flowable<T> timeout(Publisher<U> firstTimeoutIndicator,Function<? superT,? extendsPublisher<V>> itemTimeoutIndicator,Publisher<? extendsT> other)

Publisher sources are expected to honor backpressure as well. If any of the sourcePublishers violate this, itmay throw anIllegalStateException when the sourcePublisher completes.timeout does not operate by default on anyScheduler.U - the first timeout value type (ignored)V - the subsequent timeout value type (ignored)firstTimeoutIndicator - a function that returns a Publisher which determines the timeout window for the first source itemitemTimeoutIndicator - a function that returns a Publisher for each item emitted by the source Publisher and that determines the timeout window in which the subsequent source item must arrive in order to continue the sequenceother - the fallback Publisher to switch to if the source Publisher times outother Publisher if either the first item emitted by the source Publisher or any subsequent item doesn't arrive within time windows defined by the timeout selectorsNullPointerException - ifitemTimeoutIndicator is null@CheckReturnValue@BackpressureSupport(value=PASS_THROUGH)@SchedulerSupport(value="none")public final Flowable<Timed<T>> timestamp()
Timed object.
Publisher's backpressure behavior.timestamp does not operate on any particular scheduler but uses the current time from thecomputationScheduler.@CheckReturnValue@BackpressureSupport(value=PASS_THROUGH)@SchedulerSupport(value="none")public final Flowable<Timed<T>> timestamp(Scheduler scheduler)
Timed object whose timestamps are provided by a specified Scheduler.
Publisher's backpressure behavior.Scheduler.scheduler - theScheduler to use as a time sourcescheduler@CheckReturnValue@BackpressureSupport(value=PASS_THROUGH)@SchedulerSupport(value="none")public final Flowable<Timed<T>> timestamp(TimeUnit unit)
Timed object.
Publisher's backpressure behavior.timestamp does not operate on any particular scheduler but uses the current time from thecomputationScheduler.unit - the time unit for the current time@CheckReturnValue@NonNull@BackpressureSupport(value=PASS_THROUGH)@SchedulerSupport(value="none")public final Flowable<Timed<T>> timestamp(TimeUnit unit,Scheduler scheduler)
Timed object whose timestamps are provided by a specified Scheduler.
Publisher's backpressure behavior.Scheduler.unit - the time unit for the current timescheduler - theScheduler to use as a time sourcescheduler@CheckReturnValue@BackpressureSupport(value=SPECIAL)@SchedulerSupport(value="none")public final <R> R to(Function<? superFlowable<T>,R> converter)
This allows fluent conversion to any other type.
converter function.to does not operate by default on a particularScheduler.R - the resulting object typeconverter - the function that receives the current Flowable instance and returns a value@CheckReturnValue@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final Single<List<T>> toList()

Normally, a Publisher that returns multiple items will do so by invoking itsSubscriber'sonNext method for each such item. You can change this behavior, instructing the Publisher to compose a list of all of these items and then to invoke the Subscriber'sonNext function once, passing it the entire list, by calling the Publisher'stoList method prior to calling itssubscribe() method.
Note that this operator requires the upstream to signalonComplete for the accumulated list to be emitted. Sources that are infinite and never complete will never emit anything through this operator and an infinite source may lead to a fatalOutOfMemoryError.
Publisher in an unbounded manner (i.e., without applying backpressure to it).toList does not operate by default on a particularScheduler.@CheckReturnValue@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final Single<List<T>> toList(int capacityHint)

Normally, a Publisher that returns multiple items will do so by invoking itsSubscriber'sonNext method for each such item. You can change this behavior, instructing the Publisher to compose a list of all of these items and then to invoke the Subscriber'sonNext function once, passing it the entire list, by calling the Publisher'stoList method prior to calling itssubscribe() method.
Note that this operator requires the upstream to signalonComplete for the accumulated list to be emitted. Sources that are infinite and never complete will never emit anything through this operator and an infinite source may lead to a fatalOutOfMemoryError.
Publisher in an unbounded manner (i.e., without applying backpressure to it).toList does not operate by default on a particularScheduler.capacityHint - the number of elements expected from the current Flowable@CheckReturnValue@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final <U extendsCollection<? superT>> Single<U> toList(Callable<U> collectionSupplier)

Normally, a Publisher that returns multiple items will do so by invoking itsSubscriber'sonNext method for each such item. You can change this behavior, instructing the Publisher to compose a list of all of these items and then to invoke the Subscriber'sonNext function once, passing it the entire list, by calling the Publisher'stoList method prior to calling itssubscribe() method.
Note that this operator requires the upstream to signalonComplete for the accumulated collection to be emitted. Sources that are infinite and never complete will never emit anything through this operator and an infinite source may lead to a fatalOutOfMemoryError.
Publisher in an unbounded manner (i.e., without applying backpressure to it).toList does not operate by default on a particularScheduler.U - the subclass of a collection of TscollectionSupplier - the Callable returning the collection (for each individual Subscriber) to be filled in@CheckReturnValue@NonNull@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final <K> Single<Map<K,T>> toMap(Function<? superT,? extends K> keySelector)
keySelector function.
If more than one source item maps to the same key, the HashMap will contain the latest of those items.
Note that this operator requires the upstream to signalonComplete for the accumulated map to be emitted. Sources that are infinite and never complete will never emit anything through this operator and an infinite source may lead to a fatalOutOfMemoryError.
Publisher in an unbounded manner (i.e., without applying backpressure to it).toMap does not operate by default on a particularScheduler.K - the key type of the MapkeySelector - the function that extracts the key from a source item to be used in the HashMap@CheckReturnValue@NonNull@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final <K,V> Single<Map<K,V>> toMap(Function<? superT,? extends K> keySelector,Function<? superT,? extends V> valueSelector)
keySelector function.
If more than one source item maps to the same key, the HashMap will contain a single entry that corresponds to the latest of those items.
Note that this operator requires the upstream to signalonComplete for the accumulated map to be emitted. Sources that are infinite and never complete will never emit anything through this operator and an infinite source may lead to a fatalOutOfMemoryError.
Publisher in an unbounded manner (i.e., without applying backpressure to it).toMap does not operate by default on a particularScheduler.K - the key type of the MapV - the value type of the MapkeySelector - the function that extracts the key from a source item to be used in the HashMapvalueSelector - the function that extracts the value from a source item to be used in the HashMap@CheckReturnValue@NonNull@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final <K,V> Single<Map<K,V>> toMap(Function<? superT,? extends K> keySelector,Function<? superT,? extends V> valueSelector,Callable<? extendsMap<K,V>> mapSupplier)
mapFactory function, that contains keys and values extracted from the items emitted by the finite source Publisher.
Note that this operator requires the upstream to signalonComplete for the accumulated map to be emitted. Sources that are infinite and never complete will never emit anything through this operator and an infinite source may lead to a fatalOutOfMemoryError.
Publisher in an unbounded manner (i.e., without applying backpressure to it).toMap does not operate by default on a particularScheduler.K - the key type of the MapV - the value type of the MapkeySelector - the function that extracts the key from a source item to be used in the MapvalueSelector - the function that extracts the value from the source items to be used as value in the MapmapSupplier - the function that returns a Map instance to be used@CheckReturnValue@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final <K> Single<Map<K,Collection<T>>> toMultimap(Function<? superT,? extends K> keySelector)
keySelector function.
Note that this operator requires the upstream to signalonComplete for the accumulated map to be emitted. Sources that are infinite and never complete will never emit anything through this operator and an infinite source may lead to a fatalOutOfMemoryError.
toMultimap does not operate by default on a particularScheduler.K - the key type of the MapkeySelector - the function that extracts the key from the source items to be used as key in the HashMap@CheckReturnValue@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final <K,V> Single<Map<K,Collection<V>>> toMultimap(Function<? superT,? extends K> keySelector,Function<? superT,? extends V> valueSelector)
valueSelector function from items emitted by the finite source Publisher, keyed by a specifiedkeySelector function.
Note that this operator requires the upstream to signalonComplete for the accumulated map to be emitted. Sources that are infinite and never complete will never emit anything through this operator and an infinite source may lead to a fatalOutOfMemoryError.
Publisher in an unbounded manner (i.e., without applying backpressure to it).toMultimap does not operate by default on a particularScheduler.K - the key type of the MapV - the value type of the MapkeySelector - the function that extracts a key from the source items to be used as key in the HashMapvalueSelector - the function that extracts a value from the source items to be used as value in the HashMap@CheckReturnValue@NonNull@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final <K,V> Single<Map<K,Collection<V>>> toMultimap(Function<? superT,? extends K> keySelector,Function<? superT,? extends V> valueSelector,Callable<? extendsMap<K,Collection<V>>> mapSupplier,Function<? super K,? extendsCollection<? super V>> collectionFactory)
mapFactory function, that contains a custom collection of values, extracted by a specifiedvalueSelector function from items emitted by the finite source Publisher, and keyed by thekeySelector function.
Note that this operator requires the upstream to signalonComplete for the accumulated map to be emitted. Sources that are infinite and never complete will never emit anything through this operator and an infinite source may lead to a fatalOutOfMemoryError.
Publisher in an unbounded manner (i.e., without applying backpressure to it).toMultimap does not operate by default on a particularScheduler.K - the key type of the MapV - the value type of the MapkeySelector - the function that extracts a key from the source items to be used as the key in the MapvalueSelector - the function that extracts a value from the source items to be used as the value in the MapmapSupplier - the function that returns a Map instance to be usedcollectionFactory - the function that returns a Collection instance for a particular key to be used in the Map@CheckReturnValue@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final <K,V> Single<Map<K,Collection<V>>> toMultimap(Function<? superT,? extends K> keySelector,Function<? superT,? extends V> valueSelector,Callable<Map<K,Collection<V>>> mapSupplier)
mapFactory function, that contains an ArrayList of values, extracted by a specifiedvalueSelector function from items emitted by the finite source Publisher and keyed by thekeySelector function.
Note that this operator requires the upstream to signalonComplete for the accumulated map to be emitted. Sources that are infinite and never complete will never emit anything through this operator and an infinite source may lead to a fatalOutOfMemoryError.
Publisher in an unbounded manner (i.e., without applying backpressure to it).toMultimap does not operate by default on a particularScheduler.K - the key type of the MapV - the value type of the MapkeySelector - the function that extracts a key from the source items to be used as the key in the MapvalueSelector - the function that extracts a value from the source items to be used as the value in the MapmapSupplier - the function that returns a Map instance to be used@CheckReturnValue@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final Observable<T> toObservable()
Observable.toObservable does not operate by default on a particularScheduler.@CheckReturnValue@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final Single<List<T>> toSortedList()
Comparable with respect to all other items in the sequence.If any item emitted by this Flowable does not implementComparable with respect to all other items emitted by this Flowable, no items will be emitted and the sequence is terminated with aClassCastException.

Note that this operator requires the upstream to signalonComplete for the accumulated list to be emitted. Sources that are infinite and never complete will never emit anything through this operator and an infinite source may lead to a fatalOutOfMemoryError.
Publisher in an unbounded manner (i.e., without applying backpressure to it).toSortedList does not operate by default on a particularScheduler.@CheckReturnValue@NonNull@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final Single<List<T>> toSortedList(Comparator<? superT> comparator)

Note that this operator requires the upstream to signalonComplete for the accumulated list to be emitted. Sources that are infinite and never complete will never emit anything through this operator and an infinite source may lead to a fatalOutOfMemoryError.
Publisher in an unbounded manner (i.e., without applying backpressure to it).toSortedList does not operate by default on a particularScheduler.comparator - a function that compares two items emitted by the source Publisher and returns an Integer that indicates their sort order@CheckReturnValue@NonNull@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final Single<List<T>> toSortedList(Comparator<? superT> comparator, int capacityHint)

Note that this operator requires the upstream to signalonComplete for the accumulated list to be emitted. Sources that are infinite and never complete will never emit anything through this operator and an infinite source may lead to a fatalOutOfMemoryError.
Publisher in an unbounded manner (i.e., without applying backpressure to it).toSortedList does not operate by default on a particularScheduler.comparator - a function that compares two items emitted by the source Publisher and returns an Integer that indicates their sort ordercapacityHint - the initial capacity of the ArrayList used to accumulate items before sorting@CheckReturnValue@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final Single<List<T>> toSortedList(int capacityHint)
Comparable with respect to all other items in the sequence.If any item emitted by this Flowable does not implementComparable with respect to all other items emitted by this Flowable, no items will be emitted and the sequence is terminated with aClassCastException.

Note that this operator requires the upstream to signalonComplete for the accumulated list to be emitted. Sources that are infinite and never complete will never emit anything through this operator and an infinite source may lead to a fatalOutOfMemoryError.
Publisher in an unbounded manner (i.e., without applying backpressure to it).toSortedList does not operate by default on a particularScheduler.capacityHint - the initial capacity of the ArrayList used to accumulate items before sorting@CheckReturnValue@NonNull@BackpressureSupport(value=PASS_THROUGH)@SchedulerSupport(value="custom")public final Flowable<T> unsubscribeOn(Scheduler scheduler)
Scheduler.Publisher's backpressure behavior.Scheduler this operator will use.scheduler - theScheduler to perform cancellation actions onScheduler@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final Flowable<Flowable<T>> window(long count)
count items. When the source Publisher completes or encounters an error, the resulting Publisher emits the current window and propagates the notification from the source Publisher.
count elements.window does not operate by default on a particularScheduler.count - the maximum size of each window before it should be emittedcount items from the source PublisherIllegalArgumentException - if either count is non-positive@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final Flowable<Flowable<T>> window(long count, long skip)
skip items, each containing no more thancount items. When the source Publisher completes or encounters an error, the resulting Publisher emits the current window and propagates the notification from the source Publisher.
count elements.window does not operate by default on a particularScheduler.count - the maximum size of each window before it should be emittedskip - how many items need to be skipped before starting a new window. Note that ifskip andcount are equal this is the same operation aswindow(long).skip items containing at mostcount items from the source PublisherIllegalArgumentException - if either count or skip is non-positive@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final Flowable<Flowable<T>> window(long count, long skip, int bufferSize)
skip items, each containing no more thancount items. When the source Publisher completes or encounters an error, the resulting Publisher emits the current window and propagates the notification from the source Publisher.
count elements.window does not operate by default on a particularScheduler.count - the maximum size of each window before it should be emittedskip - how many items need to be skipped before starting a new window. Note that ifskip andcount are equal this is the same operation aswindow(long).bufferSize - the capacity hint for the buffer in the inner windowsskip items containing at mostcount items from the source PublisherIllegalArgumentException - if either count or skip is non-positive@CheckReturnValue@BackpressureSupport(value=ERROR)@SchedulerSupport(value="io.reactivex:computation")public final Flowable<Flowable<T>> window(long timespan, long timeskip,TimeUnit unit)
timeskip argument. It emits each window after a fixed timespan, specified by thetimespan argument. When the source Publisher completes or Publisher completes or encounters an error, the resulting Publisher emits the current window and propagates the notification from the source Publisher.
Publisher in an unbounded manner. The returnedPublisher doesn't support backpressure as it uses time to control the creation of windows. The returned innerPublishers honor backpressure but have an unbounded inner buffer thatmay lead toOutOfMemoryError if left unconsumed.window operates by default on thecomputationScheduler.timespan - the period of time each window collects items before it should be emittedtimeskip - the period of time after which a new window will be createdunit - the unit of time that applies to thetimespan andtimeskip arguments@CheckReturnValue@BackpressureSupport(value=ERROR)@SchedulerSupport(value="custom")public final Flowable<Flowable<T>> window(long timespan, long timeskip,TimeUnit unit,Scheduler scheduler)
timeskip argument. It emits each window after a fixed timespan, specified by thetimespan argument. When the source Publisher completes or Publisher completes or encounters an error, the resulting Publisher emits the current window and propagates the notification from the source Publisher.
Publisher in an unbounded manner. The returnedPublisher doesn't support backpressure as it uses time to control the creation of windows. The returned innerPublishers honor backpressure but have an unbounded inner buffer thatmay lead toOutOfMemoryError if left unconsumed.Scheduler this operator will use.timespan - the period of time each window collects items before it should be emittedtimeskip - the period of time after which a new window will be createdunit - the unit of time that applies to thetimespan andtimeskip argumentsscheduler - theScheduler to use when determining the end and start of a window@CheckReturnValue@NonNull@BackpressureSupport(value=ERROR)@SchedulerSupport(value="custom")public final Flowable<Flowable<T>> window(long timespan, long timeskip,TimeUnit unit,Scheduler scheduler, int bufferSize)
timeskip argument. It emits each window after a fixed timespan, specified by thetimespan argument. When the source Publisher completes or Publisher completes or encounters an error, the resulting Publisher emits the current window and propagates the notification from the source Publisher.
Publisher in an unbounded manner. The returnedPublisher doesn't support backpressure as it uses time to control the creation of windows. The returned innerPublishers honor backpressure but have an unbounded inner buffer thatmay lead toOutOfMemoryError if left unconsumed.Scheduler this operator will use.timespan - the period of time each window collects items before it should be emittedtimeskip - the period of time after which a new window will be createdunit - the unit of time that applies to thetimespan andtimeskip argumentsscheduler - theScheduler to use when determining the end and start of a windowbufferSize - the capacity hint for the buffer in the inner windows@CheckReturnValue@BackpressureSupport(value=ERROR)@SchedulerSupport(value="io.reactivex:computation")public final Flowable<Flowable<T>> window(long timespan,TimeUnit unit)
timespan argument. When the source Publisher completes or encounters an error, the resulting Publisher emits the current window and propagates the notification from the source Publisher.
Publisher in an unbounded manner. The returnedPublisher doesn't support backpressure as it uses time to control the creation of windows. The returned innerPublishers honor backpressure and may hold up tocount elements at most.window operates by default on thecomputationScheduler.timespan - the period of time each window collects items before it should be emitted and replaced with a new windowunit - the unit of time that applies to thetimespan argument@CheckReturnValue@BackpressureSupport(value=ERROR)@SchedulerSupport(value="io.reactivex:computation")public final Flowable<Flowable<T>> window(long timespan,TimeUnit unit, long count)
timespan argument or a maximum size as specified by thecount argument (whichever is reached first). When the source Publisher completes or encounters an error, the resulting Publisher emits the current window and propagates the notification from the source Publisher.
Publisher in an unbounded manner. The returnedPublisher doesn't support backpressure as it uses time to control the creation of windows. The returned innerPublishers honor backpressure and may hold up tocount elements at most.window operates by default on thecomputationScheduler.timespan - the period of time each window collects items before it should be emitted and replaced with a new windowunit - the unit of time that applies to thetimespan argumentcount - the maximum size of each window before it should be emitted@CheckReturnValue@BackpressureSupport(value=ERROR)@SchedulerSupport(value="io.reactivex:computation")public final Flowable<Flowable<T>> window(long timespan,TimeUnit unit, long count, boolean restart)
timespan argument or a maximum size as specified by thecount argument (whichever is reached first). When the source Publisher completes or encounters an error, the resulting Publisher emits the current window and propagates the notification from the source Publisher.
Publisher in an unbounded manner. The returnedPublisher doesn't support backpressure as it uses time to control the creation of windows. The returned innerPublishers honor backpressure and may hold up tocount elements at most.window operates by default on thecomputationScheduler.timespan - the period of time each window collects items before it should be emitted and replaced with a new windowunit - the unit of time that applies to thetimespan argumentcount - the maximum size of each window before it should be emittedrestart - if true, when a window reaches the capacity limit, the timer is restarted as well@CheckReturnValue@BackpressureSupport(value=ERROR)@SchedulerSupport(value="custom")public final Flowable<Flowable<T>> window(long timespan,TimeUnit unit,Scheduler scheduler)
timespan argument. When the source Publisher completes or encounters an error, the resulting Publisher emits the current window and propagates the notification from the source Publisher.
Publisher in an unbounded manner. The returnedPublisher doesn't support backpressure as it uses time to control the creation of windows. The returned innerPublishers honor backpressure but have an unbounded inner buffer thatmay lead toOutOfMemoryError if left unconsumed.Scheduler this operator will use.timespan - the period of time each window collects items before it should be emitted and replaced with a new windowunit - the unit of time which applies to thetimespan argumentscheduler - theScheduler to use when determining the end and start of a window@CheckReturnValue@BackpressureSupport(value=ERROR)@SchedulerSupport(value="custom")public final Flowable<Flowable<T>> window(long timespan,TimeUnit unit,Scheduler scheduler, long count)
timespan argument or a maximum size specified by thecount argument (whichever is reached first). When the source Publisher completes or encounters an error, the resulting Publisher emits the current window and propagates the notification from the source Publisher.
Publisher in an unbounded manner. The returnedPublisher doesn't support backpressure as it uses time to control the creation of windows. The returned innerPublishers honor backpressure and may hold up tocount elements at most.Scheduler this operator will use.timespan - the period of time each window collects items before it should be emitted and replaced with a new windowunit - the unit of time which applies to thetimespan argumentcount - the maximum size of each window before it should be emittedscheduler - theScheduler to use when determining the end and start of a window@CheckReturnValue@BackpressureSupport(value=ERROR)@SchedulerSupport(value="custom")public final Flowable<Flowable<T>> window(long timespan,TimeUnit unit,Scheduler scheduler, long count, boolean restart)
timespan argument or a maximum size specified by thecount argument (whichever is reached first). When the source Publisher completes or encounters an error, the resulting Publisher emits the current window and propagates the notification from the source Publisher.
Publisher in an unbounded manner. The returnedPublisher doesn't support backpressure as it uses time to control the creation of windows. The returned innerPublishers honor backpressure and may hold up tocount elements at most.Scheduler this operator will use.timespan - the period of time each window collects items before it should be emitted and replaced with a new windowunit - the unit of time which applies to thetimespan argumentcount - the maximum size of each window before it should be emittedscheduler - theScheduler to use when determining the end and start of a windowrestart - if true, when a window reaches the capacity limit, the timer is restarted as well@CheckReturnValue@NonNull@BackpressureSupport(value=ERROR)@SchedulerSupport(value="custom")public final Flowable<Flowable<T>> window(long timespan,TimeUnit unit,Scheduler scheduler, long count, boolean restart, int bufferSize)
timespan argument or a maximum size specified by thecount argument (whichever is reached first). When the source Publisher completes or encounters an error, the resulting Publisher emits the current window and propagates the notification from the source Publisher.
Publisher in an unbounded manner. The returnedPublisher doesn't support backpressure as it uses time to control the creation of windows. The returned innerPublishers honor backpressure and may hold up tocount elements at most.Scheduler this operator will use.timespan - the period of time each window collects items before it should be emitted and replaced with a new windowunit - the unit of time which applies to thetimespan argumentcount - the maximum size of each window before it should be emittedscheduler - theScheduler to use when determining the end and start of a windowrestart - if true, when a window reaches the capacity limit, the timer is restarted as wellbufferSize - the capacity hint for the buffer in the inner windows@CheckReturnValue@BackpressureSupport(value=ERROR)@SchedulerSupport(value="none")public final <B> Flowable<Flowable<T>> window(Publisher<B> boundaryIndicator)

boundary Publisher to control data flow. The inner Publishers honor backpressure and buffer everything until the boundary signals the next element.window does not operate by default on a particularScheduler.B - the window element type (ignored)boundaryIndicator - a Publisher whose emitted items close and open windowsboundary Publisher@CheckReturnValue@NonNull@BackpressureSupport(value=ERROR)@SchedulerSupport(value="none")public final <B> Flowable<Flowable<T>> window(Publisher<B> boundaryIndicator, int bufferSize)

boundary Publisher to control data flow. The inner Publishers honor backpressure and buffer everything until the boundary signals the next element.window does not operate by default on a particularScheduler.B - the window element type (ignored)boundaryIndicator - a Publisher whose emitted items close and open windowsbufferSize - the capacity hint for the buffer in the inner windowsboundary Publisher@CheckReturnValue@BackpressureSupport(value=ERROR)@SchedulerSupport(value="none")public final <U,V> Flowable<Flowable<T>> window(Publisher<U> openingIndicator,Function<? super U,? extendsPublisher<V>> closingIndicator)
windowOpenings Publisher emits an item and when the Publisher returned byclosingSelector emits an item.
windowOpenings Publisher. The inner Publishers honor backpressure and buffer everything until the associated closing Publisher signals or completes.window does not operate by default on a particularScheduler.U - the element type of the window-opening PublisherV - the element type of the window-closing PublishersopeningIndicator - a Publisher that, when it emits an item, causes another window to be createdclosingIndicator - aFunction that produces a Publisher for every window created. When this Publisher emits an item, the associated window is closed and emitted@CheckReturnValue@NonNull@BackpressureSupport(value=ERROR)@SchedulerSupport(value="none")public final <U,V> Flowable<Flowable<T>> window(Publisher<U> openingIndicator,Function<? super U,? extendsPublisher<V>> closingIndicator, int bufferSize)
windowOpenings Publisher emits an item and when the Publisher returned byclosingSelector emits an item.
windowOpenings Publisher. The inner Publishers honor backpressure and buffer everything until the associated closing Publisher signals or completes.window does not operate by default on a particularScheduler.U - the element type of the window-opening PublisherV - the element type of the window-closing PublishersopeningIndicator - a Publisher that, when it emits an item, causes another window to be createdclosingIndicator - aFunction that produces a Publisher for every window created. When this Publisher emits an item, the associated window is closed and emittedbufferSize - the capacity hint for the buffer in the inner windows@CheckReturnValue@BackpressureSupport(value=ERROR)@SchedulerSupport(value="none")public final <B> Flowable<Flowable<T>> window(Callable<? extendsPublisher<B>> boundaryIndicatorSupplier)
closingSelector emits an item.
Publisher in an unbounded manner. The returnedPublisher doesn't support backpressure as it uses theclosingSelector to control the creation of windows. The returned innerPublishers honor backpressure but have an unbounded inner buffer thatmay lead toOutOfMemoryError if left unconsumed.window does not operate by default on a particularScheduler.B - the element type of the boundary PublisherboundaryIndicatorSupplier - aCallable that returns aPublisher that governs the boundary between windows. When the sourcePublisher emits an item,window emits the current window and begins a new one.closingSelector emits an item@CheckReturnValue@NonNull@BackpressureSupport(value=ERROR)@SchedulerSupport(value="none")public final <B> Flowable<Flowable<T>> window(Callable<? extendsPublisher<B>> boundaryIndicatorSupplier, int bufferSize)
closingSelector emits an item.
Publisher in an unbounded manner. The returnedPublisher doesn't support backpressure as it uses theclosingSelector to control the creation of windows. The returned innerPublishers honor backpressure but have an unbounded inner buffer thatmay lead toOutOfMemoryError if left unconsumed.window does not operate by default on a particularScheduler.B - the element type of the boundary PublisherboundaryIndicatorSupplier - aCallable that returns aPublisher that governs the boundary between windows. When the sourcePublisher emits an item,window emits the current window and begins a new one.bufferSize - the capacity hint for the buffer in the inner windowsclosingSelector emits an item@CheckReturnValue@NonNull@BackpressureSupport(value=PASS_THROUGH)@SchedulerSupport(value="none")public final <U,R> Flowable<R> withLatestFrom(Publisher<? extends U> other,BiFunction<? superT,? super U,? extends R> combiner)
resultSelector function only when the source Publisher (this instance) emits an item.
Scheduler.U - the element type of the other PublisherR - the result type of the combinationother - the other Publishercombiner - the function to call when this Publisher emits an item and the other Publisher has already emitted an item, to generate the item to be emitted by the resulting PublisherresultSelector function only when the source Publisher sequence (this instance) emits an item@CheckReturnValue@NonNull@BackpressureSupport(value=PASS_THROUGH)@SchedulerSupport(value="none")public final <T1,T2,R> Flowable<R> withLatestFrom(Publisher<T1> source1,Publisher<T2> source2,Function3<? superT,? super T1,? super T2,R> combiner)
Note that this operator doesn't emit anything until all other sources have produced at least one value. The resulting emission only happens when this Publisher emits (and not when any of the other sources emit, unlike combineLatest). If a source doesn't produce any value and just completes, the sequence is completed immediately.
Publisher and the downstream Subscriber. The otherPublishers are consumed in an unbounded manner.Scheduler.T1 - the first other source's value typeT2 - the second other source's value typeR - the result value typesource1 - the first other Publishersource2 - the second other Publishercombiner - the function called with an array of values from each participating Publisher@CheckReturnValue@NonNull@BackpressureSupport(value=PASS_THROUGH)@SchedulerSupport(value="none")public final <T1,T2,T3,R> Flowable<R> withLatestFrom(Publisher<T1> source1,Publisher<T2> source2,Publisher<T3> source3,Function4<? superT,? super T1,? super T2,? super T3,R> combiner)
Note that this operator doesn't emit anything until all other sources have produced at least one value. The resulting emission only happens when this Publisher emits (and not when any of the other sources emit, unlike combineLatest). If a source doesn't produce any value and just completes, the sequence is completed immediately.
Publisher and the downstream Subscriber. The otherPublishers are consumed in an unbounded manner.Scheduler.T1 - the first other source's value typeT2 - the second other source's value typeT3 - the third other source's value typeR - the result value typesource1 - the first other Publishersource2 - the second other Publishersource3 - the third other Publishercombiner - the function called with an array of values from each participating Publisher@CheckReturnValue@NonNull@BackpressureSupport(value=PASS_THROUGH)@SchedulerSupport(value="none")public final <T1,T2,T3,T4,R> Flowable<R> withLatestFrom(Publisher<T1> source1,Publisher<T2> source2,Publisher<T3> source3,Publisher<T4> source4,Function5<? superT,? super T1,? super T2,? super T3,? super T4,R> combiner)
Note that this operator doesn't emit anything until all other sources have produced at least one value. The resulting emission only happens when this Publisher emits (and not when any of the other sources emit, unlike combineLatest). If a source doesn't produce any value and just completes, the sequence is completed immediately.
Publisher and the downstream Subscriber. The otherPublishers are consumed in an unbounded manner.Scheduler.T1 - the first other source's value typeT2 - the second other source's value typeT3 - the third other source's value typeT4 - the fourth other source's value typeR - the result value typesource1 - the first other Publishersource2 - the second other Publishersource3 - the third other Publishersource4 - the fourth other Publishercombiner - the function called with an array of values from each participating Publisher@CheckReturnValue@NonNull@BackpressureSupport(value=PASS_THROUGH)@SchedulerSupport(value="none")public final <R> Flowable<R> withLatestFrom(Publisher<?>[] others,Function<? superObject[],R> combiner)
Note that this operator doesn't emit anything until all other sources have produced at least one value. The resulting emission only happens when this Publisher emits (and not when any of the other sources emit, unlike combineLatest). If a source doesn't produce any value and just completes, the sequence is completed immediately.
Publisher and the downstream Subscriber. The otherPublishers are consumed in an unbounded manner.Scheduler.R - the result value typeothers - the array of other sourcescombiner - the function called with an array of values from each participating Publisher@CheckReturnValue@NonNull@BackpressureSupport(value=PASS_THROUGH)@SchedulerSupport(value="none")public final <R> Flowable<R> withLatestFrom(Iterable<? extendsPublisher<?>> others,Function<? superObject[],R> combiner)
Note that this operator doesn't emit anything until all other sources have produced at least one value. The resulting emission only happens when this Publisher emits (and not when any of the other sources emit, unlike combineLatest). If a source doesn't produce any value and just completes, the sequence is completed immediately.
Publisher and the downstream Subscriber. The otherPublishers are consumed in an unbounded manner.Scheduler.R - the result value typeothers - the iterable of other sourcescombiner - the function called with an array of values from each participating Publisher@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <U,R> Flowable<R> zipWith(Iterable<U> other,BiFunction<? superT,? super U,? extends R> zipper)

Note that theother Iterable is evaluated as items are observed from the source Publisher; it is not pre-consumed. This allows you to zip infinite streams on either side.
interval(long, TimeUnit) may result in MissingBackpressureException, use one of theonBackpressureX to handle similar, backpressure-ignoring sources.zipWith does not operate by default on a particularScheduler.U - the type of items in theother IterableR - the type of items emitted by the resulting Publisherother - the Iterable sequencezipper - a function that combines the pairs of items from the Publisher and the Iterable to generate the items to be emitted by the resulting Publisherother Iterable sequence and emits the results ofzipFunction applied to these pairs@CheckReturnValue@NonNull@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <U,R> Flowable<R> zipWith(Publisher<? extends U> other,BiFunction<? superT,? super U,? extends R> zipper)
The operator subscribes to its sources in the order they are specified and completes eagerly if one of the sources is shorter than the rest while canceling the other sources. Therefore, it is possible those other sources will never be able to run to completion (and thus not callingdoOnComplete()). This can also happen if the sources are exactly the same length; if source A completes and B has been consumed and is about to complete, the operator detects A won't be sending further values and it will cancel B immediately. For example:
range(1, 5).doOnComplete(action1).zipWith(range(6, 5).doOnComplete(action2), (a, b) -> a + b)action1 will be called butaction2 won't.doOnCancel(Action) as well or useusing() to do cleanup in case of completion or cancellation.
interval(long, TimeUnit) may result in MissingBackpressureException, use one of theonBackpressureX to handle similar, backpressure-ignoring sources.zipWith does not operate by default on a particularScheduler.U - the type of items emitted by theother PublisherR - the type of items emitted by the resulting Publisherother - the other Publisherzipper - a function that combines the pairs of items from the two Publishers to generate the items to be emitted by the resulting Publisherother Publisher and emits the results ofzipFunction applied to these pairs@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <U,R> Flowable<R> zipWith(Publisher<? extends U> other,BiFunction<? superT,? super U,? extends R> zipper, boolean delayError)
The operator subscribes to its sources in the order they are specified and completes eagerly if one of the sources is shorter than the rest while canceling the other sources. Therefore, it is possible those other sources will never be able to run to completion (and thus not callingdoOnComplete()). This can also happen if the sources are exactly the same length; if source A completes and B has been consumed and is about to complete, the operator detects A won't be sending further values and it will cancel B immediately. For example:
range(1, 5).doOnComplete(action1).zipWith(range(6, 5).doOnComplete(action2), (a, b) -> a + b)action1 will be called butaction2 won't.doOnCancel(Action) as well or useusing() to do cleanup in case of completion or cancellation.
interval(long, TimeUnit) may result in MissingBackpressureException, use one of theonBackpressureX to handle similar, backpressure-ignoring sources.zipWith does not operate by default on a particularScheduler.U - the type of items emitted by theother PublisherR - the type of items emitted by the resulting Publisherother - the other Publisherzipper - a function that combines the pairs of items from the two Publishers to generate the items to be emitted by the resulting PublisherdelayError - if true, errors from the current Flowable or the other Publisher is delayed until both terminateother Publisher and emits the results ofzipFunction applied to these pairs@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final <U,R> Flowable<R> zipWith(Publisher<? extends U> other,BiFunction<? superT,? super U,? extends R> zipper, boolean delayError, int bufferSize)
The operator subscribes to its sources in the order they are specified and completes eagerly if one of the sources is shorter than the rest while canceling the other sources. Therefore, it is possible those other sources will never be able to run to completion (and thus not callingdoOnComplete()). This can also happen if the sources are exactly the same length; if source A completes and B has been consumed and is about to complete, the operator detects A won't be sending further values and it will cancel B immediately. For example:
range(1, 5).doOnComplete(action1).zipWith(range(6, 5).doOnComplete(action2), (a, b) -> a + b)action1 will be called butaction2 won't.doOnCancel(Action) as well or useusing() to do cleanup in case of completion or cancellation.
interval(long, TimeUnit) may result in MissingBackpressureException, use one of theonBackpressureX to handle similar, backpressure-ignoring sources.zipWith does not operate by default on a particularScheduler.U - the type of items emitted by theother PublisherR - the type of items emitted by the resulting Publisherother - the other Publisherzipper - a function that combines the pairs of items from the two Publishers to generate the items to be emitted by the resulting PublisherbufferSize - the capacity hint for the buffer in the inner windowsdelayError - if true, errors from the current Flowable or the other Publisher is delayed until both terminateother Publisher and emits the results ofzipFunction applied to these pairs@CheckReturnValue@BackpressureSupport(value=UNBOUNDED_IN)@SchedulerSupport(value="none")public final TestSubscriber<T> test()
test does not operate by default on a particularScheduler.@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final TestSubscriber<T> test(long initialRequest)
initialRequest amount upfront.test does not operate by default on a particularScheduler.initialRequest - the initial request amount, positive@CheckReturnValue@BackpressureSupport(value=FULL)@SchedulerSupport(value="none")public final TestSubscriber<T> test(long initialRequest, boolean cancel)
initialRequest amount upfront.test does not operate by default on a particularScheduler.initialRequest - the initial request amount, positivecancel - should the TestSubscriber be canceled before the subscription?