T
- the type of the items emitted by the Flowable
public abstract class Flowable<T> extends Object implements Publisher<T>
Flowable
class that implements the Reactive Streams Publisher
Pattern and offers factory methods, intermediate operators and the ability to consume reactive dataflows.
Reactive Streams operates with Publisher
s which Flowable
extends. Many operators
therefore accept general Publisher
s directly and allow direct interoperation with other
Reactive Streams implementations.
The Flowable
hosts the default buffer size of 128 elements for operators, accessible via bufferSize()
,
that can be overridden globally via the system parameter rx3.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:
The Flowable
follows the protocol
onSubscribe onNext* (onError | onComplete)?
where the stream can be disposed through the Subscription
instance provided to consumers through
Subscriber.onSubscribe(Subscription)
.
Unlike the Observable.subscribe()
of version 1.x, subscribe(Subscriber)
does not allow external cancellation
of a subscription and the Subscriber
instance is expected to expose such capability if needed.
Flowable
s support backpressure and require Subscriber
s to signal demand via Subscription.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 between Publisher
s and Subscriber
s, so much so
that there is a significant performance penalty due certain timing requirements and the need to prepare for invalid
request amounts via Subscription.request(long)
.
Therefore, RxJava has introduced the FlowableSubscriber
interface that indicates the consumer can be driven with relaxed rules.
All RxJava operators are implemented with these relaxed rules in mind.
If the subscribing Subscriber
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 of Reactive Streams
rules to be followed to the letter. See the wiki for
some guidance if such custom implementations are necessary.
The recommended way of creating custom Flowable
s is by using the create(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 as Flowable
, are generally synchronous and sequential in nature. In the ReactiveX design, the location (thread)
where operators run is orthogonal to when the operators can work with data. This means that asynchrony and parallelism
has to be explicitly expressed via operators such as subscribeOn(Scheduler)
, observeOn(Scheduler)
and parallel()
. In general,
operators featuring a Scheduler
parameter are introducing this type of asynchrony into the flow.
For more information see the ReactiveX documentation.
Observable
,
ParallelFlowable
,
DisposableSubscriber
Constructor and Description |
---|
Flowable() |
Modifier and Type | Method and Description |
---|---|
@NonNull Single<Boolean> |
all(@NonNull Predicate<? super T> predicate)
|
static <T> @NonNull Flowable<T> |
amb(@NonNull Iterable<? extends Publisher<? extends T>> sources)
|
static <T> @NonNull Flowable<T> |
ambArray(Publisher<? extends T>... sources)
Mirrors the one
Publisher in an array of several Publisher s that first either emits an item or sends
a termination notification. |
@NonNull Flowable<T> |
ambWith(@NonNull Publisher<? extends T> other)
Mirrors the
Publisher (current or provided) that first either emits an item or sends a termination
notification. |
@NonNull Single<Boolean> |
any(@NonNull Predicate<? super T> predicate)
Returns a
Single that emits true if any item emitted by the current Flowable satisfies a
specified condition, otherwise false . |
T |
blockingFirst()
Returns the first item emitted by this
Flowable , or throws
NoSuchElementException 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(@NonNull Consumer<? super T> onNext)
Consumes the current
Flowable in a blocking fashion and invokes the given
Consumer with each upstream item on the current thread until the
upstream terminates. |
void |
blockingForEach(@NonNull Consumer<? super T> onNext,
int bufferSize)
Consumes the current
Flowable in a blocking fashion and invokes the given
Consumer with each upstream item on the current thread until the
upstream terminates. |
@NonNull Iterable<T> |
blockingIterable()
Converts this
Flowable into an Iterable . |
@NonNull Iterable<T> |
blockingIterable(int bufferSize)
Converts this
Flowable into an Iterable . |
T |
blockingLast()
Returns the last item emitted by this
Flowable , or throws
NoSuchElementException if this Flowable emits no items. |
T |
blockingLast(T defaultItem)
Returns the last item emitted by this
Flowable , or a default value if it emits no
items. |
@NonNull Iterable<T> |
blockingLatest()
Returns an
Iterable that returns the latest item emitted by this Flowable ,
waiting if necessary for one to become available. |
@NonNull Iterable<T> |
blockingMostRecent(T initialItem)
Returns an
Iterable that always returns the item most recently emitted by this
Flowable . |
@NonNull Iterable<T> |
blockingNext()
Returns an
Iterable that blocks until this Flowable emits another item, then
returns that item. |
T |
blockingSingle()
If this
Flowable completes after emitting a single item, return that item, otherwise
throw a NoSuchElementException . |
T |
blockingSingle(T defaultItem)
If this
Flowable completes after emitting a single item, return that item; if it emits
more than one item, throw an IllegalArgumentException ; if it emits no items, return a default
value. |
@NonNull Stream<T> |
blockingStream()
Creates a sequential
Stream to consume or process this Flowable in a blocking manner via
the Java Stream API. |
@NonNull Stream<T> |
blockingStream(int prefetch)
Creates a sequential
Stream to consume or process this Flowable in a blocking manner via
the Java Stream API. |
void |
blockingSubscribe()
Runs the current
Flowable to a terminal event, ignoring any values and rethrowing any exception. |
void |
blockingSubscribe(@NonNull Consumer<? super T> onNext)
Subscribes to the source and calls the given callbacks on the current thread.
|
void |
blockingSubscribe(@NonNull Consumer<? super T> onNext,
@NonNull Consumer<? super Throwable> onError)
Subscribes to the source and calls the given callbacks on the current thread.
|
void |
blockingSubscribe(@NonNull Consumer<? super T> onNext,
@NonNull Consumer<? super Throwable> onError,
@NonNull Action onComplete)
Subscribes to the source and calls the given callbacks on the current thread.
|
void |
blockingSubscribe(@NonNull Consumer<? super T> onNext,
@NonNull Consumer<? super Throwable> onError,
@NonNull Action onComplete,
int bufferSize)
Subscribes to the source and calls the given callbacks on the current thread.
|
void |
blockingSubscribe(@NonNull Consumer<? super T> onNext,
@NonNull Consumer<? super Throwable> onError,
int bufferSize)
Subscribes to the source and calls the given callbacks on the current thread.
|
void |
blockingSubscribe(@NonNull Consumer<? super T> onNext,
int bufferSize)
Subscribes to the source and calls the given callbacks on the current thread.
|
void |
blockingSubscribe(@NonNull Subscriber<? super T> subscriber)
Subscribes to the source and calls the
Subscriber methods on the current thread. |
@NonNull Flowable<List<T>> |
buffer(int count)
Returns a
Flowable that emits buffers of items it collects from the current Flowable . |
@NonNull Flowable<List<T>> |
buffer(int count,
int skip)
Returns a
Flowable that emits buffers of items it collects from the current Flowable . |
<U extends Collection<? super T>> |
buffer(int count,
int skip,
@NonNull Supplier<U> bufferSupplier)
Returns a
Flowable that emits buffers of items it collects from the current Flowable . |
<U extends Collection<? super T>> |
buffer(int count,
@NonNull Supplier<U> bufferSupplier)
Returns a
Flowable that emits buffers of items it collects from the current Flowable . |
@NonNull Flowable<List<T>> |
buffer(long timespan,
long timeskip,
@NonNull TimeUnit unit)
Returns a
Flowable that emits buffers of items it collects from the current Flowable . |
@NonNull Flowable<List<T>> |
buffer(long timespan,
long timeskip,
@NonNull TimeUnit unit,
@NonNull Scheduler scheduler)
Returns a
Flowable that emits buffers of items it collects from the current Flowable . |
<U extends Collection<? super T>> |
buffer(long timespan,
long timeskip,
@NonNull TimeUnit unit,
@NonNull Scheduler scheduler,
@NonNull Supplier<U> bufferSupplier)
Returns a
Flowable that emits buffers of items it collects from the current Flowable . |
@NonNull Flowable<List<T>> |
buffer(long timespan,
@NonNull TimeUnit unit)
Returns a
Flowable that emits buffers of items it collects from the current Flowable . |
@NonNull Flowable<List<T>> |
buffer(long timespan,
@NonNull TimeUnit unit,
int count)
Returns a
Flowable that emits buffers of items it collects from the current Flowable . |
@NonNull Flowable<List<T>> |
buffer(long timespan,
@NonNull TimeUnit unit,
@NonNull Scheduler scheduler)
Returns a
Flowable that emits buffers of items it collects from the current Flowable . |
@NonNull Flowable<List<T>> |
buffer(long timespan,
@NonNull TimeUnit unit,
@NonNull Scheduler scheduler,
int count)
Returns a
Flowable that emits buffers of items it collects from the current Flowable . |
<U extends Collection<? super T>> |
buffer(long timespan,
@NonNull TimeUnit unit,
@NonNull Scheduler scheduler,
int count,
@NonNull Supplier<U> bufferSupplier,
boolean restartTimerOnMaxSize)
Returns a
Flowable that emits buffers of items it collects from the current Flowable . |
<TOpening,TClosing> |
buffer(@NonNull Publisher<? extends TOpening> openingIndicator,
@NonNull Function<? super TOpening,? extends Publisher<? extends TClosing>> closingIndicator)
Returns a
Flowable that emits buffers of items it collects from the current Flowable . |
<TOpening,TClosing,U extends Collection<? super T>> |
buffer(@NonNull Publisher<? extends TOpening> openingIndicator,
@NonNull Function<? super TOpening,? extends Publisher<? extends TClosing>> closingIndicator,
@NonNull Supplier<U> bufferSupplier)
Returns a
Flowable that emits buffers of items it collects from the current Flowable . |
<B> @NonNull Flowable<List<T>> |
buffer(@NonNull Publisher<B> boundaryIndicator)
Returns a
Flowable that emits non-overlapping buffered items from the current Flowable each time the
specified boundary Publisher emits an item. |
<B> @NonNull Flowable<List<T>> |
buffer(@NonNull Publisher<B> boundaryIndicator,
int initialCapacity)
Returns a
Flowable that emits non-overlapping buffered items from the current Flowable each time the
specified boundary Publisher emits an item. |
<B,U extends Collection<? super T>> |
buffer(@NonNull Publisher<B> boundaryIndicator,
@NonNull Supplier<U> bufferSupplier)
Returns a
Flowable that emits non-overlapping buffered items from the current Flowable each time the
specified boundary Publisher emits an item. |
static int |
bufferSize()
Returns the default internal buffer size used by most async operators.
|
@NonNull 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. |
@NonNull 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> @NonNull Flowable<U> |
cast(@NonNull Class<U> clazz)
Returns a
Flowable that emits the upstream items while
they can be cast via Class.cast(Object) until the upstream terminates,
or until the upstream signals an item which can't be cast,
resulting in a ClassCastException to be signaled to the downstream. |
<R,A> @NonNull Single<R> |
collect(@NonNull Collector<? super T,A,R> collector)
|
<U> @NonNull Single<U> |
collect(@NonNull Supplier<? extends U> initialItemSupplier,
@NonNull BiConsumer<? super U,? super T> collector)
|
<U> @NonNull Single<U> |
collectInto(U initialItem,
@NonNull BiConsumer<? super U,? super T> collector)
|
static <T,R> @NonNull Flowable<R> |
combineLatest(@NonNull Iterable<? extends Publisher<? extends T>> sources,
@NonNull Function<? super Object[],? extends R> combiner)
Combines a collection of source
Publisher s by emitting an item that aggregates the latest values of each of
the source Publisher s each time an item is received from any of the source Publisher s, where this
aggregation is defined by a specified function. |
static <T,R> @NonNull Flowable<R> |
combineLatest(@NonNull Iterable<? extends Publisher<? extends T>> sources,
@NonNull Function<? super Object[],? extends R> combiner,
int bufferSize)
Combines a collection of source
Publisher s by emitting an item that aggregates the latest values of each of
the source Publisher s each time an item is received from any of the source Publisher s, where this
aggregation is defined by a specified function. |
static <T1,T2,R> @NonNull Flowable<R> |
combineLatest(@NonNull Publisher<? extends T1> source1,
@NonNull Publisher<? extends T2> source2,
@NonNull BiFunction<? super T1,? super T2,? extends R> combiner)
Combines two source
Publisher s by emitting an item that aggregates the latest values of each of the
source Publisher s each time an item is received from either of the source Publisher s, where this
aggregation is defined by a specified function. |
static <T1,T2,T3,R> |
combineLatest(@NonNull Publisher<? extends T1> source1,
@NonNull Publisher<? extends T2> source2,
@NonNull Publisher<? extends T3> source3,
@NonNull Function3<? super T1,? super T2,? super T3,? extends R> combiner)
Combines three source
Publisher s by emitting an item that aggregates the latest values of each of the
source Publisher s each time an item is received from any of the source Publisher s, where this
aggregation is defined by a specified function. |
static <T1,T2,T3,T4,R> |
combineLatest(@NonNull Publisher<? extends T1> source1,
@NonNull Publisher<? extends T2> source2,
@NonNull Publisher<? extends T3> source3,
@NonNull Publisher<? extends T4> source4,
@NonNull Function4<? super T1,? super T2,? super T3,? super T4,? extends R> combiner)
Combines four source
Publisher s by emitting an item that aggregates the latest values of each of the
source Publisher s each time an item is received from any of the source Publisher s, where this
aggregation is defined by a specified function. |
static <T1,T2,T3,T4,T5,R> |
combineLatest(@NonNull Publisher<? extends T1> source1,
@NonNull Publisher<? extends T2> source2,
@NonNull Publisher<? extends T3> source3,
@NonNull Publisher<? extends T4> source4,
@NonNull Publisher<? extends T5> source5,
@NonNull Function5<? super T1,? super T2,? super T3,? super T4,? super T5,? extends R> combiner)
Combines five source
Publisher s by emitting an item that aggregates the latest values of each of the
source Publisher s each time an item is received from any of the source Publisher s, where this
aggregation is defined by a specified function. |
static <T1,T2,T3,T4,T5,T6,R> |
combineLatest(@NonNull Publisher<? extends T1> source1,
@NonNull Publisher<? extends T2> source2,
@NonNull Publisher<? extends T3> source3,
@NonNull Publisher<? extends T4> source4,
@NonNull Publisher<? extends T5> source5,
@NonNull Publisher<? extends T6> source6,
@NonNull Function6<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? extends R> combiner)
Combines six source
Publisher s by emitting an item that aggregates the latest values of each of the
source Publisher s each time an item is received from any of the source Publisher s, where this
aggregation is defined by a specified function. |
static <T1,T2,T3,T4,T5,T6,T7,R> |
combineLatest(@NonNull Publisher<? extends T1> source1,
@NonNull Publisher<? extends T2> source2,
@NonNull Publisher<? extends T3> source3,
@NonNull Publisher<? extends T4> source4,
@NonNull Publisher<? extends T5> source5,
@NonNull Publisher<? extends T6> source6,
@NonNull Publisher<? extends T7> source7,
@NonNull Function7<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? extends R> combiner)
Combines seven source
Publisher s by emitting an item that aggregates the latest values of each of the
source Publisher s each time an item is received from any of the source Publisher s, where this
aggregation is defined by a specified function. |
static <T1,T2,T3,T4,T5,T6,T7,T8,R> |
combineLatest(@NonNull Publisher<? extends T1> source1,
@NonNull Publisher<? extends T2> source2,
@NonNull Publisher<? extends T3> source3,
@NonNull Publisher<? extends T4> source4,
@NonNull Publisher<? extends T5> source5,
@NonNull Publisher<? extends T6> source6,
@NonNull Publisher<? extends T7> source7,
@NonNull Publisher<? extends T8> source8,
@NonNull Function8<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? super T8,? extends R> combiner)
Combines eight source
Publisher s by emitting an item that aggregates the latest values of each of the
source Publisher s each time an item is received from any of the source Publisher s, where this
aggregation is defined by a specified function. |
static <T1,T2,T3,T4,T5,T6,T7,T8,T9,R> |
combineLatest(@NonNull Publisher<? extends T1> source1,
@NonNull Publisher<? extends T2> source2,
@NonNull Publisher<? extends T3> source3,
@NonNull Publisher<? extends T4> source4,
@NonNull Publisher<? extends T5> source5,
@NonNull Publisher<? extends T6> source6,
@NonNull Publisher<? extends T7> source7,
@NonNull Publisher<? extends T8> source8,
@NonNull Publisher<? extends T9> source9,
@NonNull 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
Publisher s by emitting an item that aggregates the latest values of each of the
source Publisher s each time an item is received from any of the source Publisher s, where this
aggregation is defined by a specified function. |
static <T,R> @NonNull Flowable<R> |
combineLatestArray(@NonNull Publisher<? extends T>[] sources,
@NonNull Function<? super Object[],? extends R> combiner)
Combines a collection of source
Publisher s by emitting an item that aggregates the latest values of each of
the source Publisher s each time an item is received from any of the source Publisher s, where this
aggregation is defined by a specified function. |
static <T,R> @NonNull Flowable<R> |
combineLatestArray(@NonNull Publisher<? extends T>[] sources,
@NonNull Function<? super Object[],? extends R> combiner,
int bufferSize)
Combines a collection of source
Publisher s by emitting an item that aggregates the latest values of each of
the source Publisher s each time an item is received from any of the source Publisher s, where this
aggregation is defined by a specified function. |
static <T,R> @NonNull Flowable<R> |
combineLatestArrayDelayError(@NonNull Publisher<? extends T>[] sources,
@NonNull Function<? super Object[],? extends R> combiner)
Combines a collection of source
Publisher s by emitting an item that aggregates the latest values of each of
the source Publisher s each time an item is received from any of the source Publisher s, where this
aggregation is defined by a specified function. |
static <T,R> @NonNull Flowable<R> |
combineLatestArrayDelayError(@NonNull Publisher<? extends T>[] sources,
@NonNull Function<? super Object[],? extends R> combiner,
int bufferSize)
Combines a collection of source
Publisher s by emitting an item that aggregates the latest values of each of
the source Publisher s each time an item is received from any of the source Publisher s, where this
aggregation is defined by a specified function and delays any error from the sources until
all source Publisher s terminate. |
static <T,R> @NonNull Flowable<R> |
combineLatestDelayError(@NonNull Iterable<? extends Publisher<? extends T>> sources,
@NonNull Function<? super Object[],? extends R> combiner)
Combines a collection of source
Publisher s by emitting an item that aggregates the latest values of each of
the source Publisher s each time an item is received from any of the source Publisher s, where this
aggregation is defined by a specified function and delays any error from the sources until
all source Publisher s terminate. |
static <T,R> @NonNull Flowable<R> |
combineLatestDelayError(@NonNull Iterable<? extends Publisher<? extends T>> sources,
@NonNull Function<? super Object[],? extends R> combiner,
int bufferSize)
Combines a collection of source
Publisher s by emitting an item that aggregates the latest values of each of
the source Publisher s each time an item is received from any of the source Publisher s, where this
aggregation is defined by a specified function and delays any error from the sources until
all source Publisher s terminate. |
<R> @NonNull Flowable<R> |
compose(@NonNull FlowableTransformer<? super T,? extends R> composer)
Transform the current
Flowable by applying a particular FlowableTransformer function to it. |
static <T> @NonNull Flowable<T> |
concat(@NonNull Iterable<? extends Publisher<? extends T>> sources)
|
static <T> @NonNull Flowable<T> |
concat(@NonNull Publisher<? extends Publisher<? extends T>> sources)
Returns a
Flowable that emits the items emitted by each of the Publisher s emitted by the source
Publisher , one after the other, without interleaving them. |
static <T> @NonNull Flowable<T> |
concat(@NonNull Publisher<? extends Publisher<? extends T>> sources,
int prefetch)
Returns a
Flowable that emits the items emitted by each of the Publisher s emitted by the source
Publisher , one after the other, without interleaving them. |
static <T> @NonNull Flowable<T> |
concat(@NonNull Publisher<? extends T> source1,
@NonNull Publisher<? extends T> source2)
Returns a
Flowable that emits the items emitted by two Publisher s, one after the other, without
interleaving them. |
static <T> @NonNull Flowable<T> |
concat(@NonNull Publisher<? extends T> source1,
@NonNull Publisher<? extends T> source2,
@NonNull Publisher<? extends T> source3)
Returns a
Flowable that emits the items emitted by three Publisher s, one after the other, without
interleaving them. |
static <T> @NonNull Flowable<T> |
concat(@NonNull Publisher<? extends T> source1,
@NonNull Publisher<? extends T> source2,
@NonNull Publisher<? extends T> source3,
@NonNull Publisher<? extends T> source4)
Returns a
Flowable that emits the items emitted by four Publisher s, one after the other, without
interleaving them. |
static <T> @NonNull Flowable<T> |
concatArray(Publisher<? extends T>... sources)
Concatenates a variable number of
Publisher sources. |
static <T> @NonNull 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> @NonNull Flowable<T> |
concatArrayEager(int maxConcurrency,
int prefetch,
Publisher<? extends T>... sources)
Concatenates an array of
Publisher s eagerly into a single stream of values. |
static <T> @NonNull Flowable<T> |
concatArrayEager(Publisher<? extends T>... sources)
Concatenates an array of
Publisher s eagerly into a single stream of values. |
static <T> @NonNull Flowable<T> |
concatArrayEagerDelayError(int maxConcurrency,
int prefetch,
Publisher<? extends T>... sources)
Concatenates an array of
Publisher s eagerly into a single stream of values
and delaying any errors until all sources terminate. |
static <T> @NonNull Flowable<T> |
concatArrayEagerDelayError(Publisher<? extends T>... sources)
Concatenates an array of
Publisher s eagerly into a single stream of values
and delaying any errors until all sources terminate. |
static <T> @NonNull Flowable<T> |
concatDelayError(@NonNull Iterable<? extends Publisher<? extends T>> sources)
|
static <T> @NonNull Flowable<T> |
concatDelayError(@NonNull Publisher<? extends Publisher<? extends T>> sources)
Concatenates the
Publisher sequence of Publisher s 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 Publisher s terminate. |
static <T> @NonNull Flowable<T> |
concatDelayError(@NonNull Publisher<? extends Publisher<? extends T>> sources,
int prefetch,
boolean tillTheEnd)
Concatenates the
Publisher sequence of Publisher s 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 Publisher s terminate. |
static <T> @NonNull Flowable<T> |
concatEager(@NonNull Iterable<? extends Publisher<? extends T>> sources)
Concatenates a sequence of
Publisher s eagerly into a single stream of values. |
static <T> @NonNull Flowable<T> |
concatEager(@NonNull Iterable<? extends Publisher<? extends T>> sources,
int maxConcurrency,
int prefetch)
Concatenates a sequence of
Publisher s eagerly into a single stream of values and
runs a limited number of inner sequences at once. |
static <T> @NonNull Flowable<T> |
concatEager(@NonNull Publisher<? extends Publisher<? extends T>> sources)
Concatenates a
Publisher sequence of Publisher s eagerly into a single stream of values. |
static <T> @NonNull Flowable<T> |
concatEager(@NonNull Publisher<? extends Publisher<? extends T>> sources,
int maxConcurrency,
int prefetch)
Concatenates a
Publisher sequence of Publisher s eagerly into a single stream of values and
runs a limited number of inner sequences at once. |
static <T> @NonNull Flowable<T> |
concatEagerDelayError(@NonNull Iterable<? extends Publisher<? extends T>> sources)
Concatenates a sequence of
Publisher s eagerly into a single stream of values,
delaying errors until all the inner sequences terminate. |
static <T> @NonNull Flowable<T> |
concatEagerDelayError(@NonNull Iterable<? extends Publisher<? extends T>> sources,
int maxConcurrency,
int prefetch)
Concatenates a sequence of
Publisher s eagerly into a single stream of values,
delaying errors until all the inner sequences terminate and runs a limited number
of inner sequences at once. |
static <T> @NonNull Flowable<T> |
concatEagerDelayError(@NonNull Publisher<? extends Publisher<? extends T>> sources)
Concatenates a
Publisher sequence of Publisher s eagerly into a single stream of values,
delaying errors until all the inner and the outer sequences terminate. |
static <T> @NonNull Flowable<T> |
concatEagerDelayError(@NonNull Publisher<? extends Publisher<? extends T>> sources,
int maxConcurrency,
int prefetch)
Concatenates a
Publisher sequence of Publisher s eagerly into a single stream of values,
delaying errors until all the inner and outer sequences terminate and runs a limited number of inner
sequences at once. |
<R> @NonNull Flowable<R> |
concatMap(@NonNull Function<? super T,? extends Publisher<? extends R>> mapper)
Returns a new
Flowable that emits items resulting from applying a function that you supply to each item
emitted by the current Flowable , where that function returns a Publisher , and then emitting the items
that result from concatenating those returned Publisher s. |
<R> @NonNull Flowable<R> |
concatMap(@NonNull Function<? super T,? extends Publisher<? 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 current Flowable , where that function returns a Publisher , and then emitting the items
that result from concatenating those returned Publisher s. |
<R> @NonNull Flowable<R> |
concatMap(@NonNull Function<? super T,? extends Publisher<? extends R>> mapper,
int prefetch,
@NonNull Scheduler scheduler)
Returns a new
Flowable that emits items resulting from applying a function (on a designated scheduler)
that you supply to each item emitted by the current Flowable , where that function returns a Publisher , and then emitting the items
that result from concatenating those returned Publisher s. |
@NonNull Completable |
concatMapCompletable(@NonNull Function<? super T,? extends CompletableSource> mapper)
Maps the upstream items into
CompletableSource s and subscribes to them one after the
other completes. |
@NonNull Completable |
concatMapCompletable(@NonNull Function<? super T,? extends CompletableSource> mapper,
int prefetch)
Maps the upstream items into
CompletableSource s and subscribes to them one after the
other completes. |
@NonNull Completable |
concatMapCompletableDelayError(@NonNull Function<? super T,? extends CompletableSource> mapper)
Maps the upstream items into
CompletableSource s and subscribes to them one after the
other terminates, delaying all errors till both this Flowable and all
inner CompletableSource s terminate. |
@NonNull Completable |
concatMapCompletableDelayError(@NonNull Function<? super T,? extends CompletableSource> mapper,
boolean tillTheEnd)
Maps the upstream items into
CompletableSource s and subscribes to them one after the
other terminates, optionally delaying all errors till both this Flowable and all
inner CompletableSource s terminate. |
@NonNull Completable |
concatMapCompletableDelayError(@NonNull Function<? super T,? extends CompletableSource> mapper,
boolean tillTheEnd,
int prefetch)
Maps the upstream items into
CompletableSource s and subscribes to them one after the
other terminates, optionally delaying all errors till both this Flowable and all
inner CompletableSource s terminate. |
<R> @NonNull Flowable<R> |
concatMapDelayError(@NonNull Function<? super T,? extends Publisher<? 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 Publisher s
till all of them terminate. |
<R> @NonNull Flowable<R> |
concatMapDelayError(@NonNull Function<? super T,? extends Publisher<? extends R>> mapper,
boolean tillTheEnd,
int prefetch)
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 Publisher s
till all of them terminate. |
<R> @NonNull Flowable<R> |
concatMapDelayError(@NonNull Function<? super T,? extends Publisher<? extends R>> mapper,
boolean tillTheEnd,
int prefetch,
@NonNull Scheduler scheduler)
Maps each of the upstream items into a
Publisher , subscribes to them one after the other,
one at a time and emits their values in order
while executing the mapper function on the designated scheduler, delaying any error from either this or any of the
inner Publisher s till all of them terminate. |
<R> @NonNull Flowable<R> |
concatMapEager(@NonNull Function<? super T,? extends Publisher<? extends R>> mapper)
Maps a sequence of values into
Publisher s and concatenates these Publisher s eagerly into a single
Publisher . |
<R> @NonNull Flowable<R> |
concatMapEager(@NonNull Function<? super T,? extends Publisher<? extends R>> mapper,
int maxConcurrency,
int prefetch)
Maps a sequence of values into
Publisher s and concatenates these Publisher s eagerly into a single
Publisher . |
<R> @NonNull Flowable<R> |
concatMapEagerDelayError(@NonNull Function<? super T,? extends Publisher<? extends R>> mapper,
boolean tillTheEnd)
Maps a sequence of values into
Publisher s and concatenates these Publisher s eagerly into a single
Publisher . |
<R> @NonNull Flowable<R> |
concatMapEagerDelayError(@NonNull Function<? super T,? extends Publisher<? extends R>> mapper,
boolean tillTheEnd,
int maxConcurrency,
int prefetch)
Maps a sequence of values into
Publisher s and concatenates these Publisher s eagerly into a single
Flowable sequence. |
<U> @NonNull Flowable<U> |
concatMapIterable(@NonNull Function<? super T,? extends Iterable<? extends U>> mapper)
Returns a
Flowable that concatenate each item emitted by the current Flowable with the values in an
Iterable corresponding to that item that is generated by a selector. |
<U> @NonNull Flowable<U> |
concatMapIterable(@NonNull Function<? super T,? extends Iterable<? extends U>> mapper,
int prefetch)
Returns a
Flowable that concatenate each item emitted by the current Flowable with the values in an
Iterable corresponding to that item that is generated by a selector. |
<R> @NonNull Flowable<R> |
concatMapMaybe(@NonNull Function<? super T,? extends MaybeSource<? extends R>> mapper)
Maps the upstream items into
MaybeSource s and subscribes to them one after the
other succeeds or completes, emits their success value if available or terminates immediately if
either this Flowable or the current inner MaybeSource fail. |
<R> @NonNull Flowable<R> |
concatMapMaybe(@NonNull Function<? super T,? extends MaybeSource<? extends R>> mapper,
int prefetch)
Maps the upstream items into
MaybeSource s and subscribes to them one after the
other succeeds or completes, emits their success value if available or terminates immediately if
either this Flowable or the current inner MaybeSource fail. |
<R> @NonNull Flowable<R> |
concatMapMaybeDelayError(@NonNull Function<? super T,? extends MaybeSource<? extends R>> mapper)
Maps the upstream items into
MaybeSource s and subscribes to them one after the
other terminates, emits their success value if available and delaying all errors
till both this Flowable and all inner MaybeSource s terminate. |
<R> @NonNull Flowable<R> |
concatMapMaybeDelayError(@NonNull Function<? super T,? extends MaybeSource<? extends R>> mapper,
boolean tillTheEnd)
Maps the upstream items into
MaybeSource s and subscribes to them one after the
other terminates, emits their success value if available and optionally delaying all errors
till both this Flowable and all inner MaybeSource s terminate. |
<R> @NonNull Flowable<R> |
concatMapMaybeDelayError(@NonNull Function<? super T,? extends MaybeSource<? extends R>> mapper,
boolean tillTheEnd,
int prefetch)
Maps the upstream items into
MaybeSource s and subscribes to them one after the
other terminates, emits their success value if available and optionally delaying all errors
till both this Flowable and all inner MaybeSource s terminate. |
<R> @NonNull Flowable<R> |
concatMapSingle(@NonNull Function<? super T,? extends SingleSource<? extends R>> mapper)
Maps the upstream items into
SingleSource s and subscribes to them one after the
other succeeds, emits their success values or terminates immediately if
either this Flowable or the current inner SingleSource fail. |
<R> @NonNull Flowable<R> |
concatMapSingle(@NonNull Function<? super T,? extends SingleSource<? extends R>> mapper,
int prefetch)
Maps the upstream items into
SingleSource s and subscribes to them one after the
other succeeds, emits their success values or terminates immediately if
either this Flowable or the current inner SingleSource fail. |
<R> @NonNull Flowable<R> |
concatMapSingleDelayError(@NonNull Function<? super T,? extends SingleSource<? extends R>> mapper)
Maps the upstream items into
SingleSource s and subscribes to them one after the
other succeeds or fails, emits their success values and delays all errors
till both this Flowable and all inner SingleSource s terminate. |
<R> @NonNull Flowable<R> |
concatMapSingleDelayError(@NonNull Function<? super T,? extends SingleSource<? extends R>> mapper,
boolean tillTheEnd)
Maps the upstream items into
SingleSource s and subscribes to them one after the
other succeeds or fails, emits their success values and optionally delays all errors
till both this Flowable and all inner SingleSource s terminate. |
<R> @NonNull Flowable<R> |
concatMapSingleDelayError(@NonNull Function<? super T,? extends SingleSource<? extends R>> mapper,
boolean tillTheEnd,
int prefetch)
Maps the upstream items into
SingleSource s and subscribes to them one after the
other succeeds or fails, emits their success values and optionally delays errors
till both this Flowable and all inner SingleSource s terminate. |
<R> @NonNull Flowable<R> |
concatMapStream(@NonNull Function<? super T,? extends Stream<? extends R>> mapper)
Maps each upstream item into a
Stream and emits the Stream 's items to the downstream in a sequential fashion. |
<R> @NonNull Flowable<R> |
concatMapStream(@NonNull Function<? super T,? extends Stream<? extends R>> mapper,
int prefetch)
Maps each upstream item into a
Stream and emits the Stream 's items to the downstream in a sequential fashion. |
@NonNull Flowable<T> |
concatWith(@NonNull CompletableSource other)
Returns a
Flowable that emits items from this Flowable and when it completes normally, the
other CompletableSource is subscribed to and the returned Flowable emits its terminal events. |
@NonNull Flowable<T> |
concatWith(@NonNull MaybeSource<? extends T> other)
Returns a
Flowable that emits the items from this Flowable followed by the success item or terminal events
of the other MaybeSource . |
@NonNull Flowable<T> |
concatWith(@NonNull Publisher<? extends T> other)
Returns a
Flowable that emits the items emitted from the current Flowable , then the next, one after
the other, without interleaving them. |
@NonNull Flowable<T> |
concatWith(@NonNull SingleSource<? extends T> other)
Returns a
Flowable that emits the items from this Flowable followed by the success item or error event
of the other SingleSource . |
@NonNull Single<Boolean> |
contains(@NonNull Object item)
|
@NonNull Single<Long> |
count()
|
static <T> @NonNull Flowable<T> |
create(@NonNull FlowableOnSubscribe<T> source,
@NonNull BackpressureStrategy mode)
Provides an API (via a cold
Flowable ) that bridges the reactive world with the callback-style,
generally non-backpressured world. |
<U> @NonNull Flowable<T> |
debounce(@NonNull Function<? super T,? extends Publisher<U>> debounceIndicator)
Returns a
Flowable that mirrors the current Flowable , except that it drops items emitted by the
current Flowable that are followed by another item within a computed debounce duration. |
@NonNull Flowable<T> |
debounce(long timeout,
@NonNull TimeUnit unit)
Returns a
Flowable that mirrors the current Flowable , except that it drops items emitted by the
current Flowable that are followed by newer items before a timeout value expires. |
@NonNull Flowable<T> |
debounce(long timeout,
@NonNull TimeUnit unit,
@NonNull Scheduler scheduler)
Returns a
Flowable that mirrors the current Flowable , except that it drops items emitted by the
current Flowable that are followed by newer items before a timeout value expires on a specified
Scheduler . |
@NonNull Flowable<T> |
debounce(long timeout,
@NonNull TimeUnit unit,
@NonNull Scheduler scheduler,
@NonNull Consumer<? super T> onDropped)
Returns a
Flowable that mirrors the current Flowable , except that it drops items emitted by the
current Flowable that are followed by newer items before a timeout value expires on a specified
Scheduler . |
@NonNull Flowable<T> |
defaultIfEmpty(T defaultItem)
Returns a
Flowable that emits the items emitted by the current Flowable or a specified default item
if the current Flowable is empty. |
static <T> @NonNull Flowable<T> |
defer(@NonNull Supplier<? extends Publisher<? extends T>> supplier)
Returns a
Flowable that calls a Publisher factory to create a Publisher for each new Subscriber
that subscribes. |
<U> @NonNull Flowable<T> |
delay(@NonNull Function<? super T,? extends Publisher<U>> itemDelayIndicator)
Returns a
Flowable that delays the emissions of the current Flowable via another Publisher on a
per-item basis. |
@NonNull Flowable<T> |
delay(long time,
@NonNull TimeUnit unit)
Returns a
Flowable that emits the items emitted by the current Flowable shifted forward in time by a
specified delay. |
@NonNull Flowable<T> |
delay(long time,
@NonNull TimeUnit unit,
boolean delayError)
Returns a
Flowable that emits the items emitted by the current Flowable shifted forward in time by a
specified delay. |
@NonNull Flowable<T> |
delay(long time,
@NonNull TimeUnit unit,
@NonNull Scheduler scheduler)
Returns a
Flowable that emits the items emitted by the current Flowable shifted forward in time by a
specified delay. |
@NonNull Flowable<T> |
delay(long time,
@NonNull TimeUnit unit,
@NonNull Scheduler scheduler,
boolean delayError)
Returns a
Flowable that emits the items emitted by the current Flowable shifted forward in time by a
specified delay. |
<U,V> @NonNull Flowable<T> |
delay(@NonNull Publisher<U> subscriptionIndicator,
@NonNull Function<? super T,? extends Publisher<V>> itemDelayIndicator)
Returns a
Flowable that delays the subscription to and emissions from the current Flowable via another
Publisher on a per-item basis. |
@NonNull Flowable<T> |
delaySubscription(long time,
@NonNull TimeUnit unit)
Returns a
Flowable that delays the subscription to the current Flowable by a given amount of time. |
@NonNull Flowable<T> |
delaySubscription(long time,
@NonNull TimeUnit unit,
@NonNull Scheduler scheduler)
Returns a
Flowable that delays the subscription to the current Flowable by a given amount of time,
both waiting and subscribing on a given Scheduler . |
<U> @NonNull Flowable<T> |
delaySubscription(@NonNull Publisher<U> subscriptionIndicator)
Returns a
Flowable that delays the subscription to this Publisher
until the other Publisher emits an element or completes normally. |
<R> @NonNull Flowable<R> |
dematerialize(@NonNull Function<? super T,Notification<R>> selector)
Returns a
Flowable that reverses the effect of materialize by transforming the
Notification objects extracted from the source items via a selector function
into their respective Subscriber signal types. |
@NonNull Flowable<T> |
distinct()
Returns a
Flowable that emits all items emitted by the current Flowable that are distinct
based on Object.equals(Object) comparison. |
<K> @NonNull Flowable<T> |
distinct(@NonNull Function<? super T,K> keySelector)
Returns a
Flowable that emits all items emitted by the current Flowable 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> @NonNull Flowable<T> |
distinct(@NonNull Function<? super T,K> keySelector,
@NonNull Supplier<? extends Collection<? super K>> collectionSupplier)
Returns a
Flowable that emits all items emitted by the current Flowable 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. |
@NonNull Flowable<T> |
distinctUntilChanged()
Returns a
Flowable that emits all items emitted by the current Flowable that are distinct from their
immediate predecessors based on Object.equals(Object) comparison. |
@NonNull Flowable<T> |
distinctUntilChanged(@NonNull BiPredicate<? super T,? super T> comparer)
Returns a
Flowable that emits all items emitted by the current Flowable that are distinct from their
immediate predecessors when compared with each other via the provided comparator function. |
<K> @NonNull Flowable<T> |
distinctUntilChanged(@NonNull Function<? super T,K> keySelector)
Returns a
Flowable that emits all items emitted by the current Flowable 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. |
@NonNull Flowable<T> |
doAfterNext(@NonNull Consumer<? super T> onAfterNext)
Calls the specified consumer with the current item after this item has been emitted to the downstream.
|
@NonNull Flowable<T> |
doAfterTerminate(@NonNull Action onAfterTerminate)
|
@NonNull Flowable<T> |
doFinally(@NonNull Action onFinally)
Calls the specified action after this
Flowable signals onError or onComplete or gets canceled by
the downstream. |
@NonNull Flowable<T> |
doOnCancel(@NonNull Action onCancel)
Calls the cancel
Action if the downstream cancels the sequence. |
@NonNull Flowable<T> |
doOnComplete(@NonNull Action onComplete)
|
@NonNull Flowable<T> |
doOnEach(@NonNull Consumer<? super Notification<T>> onNotification)
Invokes a
Consumer with a Notification instances matching the signals emitted by the current Flowable
before they are forwarded to the downstream. |
@NonNull Flowable<T> |
doOnEach(@NonNull Subscriber<? super T> subscriber)
Calls the appropriate methods of the given
Subscriber when the current Flowable signals events before forwarding it
to the downstream. |
@NonNull Flowable<T> |
doOnError(@NonNull Consumer<? super Throwable> onError)
|
@NonNull Flowable<T> |
doOnLifecycle(@NonNull Consumer<? super Subscription> onSubscribe,
@NonNull LongConsumer onRequest,
@NonNull Action onCancel)
Calls the appropriate
onXXX method (shared between all Subscriber s) for the lifecycle events of
the sequence (subscription, cancellation, requesting). |
@NonNull Flowable<T> |
doOnNext(@NonNull Consumer<? super T> onNext)
Calls the given
Consumer with the value emitted by the current Flowable before forwarding it to the downstream. |
@NonNull Flowable<T> |
doOnRequest(@NonNull LongConsumer onRequest)
Calls the given
LongConsumer with the request amount from the downstream before forwarding it
to the current Flowable . |
@NonNull Flowable<T> |
doOnSubscribe(@NonNull Consumer<? super Subscription> onSubscribe)
Calls the given
Consumer with the Subscription provided by the current Flowable upon
subscription from the downstream before forwarding it to the subscriber's
onSubscribe method. |
@NonNull Flowable<T> |
doOnTerminate(@NonNull Action onTerminate)
Calls the given
Action when the current Flowable completes normally or with an error before those signals
are forwarded to the downstream. |
@NonNull 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. |
@NonNull 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. |
@NonNull 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> @NonNull Flowable<T> |
empty()
Returns a
Flowable that emits no items to the Subscriber and immediately invokes its
onComplete method. |
static <T> @NonNull Flowable<T> |
error(@NonNull Supplier<? extends Throwable> supplier)
|
static <T> @NonNull Flowable<T> |
error(@NonNull Throwable throwable)
|
@NonNull Flowable<T> |
filter(@NonNull Predicate<? super T> predicate)
Filters items emitted by the current
Flowable by only emitting those that satisfy a specified predicate. |
@NonNull 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. |
@NonNull Maybe<T> |
firstElement()
Returns a
Maybe that emits only the very first item emitted by this Flowable or
completes if this Flowable is empty. |
@NonNull 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. |
@NonNull CompletionStage<T> |
firstOrErrorStage()
Signals the first upstream item or a
NoSuchElementException if the upstream is empty via
a CompletionStage . |
@NonNull CompletionStage<T> |
firstStage(T defaultItem)
Signals the first upstream item (or the default item if the upstream is empty) via
a
CompletionStage . |
<R> @NonNull Flowable<R> |
flatMap(@NonNull Function<? super T,? extends Publisher<? extends R>> mapper)
Returns a
Flowable that emits items based on applying a function that you supply to each item emitted
by the current Flowable , where that function returns a Publisher , and then merging those resulting
Publisher s and emitting the results of this merger. |
<R> @NonNull Flowable<R> |
flatMap(@NonNull Function<? super T,? extends Publisher<? 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 current Flowable , where that function returns a Publisher , and then merging those resulting
Publisher s and emitting the results of this merger. |
<R> @NonNull Flowable<R> |
flatMap(@NonNull Function<? super T,? extends Publisher<? 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 current Flowable , where that function returns a Publisher , and then merging those resulting
Publisher s and emitting the results of this merger, while limiting the maximum number of concurrent
subscriptions to these Publisher s. |
<R> @NonNull Flowable<R> |
flatMap(@NonNull Function<? super T,? extends Publisher<? 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 current Flowable , where that function returns a Publisher , and then merging those resulting
Publisher s and emitting the results of this merger, while limiting the maximum number of concurrent
subscriptions to these Publisher s. |
<R> @NonNull Flowable<R> |
flatMap(@NonNull Function<? super T,? extends Publisher<? extends R>> onNextMapper,
@NonNull Function<? super Throwable,? extends Publisher<? extends R>> onErrorMapper,
@NonNull Supplier<? extends Publisher<? extends R>> onCompleteSupplier)
Returns a
Flowable that applies a function to each item emitted or notification raised by the current
Flowable and then flattens the Publisher s returned from these functions and emits the resulting items. |
<R> @NonNull Flowable<R> |
flatMap(@NonNull Function<? super T,? extends Publisher<? extends R>> onNextMapper,
@NonNull Function<Throwable,? extends Publisher<? extends R>> onErrorMapper,
@NonNull Supplier<? extends Publisher<? extends R>> onCompleteSupplier,
int maxConcurrency)
Returns a
Flowable that applies a function to each item emitted or notification raised by the current
Flowable and then flattens the Publisher s returned from these functions and emits the resulting items,
while limiting the maximum number of concurrent subscriptions to these Publisher s. |
<R> @NonNull Flowable<R> |
flatMap(@NonNull Function<? super T,? extends Publisher<? 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 current Flowable , where that function returns a Publisher , and then merging those resulting
Publisher s and emitting the results of this merger, while limiting the maximum number of concurrent
subscriptions to these Publisher s. |
<U,R> @NonNull Flowable<R> |
flatMap(@NonNull Function<? super T,? extends Publisher<? extends U>> mapper,
@NonNull BiFunction<? super T,? super U,? extends R> combiner)
Returns a
Flowable that emits the results of a specified function to the pair of values emitted by the
current Flowable and a specified collection Publisher . |
<U,R> @NonNull Flowable<R> |
flatMap(@NonNull Function<? super T,? extends Publisher<? extends U>> mapper,
@NonNull BiFunction<? super T,? 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
current Flowable and a specified inner Publisher . |
<U,R> @NonNull Flowable<R> |
flatMap(@NonNull Function<? super T,? extends Publisher<? extends U>> mapper,
@NonNull BiFunction<? super T,? 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
current Flowable and a specified collection Publisher , while limiting the maximum number of concurrent
subscriptions to these Publisher s. |
<U,R> @NonNull Flowable<R> |
flatMap(@NonNull Function<? super T,? extends Publisher<? extends U>> mapper,
@NonNull BiFunction<? super T,? 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
current Flowable and a specified collection Publisher , while limiting the maximum number of concurrent
subscriptions to these Publisher s. |
<U,R> @NonNull Flowable<R> |
flatMap(@NonNull Function<? super T,? extends Publisher<? extends U>> mapper,
@NonNull BiFunction<? super T,? 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
current Flowable and a specified collection Publisher , while limiting the maximum number of concurrent
subscriptions to these Publisher s. |
@NonNull Completable |
flatMapCompletable(@NonNull Function<? super T,? extends CompletableSource> mapper)
Maps each element of the upstream
Flowable into CompletableSource s, subscribes to them and
waits until the upstream and all CompletableSource s complete. |
@NonNull Completable |
flatMapCompletable(@NonNull Function<? super T,? extends CompletableSource> mapper,
boolean delayErrors,
int maxConcurrency)
Maps each element of the upstream
Flowable into CompletableSource s, subscribes to them and
waits until the upstream and all CompletableSource s complete, optionally delaying all errors. |
<U> @NonNull Flowable<U> |
flatMapIterable(@NonNull Function<? super T,? extends Iterable<? extends U>> mapper)
|
<U,V> @NonNull Flowable<V> |
flatMapIterable(@NonNull Function<? super T,? extends Iterable<? extends U>> mapper,
@NonNull BiFunction<? super T,? super U,? extends V> combiner)
Merges
Iterable s generated by a mapper Function for each individual item emitted by
the current Flowable into a single Flowable sequence where the resulting items will
be the combination of the original item and each inner item of the respective Iterable as returned
by the resultSelector BiFunction . |
<U,V> @NonNull Flowable<V> |
flatMapIterable(@NonNull Function<? super T,? extends Iterable<? extends U>> mapper,
@NonNull BiFunction<? super T,? super U,? extends V> combiner,
int prefetch)
Merges
Iterable s generated by a mapper Function for each individual item emitted by
the current Flowable into a single Flowable sequence where the resulting items will
be the combination of the original item and each inner item of the respective Iterable as returned
by the resultSelector BiFunction . |
<U> @NonNull Flowable<U> |
flatMapIterable(@NonNull Function<? super T,? extends Iterable<? extends U>> mapper,
int bufferSize)
|
<R> @NonNull Flowable<R> |
flatMapMaybe(@NonNull Function<? super T,? extends MaybeSource<? extends R>> mapper)
Maps each element of the upstream
Flowable into MaybeSource s, subscribes to all of them
and merges their onSuccess values, in no particular order, into a single Flowable sequence. |
<R> @NonNull Flowable<R> |
flatMapMaybe(@NonNull Function<? super T,? extends MaybeSource<? extends R>> mapper,
boolean delayErrors,
int maxConcurrency)
Maps each element of the upstream
Flowable into MaybeSource s, subscribes to at most
maxConcurrency MaybeSource s at a time and merges their onSuccess values,
in no particular order, into a single Flowable sequence, optionally delaying all errors. |
<R> @NonNull Flowable<R> |
flatMapSingle(@NonNull Function<? super T,? extends SingleSource<? extends R>> mapper)
Maps each element of the upstream
Flowable into SingleSource s, subscribes to all of them
and merges their onSuccess values, in no particular order, into a single Flowable sequence. |
<R> @NonNull Flowable<R> |
flatMapSingle(@NonNull Function<? super T,? extends SingleSource<? extends R>> mapper,
boolean delayErrors,
int maxConcurrency)
Maps each element of the upstream
Flowable into SingleSource s, subscribes to at most
maxConcurrency SingleSource s at a time and merges their onSuccess values,
in no particular order, into a single Flowable sequence, optionally delaying all errors. |
<R> @NonNull Flowable<R> |
flatMapStream(@NonNull Function<? super T,? extends Stream<? extends R>> mapper)
Maps each upstream item into a
Stream and emits the Stream 's items to the downstream in a sequential fashion. |
<R> @NonNull Flowable<R> |
flatMapStream(@NonNull Function<? super T,? extends Stream<? extends R>> mapper,
int prefetch)
Maps each upstream item into a
Stream and emits the Stream 's items to the downstream in a sequential fashion. |
@NonNull Disposable |
forEach(@NonNull Consumer<? super T> onNext)
Subscribes to the current
Flowable and receives notifications for each element. |
@NonNull Disposable |
forEachWhile(@NonNull Predicate<? super T> onNext)
Subscribes to the current
Flowable and receives notifications for each element until the
onNext Predicate returns false . |
@NonNull Disposable |
forEachWhile(@NonNull Predicate<? super T> onNext,
@NonNull Consumer<? super Throwable> onError)
Subscribes to the current
Flowable and receives notifications for each element and error events until the
onNext Predicate returns false . |
@NonNull Disposable |
forEachWhile(@NonNull Predicate<? super T> onNext,
@NonNull Consumer<? super Throwable> onError,
@NonNull Action onComplete)
Subscribes to the current
Flowable and receives notifications for each element and the terminal events until the
onNext Predicate returns false . |
static <T> @NonNull Flowable<T> |
fromAction(@NonNull Action action)
Returns a
Flowable instance that runs the given Action for each Subscriber and
emits either its exception or simply completes. |
static <T> @NonNull Flowable<T> |
fromArray(T... items)
Converts an array into a
Publisher that emits the items in the array. |
static <T> @NonNull Flowable<T> |
fromCallable(@NonNull Callable<? extends T> callable)
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> @NonNull Flowable<T> |
fromCompletable(@NonNull CompletableSource completableSource)
Wraps a
CompletableSource into a Flowable . |
static <T> @NonNull Flowable<T> |
fromCompletionStage(@NonNull CompletionStage<T> stage)
Signals the completion value or error of the given (hot)
CompletionStage -based asynchronous calculation. |
static <T> @NonNull Flowable<T> |
fromFuture(@NonNull Future<? extends T> future)
|
static <T> @NonNull Flowable<T> |
fromFuture(@NonNull Future<? extends T> future,
long timeout,
@NonNull TimeUnit unit)
|
static <T> @NonNull Flowable<T> |
fromIterable(@NonNull Iterable<? extends T> source)
|
static <T> @NonNull Flowable<T> |
fromMaybe(@NonNull MaybeSource<T> maybe)
Returns a
Flowable instance that when subscribed to, subscribes to the MaybeSource instance and
emits onSuccess as a single item or forwards any onComplete or
onError signal. |
static <T> @NonNull Flowable<T> |
fromObservable(@NonNull ObservableSource<T> source,
@NonNull BackpressureStrategy strategy)
Converts the given
ObservableSource into a Flowable by applying the specified backpressure strategy. |
static <T> @NonNull Flowable<T> |
fromOptional(@NonNull Optional<T> optional)
Converts the existing value of the provided optional into a
just(Object)
or an empty optional into an empty() Flowable instance. |
static <T> @NonNull Flowable<T> |
fromPublisher(@NonNull Publisher<? extends T> publisher)
|
static <T> @NonNull Flowable<T> |
fromRunnable(@NonNull Runnable run)
Returns a
Flowable instance that runs the given Runnable for each Subscriber and
emits either its unchecked exception or simply completes. |
static <T> @NonNull Flowable<T> |
fromSingle(@NonNull SingleSource<T> source)
Returns a
Flowable instance that when subscribed to, subscribes to the SingleSource instance and
emits onSuccess as a single item or forwards the onError signal. |
static <T> @NonNull Flowable<T> |
fromStream(@NonNull Stream<T> stream)
Converts a
Stream into a finite Flowable and emits its items in the sequence. |
static <T> @NonNull Flowable<T> |
fromSupplier(@NonNull Supplier<? extends T> supplier)
Returns a
Flowable that, when a Subscriber subscribes to it, invokes a supplier function you specify and then
emits the value returned from that function. |
static <T> @NonNull Flowable<T> |
generate(@NonNull Consumer<Emitter<T>> generator)
Returns a cold, synchronous, stateless and backpressure-aware generator of values.
|
static <T,S> @NonNull Flowable<T> |
generate(@NonNull Supplier<S> initialState,
@NonNull BiConsumer<S,Emitter<T>> generator)
Returns a cold, synchronous, stateful and backpressure-aware generator of values.
|
static <T,S> @NonNull Flowable<T> |
generate(@NonNull Supplier<S> initialState,
@NonNull BiConsumer<S,Emitter<T>> generator,
@NonNull Consumer<? super S> disposeState)
Returns a cold, synchronous, stateful and backpressure-aware generator of values.
|
static <T,S> @NonNull Flowable<T> |
generate(@NonNull Supplier<S> initialState,
@NonNull BiFunction<S,Emitter<T>,S> generator)
Returns a cold, synchronous, stateful and backpressure-aware generator of values.
|
static <T,S> @NonNull Flowable<T> |
generate(@NonNull Supplier<S> initialState,
@NonNull BiFunction<S,Emitter<T>,S> generator,
@NonNull Consumer<? super S> disposeState)
Returns a cold, synchronous, stateful and backpressure-aware generator of values.
|
<K> @NonNull Flowable<GroupedFlowable<K,T>> |
groupBy(@NonNull Function<? super T,? extends K> keySelector)
Groups the items emitted by the current
Flowable according to a specified criterion, and emits these
grouped items as GroupedFlowable s. |
<K> @NonNull Flowable<GroupedFlowable<K,T>> |
groupBy(@NonNull Function<? super T,? extends K> keySelector,
boolean delayError)
Groups the items emitted by the current
Flowable according to a specified criterion, and emits these
grouped items as GroupedFlowable s. |
<K,V> @NonNull Flowable<GroupedFlowable<K,V>> |
groupBy(@NonNull Function<? super T,? extends K> keySelector,
@NonNull Function<? super T,? extends V> valueSelector)
Groups the items emitted by the current
Flowable according to a specified criterion, and emits these
grouped items as GroupedFlowable s. |
<K,V> @NonNull Flowable<GroupedFlowable<K,V>> |
groupBy(@NonNull Function<? super T,? extends K> keySelector,
@NonNull Function<? super T,? extends V> valueSelector,
boolean delayError)
Groups the items emitted by the current
Flowable according to a specified criterion, and emits these
grouped items as GroupedFlowable s. |
<K,V> @NonNull Flowable<GroupedFlowable<K,V>> |
groupBy(@NonNull Function<? super T,? extends K> keySelector,
@NonNull Function<? super T,? extends V> valueSelector,
boolean delayError,
int bufferSize)
Groups the items emitted by the current
Flowable according to a specified criterion, and emits these
grouped items as GroupedFlowable s. |
<K,V> @NonNull Flowable<GroupedFlowable<K,V>> |
groupBy(@NonNull Function<? super T,? extends K> keySelector,
@NonNull Function<? super T,? extends V> valueSelector,
boolean delayError,
int bufferSize,
@NonNull Function<? super Consumer<Object>,? extends Map<K,Object>> evictingMapFactory)
Groups the items emitted by the current
Flowable according to a specified criterion, and emits these
grouped items as GroupedFlowable s. |
<TRight,TLeftEnd,TRightEnd,R> |
groupJoin(@NonNull Publisher<? extends TRight> other,
@NonNull Function<? super T,? extends Publisher<TLeftEnd>> leftEnd,
@NonNull Function<? super TRight,? extends Publisher<TRightEnd>> rightEnd,
@NonNull BiFunction<? super T,? super Flowable<TRight>,? extends R> resultSelector)
Returns a
Flowable that correlates two Publisher s when they overlap in time and groups the results. |
@NonNull Flowable<T> |
hide()
Hides the identity of this
Flowable and its Subscription . |
@NonNull Completable |
ignoreElements()
Ignores all items emitted by the current
Flowable and only calls onComplete or onError . |
static @NonNull Flowable<Long> |
interval(long initialDelay,
long period,
@NonNull TimeUnit unit)
Returns a
Flowable that emits a 0L after the initialDelay and ever-increasing numbers
after each period of time thereafter. |
static @NonNull Flowable<Long> |
interval(long initialDelay,
long period,
@NonNull TimeUnit unit,
@NonNull Scheduler scheduler)
Returns a
Flowable that emits a 0L after the initialDelay and ever-increasing numbers
after each period of time thereafter, on a specified Scheduler . |
static @NonNull Flowable<Long> |
interval(long period,
@NonNull TimeUnit unit)
Returns a
Flowable that emits a sequential number every specified interval of time. |
static @NonNull Flowable<Long> |
interval(long period,
@NonNull TimeUnit unit,
@NonNull Scheduler scheduler)
Returns a
Flowable that emits a sequential number every specified interval of time, on a
specified Scheduler . |
static @NonNull Flowable<Long> |
intervalRange(long start,
long count,
long initialDelay,
long period,
@NonNull TimeUnit unit)
Signals a range of long values, the first after some initial delay and the rest periodically after.
|
static @NonNull Flowable<Long> |
intervalRange(long start,
long count,
long initialDelay,
long period,
@NonNull TimeUnit unit,
@NonNull Scheduler scheduler)
Signals a range of long values, the first after some initial delay and the rest periodically after.
|
@NonNull Single<Boolean> |
isEmpty()
|
<TRight,TLeftEnd,TRightEnd,R> |
join(@NonNull Publisher<? extends TRight> other,
@NonNull Function<? super T,? extends Publisher<TLeftEnd>> leftEnd,
@NonNull Function<? super TRight,? extends Publisher<TRightEnd>> rightEnd,
@NonNull BiFunction<? super T,? super TRight,? extends R> resultSelector)
Correlates the items emitted by two
Publisher s based on overlapping durations. |
static <T> @NonNull Flowable<T> |
just(T item)
Returns a
Flowable that signals the given (constant reference) item and then completes. |
static <T> @NonNull Flowable<T> |
just(T item1,
T item2)
Converts two items into a
Publisher that emits those items. |
static <T> @NonNull Flowable<T> |
just(T item1,
T item2,
T item3)
Converts three items into a
Publisher that emits those items. |
static <T> @NonNull Flowable<T> |
just(T item1,
T item2,
T item3,
T item4)
Converts four items into a
Publisher that emits those items. |
static <T> @NonNull 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> @NonNull 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> @NonNull 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> @NonNull 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> @NonNull 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> @NonNull 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. |
@NonNull 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. |
@NonNull Maybe<T> |
lastElement()
Returns a
Maybe that emits the last item emitted by this Flowable or completes if
this Flowable is empty. |
@NonNull 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. |
@NonNull CompletionStage<T> |
lastOrErrorStage()
Signals the last upstream item or a
NoSuchElementException if the upstream is empty via
a CompletionStage . |
@NonNull CompletionStage<T> |
lastStage(T defaultItem)
Signals the last upstream item (or the default item if the upstream is empty) via
a
CompletionStage . |
<R> @NonNull Flowable<R> |
lift(@NonNull FlowableOperator<? extends R,? super T> lifter)
This method requires advanced knowledge about building operators, please consider
other standard composition methods first;
Returns a
Flowable which, when subscribed to, invokes the apply(Subscriber) method
of the provided FlowableOperator for each individual downstream Subscriber and allows the
insertion of a custom operator by accessing the downstream's Subscriber during this subscription phase
and providing a new Subscriber , containing the custom operator's intended business logic, that will be
used in the subscription process going further upstream. |
<R> @NonNull Flowable<R> |
map(@NonNull Function<? super T,? extends R> mapper)
Returns a
Flowable that applies a specified function to each item emitted by the current Flowable and
emits the results of these function applications. |
<R> @NonNull Flowable<R> |
mapOptional(@NonNull Function<? super T,Optional<? extends R>> mapper)
Maps each upstream value into an
Optional and emits the contained item if not empty. |
@NonNull Flowable<Notification<T>> |
materialize()
Returns a
Flowable that represents all of the emissions and notifications from the current
Flowable into emissions marked with their original types within Notification objects. |
static <T> @NonNull Flowable<T> |
merge(@NonNull Iterable<? extends Publisher<? extends T>> sources)
|
static <T> @NonNull Flowable<T> |
merge(@NonNull Iterable<? extends Publisher<? extends T>> sources,
int maxConcurrency)
|
static <T> @NonNull Flowable<T> |
merge(@NonNull Iterable<? extends Publisher<? extends T>> sources,
int maxConcurrency,
int bufferSize)
|
static <T> @NonNull Flowable<T> |
merge(@NonNull Publisher<? extends Publisher<? extends T>> sources)
Flattens a
Publisher that emits Publisher s into a single Publisher that emits the items emitted by
thos Publisher s , without any transformation. |
static <T> @NonNull Flowable<T> |
merge(@NonNull Publisher<? extends Publisher<? extends T>> sources,
int maxConcurrency)
Flattens a
Publisher that emits Publisher s into a single Publisher that emits the items emitted by
those Publisher s, without any transformation, while limiting the maximum number of concurrent
subscriptions to these Publisher s. |
static <T> @NonNull Flowable<T> |
merge(@NonNull Publisher<? extends T> source1,
@NonNull Publisher<? extends T> source2)
Flattens two
Publisher s into a single Publisher , without any transformation. |
static <T> @NonNull Flowable<T> |
merge(@NonNull Publisher<? extends T> source1,
@NonNull Publisher<? extends T> source2,
@NonNull Publisher<? extends T> source3)
Flattens three
Publisher s into a single Publisher , without any transformation. |
static <T> @NonNull Flowable<T> |
merge(@NonNull Publisher<? extends T> source1,
@NonNull Publisher<? extends T> source2,
@NonNull Publisher<? extends T> source3,
@NonNull Publisher<? extends T> source4)
Flattens four
Publisher s into a single Publisher , without any transformation. |
static <T> @NonNull Flowable<T> |
mergeArray(int maxConcurrency,
int bufferSize,
Publisher<? extends T>... sources)
Flattens an array of
Publisher s into one Publisher , without any transformation, while limiting the
number of concurrent subscriptions to these Publisher s. |
static <T> @NonNull Flowable<T> |
mergeArray(Publisher<? extends T>... sources)
Flattens an array of
Publisher s into one Publisher , without any transformation. |
static <T> @NonNull Flowable<T> |
mergeArrayDelayError(int maxConcurrency,
int bufferSize,
Publisher<? extends T>... sources)
Flattens an array of
Publisher s into one Publisher , in a way that allows a Subscriber to receive all
successfully emitted items from each of the source Publisher s without being interrupted by an error
notification from one of them, while limiting the number of concurrent subscriptions to these Publisher s. |
static <T> @NonNull Flowable<T> |
mergeArrayDelayError(Publisher<? extends T>... sources)
Flattens an array of
Publisher s into one Flowable , in a way that allows a Subscriber to receive all
successfully emitted items from each of the source Publisher s without being interrupted by an error
notification from one of them. |
static <T> @NonNull Flowable<T> |
mergeDelayError(@NonNull Iterable<? extends Publisher<? extends T>> sources)
Flattens an
Iterable of Publisher s into one Publisher , in a way that allows a Subscriber to receive all
successfully emitted items from each of the source Publisher s without being interrupted by an error
notification from one of them. |
static <T> @NonNull Flowable<T> |
mergeDelayError(@NonNull Iterable<? extends Publisher<? extends T>> sources,
int maxConcurrency)
Flattens an
Iterable of Publisher s into one Publisher , in a way that allows a Subscriber to receive all
successfully emitted items from each of the source Publisher s without being interrupted by an error
notification from one of them, while limiting the number of concurrent subscriptions to these Publisher s. |
static <T> @NonNull Flowable<T> |
mergeDelayError(@NonNull Iterable<? extends Publisher<? extends T>> sources,
int maxConcurrency,
int bufferSize)
Flattens an
Iterable of Publisher s into one Publisher , in a way that allows a Subscriber to receive all
successfully emitted items from each of the source Publisher s without being interrupted by an error
notification from one of them, while limiting the number of concurrent subscriptions to these Publisher s. |
static <T> @NonNull Flowable<T> |
mergeDelayError(@NonNull Publisher<? extends Publisher<? extends T>> sources)
Flattens a
Publisher that emits Publisher s into one Publisher , in a way that allows a Subscriber to
receive all successfully emitted items from all of the source Publisher s without being interrupted by
an error notification from one of them. |
static <T> @NonNull Flowable<T> |
mergeDelayError(@NonNull Publisher<? extends Publisher<? extends T>> sources,
int maxConcurrency)
Flattens a
Publisher that emits Publisher s into one Publisher , in a way that allows a Subscriber to
receive all successfully emitted items from all of the source Publisher s without being interrupted by
an error notification from one of them, while limiting the
number of concurrent subscriptions to these Publisher s. |
static <T> @NonNull Flowable<T> |
mergeDelayError(@NonNull Publisher<? extends T> source1,
@NonNull Publisher<? extends T> source2)
Flattens two
Publisher s into one Publisher , in a way that allows a Subscriber to receive all
successfully emitted items from each of the source Publisher s without being interrupted by an error
notification from one of them. |
static <T> @NonNull Flowable<T> |
mergeDelayError(@NonNull Publisher<? extends T> source1,
@NonNull Publisher<? extends T> source2,
@NonNull Publisher<? extends T> source3)
Flattens three
Publisher s into one Publisher , in a way that allows a Subscriber to receive all
successfully emitted items from all of the source Publisher s without being interrupted by an error
notification from one of them. |
static <T> @NonNull Flowable<T> |
mergeDelayError(@NonNull Publisher<? extends T> source1,
@NonNull Publisher<? extends T> source2,
@NonNull Publisher<? extends T> source3,
@NonNull Publisher<? extends T> source4)
Flattens four
Publisher s into one Publisher , in a way that allows a Subscriber to receive all
successfully emitted items from all of the source Publisher s without being interrupted by an error
notification from one of them. |
@NonNull Flowable<T> |
mergeWith(@NonNull CompletableSource other)
Relays the items of this
Flowable and completes only when the other CompletableSource completes
as well. |
@NonNull Flowable<T> |
mergeWith(@NonNull MaybeSource<? extends T> 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. |
@NonNull Flowable<T> |
mergeWith(@NonNull Publisher<? extends T> other)
Flattens this and another
Publisher into a single Publisher , without any transformation. |
@NonNull Flowable<T> |
mergeWith(@NonNull SingleSource<? extends T> other)
Merges the sequence of items of this
Flowable with the success value of the other SingleSource . |
static <T> @NonNull Flowable<T> |
never()
Returns a
Flowable that never sends any items or notifications to a Subscriber . |
@NonNull Flowable<T> |
observeOn(@NonNull Scheduler scheduler)
Signals the items and terminal signals of the current
Flowable on the specified Scheduler ,
asynchronously with a bounded buffer of bufferSize() slots. |
@NonNull Flowable<T> |
observeOn(@NonNull Scheduler scheduler,
boolean delayError)
Signals the items and terminal signals of the current
Flowable on the specified Scheduler ,
asynchronously with a bounded buffer and optionally delays onError notifications. |
@NonNull Flowable<T> |
observeOn(@NonNull Scheduler scheduler,
boolean delayError,
int bufferSize)
Signals the items and terminal signals of the current
Flowable on the specified Scheduler ,
asynchronously with a bounded buffer of configurable size and optionally delays onError notifications. |
<U> @NonNull Flowable<U> |
ofType(@NonNull Class<U> clazz)
Filters the items emitted by the current
Flowable , only emitting those of the specified type. |
@NonNull Flowable<T> |
onBackpressureBuffer()
Buffers an unlimited number of items from the current
Flowable and allows it to emit as fast it can while allowing the
downstream to consume the items at its own place. |
@NonNull Flowable<T> |
onBackpressureBuffer(boolean delayError)
Buffers an unlimited number of items from the current
Flowable and allows it to emit as fast it can while allowing the
downstream to consume the items at its own place, optionally delaying an error until all buffered items have been consumed. |
@NonNull Flowable<T> |
onBackpressureBuffer(int capacity)
Buffers an limited number of items from the current
Flowable and allows it to emit as fast it can while allowing the
downstream to consume the items at its own place, however, the resulting Flowable will signal a
MissingBackpressureException via onError as soon as the buffer's capacity is exceeded, dropping all undelivered
items, and canceling the flow. |
@NonNull Flowable<T> |
onBackpressureBuffer(int capacity,
@NonNull Action onOverflow)
Buffers an limited number of items from the current
Flowable and allows it to emit as fast it can while allowing the
downstream to consume the items at its own place, however, the resulting Flowable will signal a
MissingBackpressureException via onError as soon as the buffer's capacity is exceeded, dropping all undelivered
items, canceling the flow and calling the onOverflow action. |
@NonNull Flowable<T> |
onBackpressureBuffer(int capacity,
boolean delayError)
Buffers an limited number of items from the current
Flowable and allows it to emit as fast it can while allowing the
downstream to consume the items at its own place, however, the resulting Flowable will signal a
MissingBackpressureException via onError as soon as the buffer's capacity is exceeded, dropping all undelivered
items, and canceling the flow. |
@NonNull Flowable<T> |
onBackpressureBuffer(int capacity,
boolean delayError,
boolean unbounded)
Buffers an optionally unlimited number of items from the current
Flowable and allows it to emit as fast it can while allowing the
downstream to consume the items at its own place. |
@NonNull Flowable<T> |
onBackpressureBuffer(int capacity,
boolean delayError,
boolean unbounded,
@NonNull Action onOverflow)
Buffers an optionally unlimited number of items from the current
Flowable and allows it to emit as fast it can while allowing the
downstream to consume the items at its own place. |
@NonNull Flowable<T> |
onBackpressureBuffer(int capacity,
boolean delayError,
boolean unbounded,
@NonNull Action onOverflow,
@NonNull Consumer<? super T> onDropped)
Buffers an optionally unlimited number of items from the current
Flowable and allows it to emit as fast it can while allowing the
downstream to consume the items at its own place. |
@NonNull Flowable<T> |
onBackpressureBuffer(long capacity,
@Nullable Action onOverflow,
@NonNull BackpressureOverflowStrategy overflowStrategy)
Buffers an optionally unlimited number of items from the current
Flowable and allows it to emit as fast it can while allowing the
downstream to consume the items at its own place. |
@NonNull Flowable<T> |
onBackpressureBuffer(long capacity,
@Nullable Action onOverflow,
@NonNull BackpressureOverflowStrategy overflowStrategy,
@NonNull Consumer<? super T> onDropped)
Buffers an optionally unlimited number of items from the current
Flowable and allows it to emit as fast it can while allowing the
downstream to consume the items at its own place. |
@NonNull Flowable<T> |
onBackpressureDrop()
Drops items from the current
Flowable if the downstream is not ready to receive new items (indicated
by a lack of Subscription.request(long) calls from it). |
@NonNull Flowable<T> |
onBackpressureDrop(@NonNull Consumer<? super T> onDrop)
Drops items from the current
Flowable if the downstream is not ready to receive new items (indicated
by a lack of Subscription.request(long) calls from it) and calls the given Consumer with such
dropped items. |
@NonNull Flowable<T> |
onBackpressureLatest()
Drops all but the latest item emitted by the current
Flowable if the downstream is not ready to receive
new items (indicated by a lack of Subscription.request(long) calls from it) and emits this latest
item when the downstream becomes ready. |
@NonNull Flowable<T> |
onBackpressureLatest(@NonNull Consumer<? super T> onDropped)
Drops all but the latest item emitted by the current
Flowable if the downstream is not ready to receive
new items (indicated by a lack of Subscription.request(long) calls from it) and emits this latest
item when the downstream becomes ready. |
@NonNull Flowable<T> |
onBackpressureReduce(@NonNull BiFunction<T,T,T> reducer)
Reduces a sequence of two not emitted values via a function into a single value if the downstream is not ready to receive
new items (indicated by a lack of
Subscription.request(long) calls from it) and emits this latest
item when the downstream becomes ready. |
<R> @NonNull Flowable<R> |
onBackpressureReduce(@NonNull Supplier<R> supplier,
@NonNull BiFunction<R,? super T,R> reducer)
Reduces upstream values into an aggregate value, provided by a supplier and combined via a reducer function,
while the downstream is not ready to receive items, then emits this aggregate value when the downstream becomes ready.
|
@NonNull Flowable<T> |
onErrorComplete()
Returns a
Flowable instance that if the current Flowable emits an error, it will emit an onComplete
and swallow the throwable. |
@NonNull Flowable<T> |
onErrorComplete(@NonNull Predicate<? super Throwable> predicate)
Returns a
Flowable instance that if the current Flowable emits an error and the predicate returns
true , it will emit an onComplete and swallow the throwable. |
@NonNull Flowable<T> |
onErrorResumeNext(@NonNull Function<? super Throwable,? extends Publisher<? extends T>> fallbackSupplier)
|
@NonNull Flowable<T> |
onErrorResumeWith(@NonNull Publisher<? extends T> fallback)
Resumes the flow with the given
Publisher when the current Flowable fails instead of
signaling the error via onError . |
@NonNull Flowable<T> |
onErrorReturn(@NonNull Function<? super Throwable,? extends T> itemSupplier)
Ends the flow with a last item returned by a function for the
Throwable error signaled by the current
Flowable instead of signaling the error via onError . |
@NonNull Flowable<T> |
onErrorReturnItem(T item)
Ends the flow with the given last item when the current
Flowable fails instead of signaling the error via onError . |
@NonNull Flowable<T> |
onTerminateDetach()
Nulls out references to the upstream producer and downstream
Subscriber if
the sequence is terminated or downstream cancels. |
@NonNull ParallelFlowable<T> |
parallel()
Parallelizes the flow by creating multiple 'rails' (equal to the number of CPUs)
and dispatches the upstream items to them in a round-robin fashion.
|
@NonNull ParallelFlowable<T> |
parallel(int parallelism)
Parallelizes the flow by creating the specified number of 'rails'
and dispatches the upstream items to them in a round-robin fashion.
|
@NonNull ParallelFlowable<T> |
parallel(int parallelism,
int prefetch)
Parallelizes the flow by creating the specified number of 'rails'
and dispatches the upstream items to them in a round-robin fashion and
uses the defined per-'rail' prefetch amount.
|
@NonNull ConnectableFlowable<T> |
publish()
Returns a
ConnectableFlowable , which is a variety of Publisher that waits until its
connect method is called before it begins emitting items to those
Subscriber s that have subscribed to it. |
<R> @NonNull Flowable<R> |
publish(@NonNull Function<? super Flowable<T>,? extends Publisher<? 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> @NonNull Flowable<R> |
publish(@NonNull Function<? super Flowable<T>,? extends Publisher<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. |
@NonNull ConnectableFlowable<T> |
publish(int bufferSize)
Returns a
ConnectableFlowable , which is a variety of Publisher that waits until its
connect method is called before it begins emitting items to those
Subscriber s that have subscribed to it. |
static @NonNull Flowable<Integer> |
range(int start,
int count)
Returns a
Flowable that emits a sequence of Integer s within a specified range. |
static @NonNull Flowable<Long> |
rangeLong(long start,
long count)
Returns a
Flowable that emits a sequence of Long s within a specified range. |
@NonNull Flowable<T> |
rebatchRequests(int n)
Requests
n initially from the upstream and then 75% of n subsequently
after 75% of n values have been emitted to the downstream. |
@NonNull Maybe<T> |
reduce(@NonNull BiFunction<T,T,T> reducer)
Returns a
Maybe that applies a specified accumulator function to the first item emitted by the current
Flowable , then feeds the result of that function along with the second item emitted by the current
Flowable into the same function, and so on until all items have been emitted by the current and finite Flowable ,
and emits the final result from the final call to your function as its sole item. |
<R> @NonNull Single<R> |
reduce(R seed,
@NonNull BiFunction<R,? super T,R> reducer)
Returns a
Single that applies a specified accumulator function to the first item emitted by the current
Flowable and a specified seed value, then feeds the result of that function along with the second item
emitted by the current Flowable into the same function, and so on until all items have been emitted by the
current and finite Flowable , emitting the final result from the final call to your function as its sole item. |
<R> @NonNull Single<R> |
reduceWith(@NonNull Supplier<R> seedSupplier,
@NonNull BiFunction<R,? super T,R> reducer)
Returns a
Single that applies a specified accumulator function to the first item emitted by the current
Flowable and a seed value derived from calling a specified seedSupplier , then feeds the result
of that function along with the second item emitted by the current Flowable into the same function, and so on until
all items have been emitted by the current and finite Flowable , emitting the final result from the final call to your
function as its sole item. |
@NonNull Flowable<T> |
repeat()
Returns a
Flowable that repeats the sequence of items emitted by the current Flowable indefinitely. |
@NonNull Flowable<T> |
repeat(long times)
Returns a
Flowable that repeats the sequence of items emitted by the current Flowable at most
count times. |
@NonNull Flowable<T> |
repeatUntil(@NonNull BooleanSupplier stop)
Returns a
Flowable that repeats the sequence of items emitted by the current Flowable until
the provided stop function returns true . |
@NonNull Flowable<T> |
repeatWhen(@NonNull Function<? super Flowable<Object>,? extends Publisher<?>> handler)
Returns a
Flowable that emits the same values as the current Flowable with the exception of an
onComplete . |
@NonNull 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 future Subscriber . |
<R> @NonNull Flowable<R> |
replay(@NonNull Function<? super Flowable<T>,? extends Publisher<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 current Flowable . |
<R> @NonNull Flowable<R> |
replay(@NonNull Function<? super Flowable<T>,? extends Publisher<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 current Flowable ,
replaying bufferSize notifications. |
<R> @NonNull Flowable<R> |
replay(@NonNull Function<? super Flowable<T>,? extends Publisher<R>> selector,
int bufferSize,
boolean eagerTruncate)
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 current Flowable ,
replaying bufferSize notifications. |
<R> @NonNull Flowable<R> |
replay(@NonNull Function<? super Flowable<T>,? extends Publisher<R>> selector,
int bufferSize,
long time,
@NonNull 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 current Flowable ,
replaying no more than bufferSize items that were emitted within a specified time window. |
<R> @NonNull Flowable<R> |
replay(@NonNull Function<? super Flowable<T>,? extends Publisher<R>> selector,
int bufferSize,
long time,
@NonNull TimeUnit unit,
@NonNull 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 current Flowable ,
replaying no more than bufferSize items that were emitted within a specified time window. |
<R> @NonNull Flowable<R> |
replay(@NonNull Function<? super Flowable<T>,? extends Publisher<R>> selector,
int bufferSize,
long time,
@NonNull TimeUnit unit,
@NonNull Scheduler scheduler,
boolean eagerTruncate)
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 current Flowable ,
replaying no more than bufferSize items that were emitted within a specified time window. |
<R> @NonNull Flowable<R> |
replay(@NonNull Function<? super Flowable<T>,? extends Publisher<R>> selector,
long time,
@NonNull 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 current Flowable ,
replaying all items that were emitted within a specified time window. |
<R> @NonNull Flowable<R> |
replay(@NonNull Function<? super Flowable<T>,? extends Publisher<R>> selector,
long time,
@NonNull TimeUnit unit,
@NonNull 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 current Flowable ,
replaying all items that were emitted within a specified time window. |
<R> @NonNull Flowable<R> |
replay(@NonNull Function<? super Flowable<T>,? extends Publisher<R>> selector,
long time,
@NonNull TimeUnit unit,
@NonNull Scheduler scheduler,
boolean eagerTruncate)
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 current Flowable ,
replaying all items that were emitted within a specified time window. |
@NonNull ConnectableFlowable<T> |
replay(int bufferSize)
Returns a
ConnectableFlowable that shares a single subscription to the current Flowable and
replays at most bufferSize items to late Subscriber s. |
@NonNull ConnectableFlowable<T> |
replay(int bufferSize,
boolean eagerTruncate)
Returns a
ConnectableFlowable that shares a single subscription to the current Flowable and
replays at most bufferSize items to late Subscriber s. |
@NonNull ConnectableFlowable<T> |
replay(int bufferSize,
long time,
@NonNull TimeUnit unit)
Returns a
ConnectableFlowable that shares a single subscription to the current Flowable and
replays at most bufferSize items that were emitted during a specified time window. |
@NonNull ConnectableFlowable<T> |
replay(int bufferSize,
long time,
@NonNull TimeUnit unit,
@NonNull Scheduler scheduler)
Returns a
ConnectableFlowable that shares a single subscription to the current Flowable and
replays a maximum of bufferSize items that are emitted within a specified time window to late Subscriber s. |
@NonNull ConnectableFlowable<T> |
replay(int bufferSize,
long time,
@NonNull TimeUnit unit,
@NonNull Scheduler scheduler,
boolean eagerTruncate)
Returns a
ConnectableFlowable that shares a single subscription to the current Flowable and
replays a maximum of bufferSize items that are emitted within a specified time window to late Subscriber s. |
@NonNull ConnectableFlowable<T> |
replay(long time,
@NonNull TimeUnit unit)
Returns a
ConnectableFlowable that shares a single subscription to the current Flowable and
replays all items emitted by it within a specified time window to late Subscriber s. |
@NonNull ConnectableFlowable<T> |
replay(long time,
@NonNull TimeUnit unit,
@NonNull Scheduler scheduler)
Returns a
ConnectableFlowable that shares a single subscription to the current Flowable and
replays all items emitted by it within a specified time window to late Subscriber s. |
@NonNull ConnectableFlowable<T> |
replay(long time,
@NonNull TimeUnit unit,
@NonNull Scheduler scheduler,
boolean eagerTruncate)
Returns a
ConnectableFlowable that shares a single subscription to the current Flowable and
replays all items emitted by it within a specified time window to late Subscriber s. |
@NonNull Flowable<T> |
retry()
Returns a
Flowable that mirrors the current Flowable , resubscribing to it if it calls onError
(infinite retry count). |
@NonNull Flowable<T> |
retry(@NonNull BiPredicate<? super Integer,? super Throwable> predicate)
Returns a
Flowable that mirrors the current Flowable , resubscribing to it if it calls onError
and the predicate returns true for that specific exception and retry count. |
@NonNull Flowable<T> |
retry(long times)
Returns a
Flowable that mirrors the current Flowable , resubscribing to it if it calls onError
up to a specified number of retries. |
@NonNull Flowable<T> |
retry(long times,
@NonNull Predicate<? super Throwable> predicate)
Retries at most times or until the predicate returns
false , whichever happens first. |
@NonNull Flowable<T> |
retry(@NonNull Predicate<? super Throwable> predicate)
Retries the current
Flowable if the predicate returns true . |
@NonNull Flowable<T> |
retryUntil(@NonNull BooleanSupplier stop)
Retries until the given stop function returns
true . |
@NonNull Flowable<T> |
retryWhen(@NonNull Function<? super Flowable<Throwable>,? extends Publisher<?>> handler)
Returns a
Flowable that emits the same values as the current Flowable with the exception of an
onError . |
void |
safeSubscribe(@NonNull Subscriber<? super T> subscriber)
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). |
@NonNull Flowable<T> |
sample(long period,
@NonNull TimeUnit unit)
Returns a
Flowable that emits the most recently emitted item (if any) emitted by the current Flowable
within periodic time intervals. |
@NonNull Flowable<T> |
sample(long period,
@NonNull TimeUnit unit,
boolean emitLast)
Returns a
Flowable that emits the most recently emitted item (if any) emitted by the current Flowable
within periodic time intervals and optionally emit the very last upstream item when the upstream completes. |
@NonNull Flowable<T> |
sample(long period,
@NonNull TimeUnit unit,
@NonNull Scheduler scheduler)
Returns a
Flowable that emits the most recently emitted item (if any) emitted by the current Flowable
within periodic time intervals, where the intervals are defined on a particular Scheduler . |
@NonNull Flowable<T> |
sample(long period,
@NonNull TimeUnit unit,
@NonNull Scheduler scheduler,
boolean emitLast)
Returns a
Flowable that emits the most recently emitted item (if any) emitted by the current Flowable
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. |
@NonNull Flowable<T> |
sample(long period,
@NonNull TimeUnit unit,
@NonNull Scheduler scheduler,
boolean emitLast,
@NonNull Consumer<? super T> onDropped)
Returns a
Flowable that emits the most recently emitted item (if any) emitted by the current Flowable
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> @NonNull Flowable<T> |
sample(@NonNull 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 current Flowable since the previous
emission from the sampler Publisher . |
<U> @NonNull Flowable<T> |
sample(@NonNull 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 current Flowable since the previous
emission from the sampler Publisher
and optionally emit the very last upstream item when the upstream or other Publisher complete. |
@NonNull Flowable<T> |
scan(@NonNull BiFunction<T,T,T> accumulator)
Returns a
Flowable that emits the first value emitted by the current Flowable , then emits one value
for each subsequent value emitted by the current Flowable . |
<R> @NonNull Flowable<R> |
scan(R initialValue,
@NonNull BiFunction<R,? super T,R> accumulator)
Returns a
Flowable that emits the provided initial (seed) value, then emits one value for each value emitted
by the current Flowable . |
<R> @NonNull Flowable<R> |
scanWith(@NonNull Supplier<R> seedSupplier,
@NonNull BiFunction<R,? super T,R> accumulator)
Returns a
Flowable that emits the provided initial (seed) value, then emits one value for each value emitted
by the current Flowable . |
static <T> @NonNull Single<Boolean> |
sequenceEqual(@NonNull Publisher<? extends T> source1,
@NonNull Publisher<? extends T> source2)
|
static <T> @NonNull Single<Boolean> |
sequenceEqual(@NonNull Publisher<? extends T> source1,
@NonNull Publisher<? extends T> source2,
@NonNull BiPredicate<? super T,? super T> isEqual)
|
static <T> @NonNull Single<Boolean> |
sequenceEqual(@NonNull Publisher<? extends T> source1,
@NonNull Publisher<? extends T> source2,
@NonNull BiPredicate<? super T,? super T> isEqual,
int bufferSize)
|
static <T> @NonNull Single<Boolean> |
sequenceEqual(@NonNull Publisher<? extends T> source1,
@NonNull Publisher<? extends T> source2,
int bufferSize)
|
@NonNull Flowable<T> |
serialize()
Forces the current
Flowable 's emissions and notifications to be serialized and for it to obey
the Publisher contract in other ways. |
@NonNull Flowable<T> |
share()
Returns a new
Flowable that multicasts (and shares a single subscription to) the current Flowable . |
@NonNull Single<T> |
single(T defaultItem)
Returns a
Single that emits the single item emitted by the current Flowable if it
emits only a single item, or a default item if the current Flowable emits no items. |
@NonNull 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. |
@NonNull 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, an IllegalArgumentException will be signaled. |
@NonNull CompletionStage<T> |
singleOrErrorStage()
Signals the only expected upstream item, a
NoSuchElementException if the upstream is empty
or signals IllegalArgumentException if the upstream has more than one item
via a CompletionStage . |
@NonNull CompletionStage<T> |
singleStage(T defaultItem)
Signals the only expected upstream item (or the default item if the upstream is empty)
or signals
IllegalArgumentException if the upstream has more than one item
via a CompletionStage . |
@NonNull Flowable<T> |
skip(long count)
Returns a
Flowable that skips the first count items emitted by the current Flowable and emits
the remainder. |
@NonNull Flowable<T> |
skip(long time,
@NonNull TimeUnit unit)
Returns a
Flowable that skips values emitted by the current Flowable before a specified time window
elapses. |
@NonNull Flowable<T> |
skip(long time,
@NonNull TimeUnit unit,
@NonNull Scheduler scheduler)
Returns a
Flowable that skips values emitted by the current Flowable before a specified time window
on a specified Scheduler elapses. |
@NonNull Flowable<T> |
skipLast(int count)
Returns a
Flowable that drops a specified number of items from the end of the sequence emitted by the
current Flowable . |
@NonNull Flowable<T> |
skipLast(long time,
@NonNull TimeUnit unit)
Returns a
Flowable that drops items emitted by the current Flowable during a specified time window
before the source completes. |
@NonNull Flowable<T> |
skipLast(long time,
@NonNull TimeUnit unit,
boolean delayError)
Returns a
Flowable that drops items emitted by the current Flowable during a specified time window
before the source completes. |
@NonNull Flowable<T> |
skipLast(long time,
@NonNull TimeUnit unit,
@NonNull Scheduler scheduler)
Returns a
Flowable that drops items emitted by the current Flowable during a specified time window
(defined on a specified scheduler) before the source completes. |
@NonNull Flowable<T> |
skipLast(long time,
@NonNull TimeUnit unit,
@NonNull Scheduler scheduler,
boolean delayError)
Returns a
Flowable that drops items emitted by the current Flowable during a specified time window
(defined on a specified scheduler) before the source completes. |
@NonNull Flowable<T> |
skipLast(long time,
@NonNull TimeUnit unit,
@NonNull Scheduler scheduler,
boolean delayError,
int bufferSize)
Returns a
Flowable that drops items emitted by the current Flowable during a specified time window
(defined on a specified scheduler) before the source completes. |
<U> @NonNull Flowable<T> |
skipUntil(@NonNull Publisher<U> other)
Returns a
Flowable that skips items emitted by the current Flowable until a second Publisher emits
an item. |
@NonNull Flowable<T> |
skipWhile(@NonNull Predicate<? super T> predicate)
Returns a
Flowable that skips all items emitted by the current Flowable as long as a specified
condition holds true , but emits all further source items as soon as the condition becomes false . |
@NonNull Flowable<T> |
sorted()
Returns a
Flowable that emits the events emitted by source Publisher , in a
sorted order. |
@NonNull Flowable<T> |
sorted(@NonNull Comparator<? super T> comparator)
Returns a
Flowable that emits the events emitted by source Publisher , in a
sorted order based on a specified comparison function. |
@NonNull Flowable<T> |
startWith(@NonNull CompletableSource other)
Returns a
Flowable which first runs the other CompletableSource
then the current Flowable if the other completed normally. |
@NonNull Flowable<T> |
startWith(@NonNull MaybeSource<T> other)
Returns a
Flowable which first runs the other MaybeSource
then the current Flowable if the other succeeded or completed normally. |
@NonNull Flowable<T> |
startWith(@NonNull Publisher<? extends T> other)
Returns a
Flowable that emits the items in a specified Publisher before it begins to emit
items emitted by the current Flowable . |
@NonNull Flowable<T> |
startWith(@NonNull SingleSource<T> other)
Returns a
Flowable which first runs the other SingleSource
then the current Flowable if the other succeeded normally. |
@NonNull Flowable<T> |
startWithArray(T... items)
Returns a
Flowable that emits the specified items before it begins to emit items emitted by the current
Flowable . |
@NonNull Flowable<T> |
startWithItem(T item)
Returns a
Flowable that emits a specified item before it begins to emit items emitted by the current
Flowable . |
@NonNull Flowable<T> |
startWithIterable(@NonNull Iterable<? extends T> items)
Returns a
Flowable that emits the items in a specified Iterable before it begins to emit items
emitted by the current Flowable . |
@NonNull Disposable |
subscribe()
Subscribes to the current
Flowable and ignores onNext and onComplete emissions. |
@NonNull Disposable |
subscribe(@NonNull Consumer<? super T> onNext)
Subscribes to the current
Flowable and provides a callback to handle the items it emits. |
@NonNull Disposable |
subscribe(@NonNull Consumer<? super T> onNext,
@NonNull Consumer<? super Throwable> onError)
Subscribes to the current
Flowable and provides callbacks to handle the items it emits and any error
notification it issues. |
@NonNull Disposable |
subscribe(@NonNull Consumer<? super T> onNext,
@NonNull Consumer<? super Throwable> onError,
@NonNull Action onComplete)
Subscribes to the current
Flowable and provides callbacks to handle the items it emits and any error or
completion notification it issues. |
@NonNull Disposable |
subscribe(@NonNull Consumer<? super T> onNext,
@NonNull Consumer<? super Throwable> onError,
@NonNull Action onComplete,
@NonNull DisposableContainer container)
Wraps the given onXXX callbacks into a
Disposable Subscriber ,
adds it to the given DisposableContainer and ensures, that if the upstream
terminates or this particular Disposable is disposed, the Subscriber is removed
from the given container. |
void |
subscribe(@NonNull FlowableSubscriber<? super T> subscriber)
Establish a connection between this
Flowable and the given FlowableSubscriber and
start streaming events based on the demand of the FlowableSubscriber . |
void |
subscribe(@NonNull Subscriber<? super T> subscriber) |
protected abstract void |
subscribeActual(@NonNull Subscriber<? super T> subscriber)
Operator implementations (both source and intermediate) should implement this method that
performs the necessary business logic and handles the incoming
Subscriber s. |
@NonNull Flowable<T> |
subscribeOn(@NonNull Scheduler scheduler)
|
@NonNull Flowable<T> |
subscribeOn(@NonNull Scheduler scheduler,
boolean requestOn)
Asynchronously subscribes
Subscriber s to the current Flowable on the specified Scheduler
optionally reroutes requests from other threads to the same Scheduler thread. |
<E extends Subscriber<? super T>> |
subscribeWith(E subscriber)
|
@NonNull Flowable<T> |
switchIfEmpty(@NonNull Publisher<? extends T> other)
Returns a
Flowable that emits the items emitted by the current Flowable or the items of an alternate
Publisher if the current Flowable is empty. |
<R> @NonNull Flowable<R> |
switchMap(@NonNull Function<? super T,? extends Publisher<? extends R>> mapper)
Returns a new
Flowable by applying a function that you supply to each item emitted by the current
Flowable that returns a Publisher , and then emitting the items emitted by the most recently emitted
of these Publisher s. |
<R> @NonNull Flowable<R> |
switchMap(@NonNull Function<? super T,? extends Publisher<? extends R>> mapper,
int bufferSize)
Returns a new
Flowable by applying a function that you supply to each item emitted by the current
Flowable that returns a Publisher , and then emitting the items emitted by the most recently emitted
of these Publisher s. |
@NonNull Completable |
switchMapCompletable(@NonNull Function<? super T,? extends CompletableSource> mapper)
Maps the upstream values into
CompletableSource s, subscribes to the newer one while
disposing the subscription to the previous CompletableSource , thus keeping at most one
active CompletableSource running. |
@NonNull Completable |
switchMapCompletableDelayError(@NonNull Function<? super T,? extends CompletableSource> mapper)
Maps the upstream values into
CompletableSource s, subscribes to the newer one while
disposing the subscription to the previous CompletableSource , thus keeping at most one
active CompletableSource running and delaying any main or inner errors until all
of them terminate. |
<R> @NonNull Flowable<R> |
switchMapDelayError(@NonNull Function<? super T,? extends Publisher<? extends R>> mapper)
Returns a new
Flowable by applying a function that you supply to each item emitted by the current
Flowable that returns a Publisher , and then emitting the items emitted by the most recently emitted
of these Publisher s and delays any error until all Publisher s terminate. |
<R> @NonNull Flowable<R> |
switchMapDelayError(@NonNull Function<? super T,? extends Publisher<? extends R>> mapper,
int bufferSize)
Returns a new
Flowable by applying a function that you supply to each item emitted by the current
Flowable that returns a Publisher , and then emitting the items emitted by the most recently emitted
of these Publisher s and delays any error until all Publisher s terminate. |
<R> @NonNull Flowable<R> |
switchMapMaybe(@NonNull Function<? super T,? extends MaybeSource<? extends R>> mapper)
Maps the upstream items into
MaybeSource s 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 this Flowable or any of the
active inner MaybeSource s fail. |
<R> @NonNull Flowable<R> |
switchMapMaybeDelayError(@NonNull Function<? super T,? extends MaybeSource<? extends R>> mapper)
Maps the upstream items into
MaybeSource s 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 this Flowable or the inner MaybeSource s until all terminate. |
<R> @NonNull Flowable<R> |
switchMapSingle(@NonNull Function<? super T,? extends SingleSource<? extends R>> mapper)
Maps the upstream items into
SingleSource s 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 this Flowable or any of the
active inner SingleSource s fail. |
<R> @NonNull Flowable<R> |
switchMapSingleDelayError(@NonNull Function<? super T,? extends SingleSource<? extends R>> mapper)
Maps the upstream items into
SingleSource s 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 this Flowable or the inner SingleSource s until all terminate. |
static <T> @NonNull Flowable<T> |
switchOnNext(@NonNull Publisher<? extends Publisher<? extends T>> sources)
Converts a
Publisher that emits Publisher s into a Publisher that emits the items emitted by the
most recently emitted of those Publisher s. |
static <T> @NonNull Flowable<T> |
switchOnNext(@NonNull Publisher<? extends Publisher<? extends T>> sources,
int bufferSize)
Converts a
Publisher that emits Publisher s into a Publisher that emits the items emitted by the
most recently emitted of those Publisher s. |
static <T> @NonNull Flowable<T> |
switchOnNextDelayError(@NonNull Publisher<? extends Publisher<? extends T>> sources)
Converts a
Publisher that emits Publisher s into a Publisher that emits the items emitted by the
most recently emitted of those Publisher s and delays any exception until all Publisher s terminate. |
static <T> @NonNull Flowable<T> |
switchOnNextDelayError(@NonNull Publisher<? extends Publisher<? extends T>> sources,
int prefetch)
Converts a
Publisher that emits Publisher s into a Publisher that emits the items emitted by the
most recently emitted of those Publisher s and delays any exception until all Publisher s terminate. |
@NonNull Flowable<T> |
take(long count)
Returns a
Flowable that emits only the first count items emitted by the current Flowable . |
@NonNull Flowable<T> |
take(long time,
@NonNull TimeUnit unit)
Returns a
Flowable that emits those items emitted by source Publisher before a specified time runs
out. |
@NonNull Flowable<T> |
take(long time,
@NonNull TimeUnit unit,
@NonNull Scheduler scheduler)
|
@NonNull Flowable<T> |
takeLast(int count)
Returns a
Flowable that emits at most the last count items emitted by the current Flowable . |
@NonNull Flowable<T> |
takeLast(long count,
long time,
@NonNull TimeUnit unit)
Returns a
Flowable that emits at most a specified number of items from the current Flowable that were
emitted in a specified window of time before the current Flowable completed. |
@NonNull Flowable<T> |
takeLast(long count,
long time,
@NonNull TimeUnit unit,
@NonNull Scheduler scheduler)
Returns a
Flowable that emits at most a specified number of items from the current Flowable that were
emitted in a specified window of time before the current Flowable completed, where the timing information is
provided by a given Scheduler . |
@NonNull Flowable<T> |
takeLast(long count,
long time,
@NonNull TimeUnit unit,
@NonNull Scheduler scheduler,
boolean delayError,
int bufferSize)
Returns a
Flowable that emits at most a specified number of items from the current Flowable that were
emitted in a specified window of time before the current Flowable completed, where the timing information is
provided by a given Scheduler . |
@NonNull Flowable<T> |
takeLast(long time,
@NonNull TimeUnit unit)
Returns a
Flowable that emits the items from the current Flowable that were emitted in a specified
window of time before the current Flowable completed. |
@NonNull Flowable<T> |
takeLast(long time,
@NonNull TimeUnit unit,
boolean delayError)
Returns a
Flowable that emits the items from the current Flowable that were emitted in a specified
window of time before the current Flowable completed. |
@NonNull Flowable<T> |
takeLast(long time,
@NonNull TimeUnit unit,
@NonNull Scheduler scheduler)
Returns a
Flowable that emits the items from the current Flowable that were emitted in a specified
window of time before the current Flowable completed, where the timing information is provided by a specified
Scheduler . |
@NonNull Flowable<T> |
takeLast(long time,
@NonNull TimeUnit unit,
@NonNull Scheduler scheduler,
boolean delayError)
Returns a
Flowable that emits the items from the current Flowable that were emitted in a specified
window of time before the current Flowable completed, where the timing information is provided by a specified
Scheduler . |
@NonNull Flowable<T> |
takeLast(long time,
@NonNull TimeUnit unit,
@NonNull Scheduler scheduler,
boolean delayError,
int bufferSize)
Returns a
Flowable that emits the items from the current Flowable that were emitted in a specified
window of time before the current Flowable completed, where the timing information is provided by a specified
Scheduler . |
@NonNull Flowable<T> |
takeUntil(@NonNull Predicate<? super T> stopPredicate)
Returns a
Flowable that emits items emitted by the current Flowable , checks the specified predicate
for each item, and then completes when the condition is satisfied. |
<U> @NonNull Flowable<T> |
takeUntil(@NonNull Publisher<U> other)
Returns a
Flowable that emits the items emitted by the current Flowable until a second Publisher
emits an item or completes. |
@NonNull Flowable<T> |
takeWhile(@NonNull Predicate<? super T> predicate)
Returns a
Flowable that emits items emitted by the current Flowable so long as each item satisfied a
specified condition, and then completes as soon as this condition is not satisfied. |
@NonNull TestSubscriber<T> |
test()
|
@NonNull TestSubscriber<T> |
test(long initialRequest)
Creates a
TestSubscriber with the given initial request amount and subscribes
it to this Flowable . |
@NonNull 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 . |
@NonNull Flowable<T> |
throttleFirst(long windowDuration,
@NonNull TimeUnit unit)
Returns a
Flowable that emits only the first item emitted by the current Flowable during sequential
time windows of a specified duration. |
@NonNull Flowable<T> |
throttleFirst(long skipDuration,
@NonNull TimeUnit unit,
@NonNull Scheduler scheduler)
Returns a
Flowable that emits only the first item emitted by the current Flowable during sequential
time windows of a specified duration, where the windows are managed by a specified Scheduler . |
@NonNull Flowable<T> |
throttleFirst(long skipDuration,
@NonNull TimeUnit unit,
@NonNull Scheduler scheduler,
@NonNull Consumer<? super T> onDropped)
Returns a
Flowable that emits only the first item emitted by the current Flowable during sequential
time windows of a specified duration, where the windows are managed by a specified Scheduler . |
@NonNull Flowable<T> |
throttleLast(long intervalDuration,
@NonNull TimeUnit unit)
Returns a
Flowable that emits only the last item emitted by the current Flowable during sequential
time windows of a specified duration. |
@NonNull Flowable<T> |
throttleLast(long intervalDuration,
@NonNull TimeUnit unit,
@NonNull Scheduler scheduler)
Returns a
Flowable that emits only the last item emitted by the current Flowable during sequential
time windows of a specified duration, where the duration is governed by a specified Scheduler . |
@NonNull Flowable<T> |
throttleLast(long intervalDuration,
@NonNull TimeUnit unit,
@NonNull Scheduler scheduler,
@NonNull Consumer<? super T> onDropped)
Returns a
Flowable that emits only the last item emitted by the current Flowable during sequential
time windows of a specified duration, where the duration is governed by a specified Scheduler . |
@NonNull Flowable<T> |
throttleLatest(long timeout,
@NonNull 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. |
@NonNull Flowable<T> |
throttleLatest(long timeout,
@NonNull 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. |
@NonNull Flowable<T> |
throttleLatest(long timeout,
@NonNull TimeUnit unit,
@NonNull 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. |
@NonNull Flowable<T> |
throttleLatest(long timeout,
@NonNull TimeUnit unit,
@NonNull 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. |
@NonNull Flowable<T> |
throttleLatest(long timeout,
@NonNull TimeUnit unit,
@NonNull Scheduler scheduler,
boolean emitLast,
@NonNull Consumer<? super T> onDropped)
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, invoking the consumer for any dropped item. |
@NonNull Flowable<T> |
throttleWithTimeout(long timeout,
@NonNull TimeUnit unit)
Returns a
Flowable that mirrors the current Flowable , except that it drops items emitted by the
current Flowable that are followed by newer items before a timeout value expires. |
@NonNull Flowable<T> |
throttleWithTimeout(long timeout,
@NonNull TimeUnit unit,
@NonNull Scheduler scheduler)
Returns a
Flowable that mirrors the current Flowable , except that it drops items emitted by the
current Flowable that are followed by newer items before a timeout value expires on a specified
Scheduler . |
@NonNull Flowable<T> |
throttleWithTimeout(long timeout,
@NonNull TimeUnit unit,
@NonNull Scheduler scheduler,
@NonNull Consumer<? super T> onDropped)
Returns a
Flowable that mirrors the current Flowable , except that it drops items emitted by the
current Flowable that are followed by newer items before a timeout value expires on a specified
Scheduler . |
@NonNull Flowable<Timed<T>> |
timeInterval()
Returns a
Flowable that emits records of the time interval between consecutive items emitted by the
current Flowable . |
@NonNull Flowable<Timed<T>> |
timeInterval(@NonNull Scheduler scheduler)
Returns a
Flowable that emits records of the time interval between consecutive items emitted by the
current Flowable , where this interval is computed on a specified Scheduler . |
@NonNull Flowable<Timed<T>> |
timeInterval(@NonNull TimeUnit unit)
Returns a
Flowable that emits records of the time interval between consecutive items emitted by the
current Flowable . |
@NonNull Flowable<Timed<T>> |
timeInterval(@NonNull TimeUnit unit,
@NonNull Scheduler scheduler)
Returns a
Flowable that emits records of the time interval between consecutive items emitted by the
current Flowable , where this interval is computed on a specified Scheduler . |
<V> @NonNull Flowable<T> |
timeout(@NonNull Function<? super T,? extends Publisher<V>> itemTimeoutIndicator)
Returns a
Flowable that mirrors the current Flowable , but notifies Subscriber s of a
TimeoutException if an item emitted by the current Flowable 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> @NonNull Flowable<T> |
timeout(@NonNull Function<? super T,? extends Publisher<V>> itemTimeoutIndicator,
@NonNull Publisher<? extends T> fallback)
Returns a
Flowable that mirrors the current Flowable , but that switches to a fallback Publisher if
an item emitted by the current Flowable 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. |
@NonNull Flowable<T> |
timeout(long timeout,
@NonNull TimeUnit unit)
Returns a
Flowable that mirrors the current Flowable but applies a timeout policy for each emitted
item. |
@NonNull Flowable<T> |
timeout(long timeout,
@NonNull TimeUnit unit,
@NonNull Publisher<? extends T> fallback)
Returns a
Flowable that mirrors the current Flowable but applies a timeout policy for each emitted
item. |
@NonNull Flowable<T> |
timeout(long timeout,
@NonNull TimeUnit unit,
@NonNull Scheduler scheduler)
Returns a
Flowable that mirrors the current Flowable but applies a timeout policy for each emitted
item, where this policy is governed by a specified Scheduler . |
@NonNull Flowable<T> |
timeout(long timeout,
@NonNull TimeUnit unit,
@NonNull Scheduler scheduler,
@NonNull Publisher<? extends T> fallback)
Returns a
Flowable that mirrors the current Flowable but applies a timeout policy for each emitted
item using a specified Scheduler . |
<U,V> @NonNull Flowable<T> |
timeout(@NonNull Publisher<U> firstTimeoutIndicator,
@NonNull Function<? super T,? extends Publisher<V>> itemTimeoutIndicator)
Returns a
Flowable that mirrors the current Flowable , but notifies Subscriber s of a
TimeoutException if either the first item emitted by the current Flowable or any subsequent item
doesn't arrive within time windows defined by other Publisher s. |
<U,V> @NonNull Flowable<T> |
timeout(@NonNull Publisher<U> firstTimeoutIndicator,
@NonNull Function<? super T,? extends Publisher<V>> itemTimeoutIndicator,
@NonNull Publisher<? extends T> fallback)
Returns a
Flowable that mirrors the current Flowable , but switches to a fallback Publisher if either
the first item emitted by the current Flowable or any subsequent item doesn't arrive within time windows
defined by other Publisher s. |
static @NonNull Flowable<Long> |
timer(long delay,
@NonNull TimeUnit unit)
Returns a
Flowable that emits 0L after a specified delay, and then completes. |
static @NonNull Flowable<Long> |
timer(long delay,
@NonNull TimeUnit unit,
@NonNull Scheduler scheduler)
Returns a
Flowable that emits 0L after a specified delay, on a specified Scheduler , and then
completes. |
@NonNull Flowable<Timed<T>> |
timestamp()
|
@NonNull Flowable<Timed<T>> |
timestamp(@NonNull Scheduler scheduler)
|
@NonNull Flowable<Timed<T>> |
timestamp(@NonNull TimeUnit unit)
|
@NonNull Flowable<Timed<T>> |
timestamp(@NonNull TimeUnit unit,
@NonNull Scheduler scheduler)
|
<R> R |
to(@NonNull FlowableConverter<T,? extends R> converter)
Calls the specified converter function during assembly time and returns its resulting value.
|
@NonNull Future<T> |
toFuture()
Returns a
Future representing the only value emitted by this Flowable . |
@NonNull Single<List<T>> |
toList()
|
@NonNull Single<List<T>> |
toList(int capacityHint)
|
<U extends Collection<? super T>> |
toList(@NonNull Supplier<U> collectionSupplier)
|
<K> @NonNull Single<Map<K,T>> |
toMap(@NonNull Function<? super T,? extends K> keySelector)
|
<K,V> @NonNull Single<Map<K,V>> |
toMap(@NonNull Function<? super T,? extends K> keySelector,
@NonNull Function<? super T,? extends V> valueSelector)
|
<K,V> @NonNull Single<Map<K,V>> |
toMap(@NonNull Function<? super T,? extends K> keySelector,
@NonNull Function<? super T,? extends V> valueSelector,
@NonNull Supplier<? extends Map<K,V>> mapSupplier)
|
<K> @NonNull Single<Map<K,Collection<T>>> |
toMultimap(@NonNull Function<? super T,? extends K> keySelector)
|
<K,V> @NonNull Single<Map<K,Collection<V>>> |
toMultimap(@NonNull Function<? super T,? extends K> keySelector,
@NonNull Function<? super T,? extends V> valueSelector)
|
<K,V> @NonNull Single<Map<K,Collection<V>>> |
toMultimap(@NonNull Function<? super T,? extends K> keySelector,
@NonNull Function<? super T,? extends V> valueSelector,
@NonNull Supplier<? extends Map<K,Collection<V>>> mapSupplier,
@NonNull Function<? super K,? extends Collection<? super V>> collectionFactory)
|
<K,V> @NonNull Single<Map<K,Collection<V>>> |
toMultimap(@NonNull Function<? super T,? extends K> keySelector,
@NonNull Function<? super T,? extends V> valueSelector,
@NonNull Supplier<Map<K,Collection<V>>> mapSupplier)
|
@NonNull Observable<T> |
toObservable()
Converts the current
Flowable into a non-backpressured Observable . |
@NonNull Single<List<T>> |
toSortedList()
|
@NonNull Single<List<T>> |
toSortedList(@NonNull Comparator<? super T> comparator)
|
@NonNull Single<List<T>> |
toSortedList(@NonNull Comparator<? super T> comparator,
int capacityHint)
|
@NonNull Single<List<T>> |
toSortedList(int capacityHint)
|
static <T> @NonNull Flowable<T> |
unsafeCreate(@NonNull Publisher<T> onSubscribe)
Create a
Flowable by wrapping a Publisher which has to be implemented according
to the Reactive Streams specification by handling backpressure and
cancellation correctly; no safeguards are provided by the Flowable itself. |
@NonNull Flowable<T> |
unsubscribeOn(@NonNull Scheduler scheduler)
Cancels the current
Flowable asynchronously by invoking Subscription.cancel()
on the specified Scheduler . |
static <T,D> @NonNull Flowable<T> |
using(@NonNull Supplier<? extends D> resourceSupplier,
@NonNull Function<? super D,? extends Publisher<? extends T>> sourceSupplier,
@NonNull Consumer<? super D> resourceCleanup)
Constructs a
Flowable that creates a dependent resource object, a Publisher with
that resource and calls the provided resourceDisposer function if this inner source terminates or the
downstream cancels the flow. |
static <T,D> @NonNull Flowable<T> |
using(@NonNull Supplier<? extends D> resourceSupplier,
@NonNull Function<? super D,? extends Publisher<? extends T>> sourceSupplier,
@NonNull Consumer<? super D> resourceCleanup,
boolean eager)
Constructs a
Flowable that creates a dependent resource object, a Publisher with
that resource and calls the provided resourceDisposer function if this inner source terminates or the
downstream disposes the flow; doing it before these end-states have been reached if eager == true , after otherwise. |
@NonNull Flowable<Flowable<T>> |
window(long count)
Returns a
Flowable that emits windows of items it collects from the current Flowable . |
@NonNull Flowable<Flowable<T>> |
window(long count,
long skip)
Returns a
Flowable that emits windows of items it collects from the current Flowable . |
@NonNull Flowable<Flowable<T>> |
window(long count,
long skip,
int bufferSize)
Returns a
Flowable that emits windows of items it collects from the current Flowable . |
@NonNull Flowable<Flowable<T>> |
window(long timespan,
long timeskip,
@NonNull TimeUnit unit)
Returns a
Flowable that emits windows of items it collects from the current Flowable . |
@NonNull Flowable<Flowable<T>> |
window(long timespan,
long timeskip,
@NonNull TimeUnit unit,
@NonNull Scheduler scheduler)
Returns a
Flowable that emits windows of items it collects from the current Flowable . |
@NonNull Flowable<Flowable<T>> |
window(long timespan,
long timeskip,
@NonNull TimeUnit unit,
@NonNull Scheduler scheduler,
int bufferSize)
Returns a
Flowable that emits windows of items it collects from the current Flowable . |
@NonNull Flowable<Flowable<T>> |
window(long timespan,
@NonNull TimeUnit unit)
Returns a
Flowable that emits windows of items it collects from the current Flowable . |
@NonNull Flowable<Flowable<T>> |
window(long timespan,
@NonNull TimeUnit unit,
long count)
Returns a
Flowable that emits windows of items it collects from the current Flowable . |
@NonNull Flowable<Flowable<T>> |
window(long timespan,
@NonNull TimeUnit unit,
long count,
boolean restart)
Returns a
Flowable that emits windows of items it collects from the current Flowable . |
@NonNull Flowable<Flowable<T>> |
window(long timespan,
@NonNull TimeUnit unit,
@NonNull Scheduler scheduler)
Returns a
Flowable that emits windows of items it collects from the current Flowable . |
@NonNull Flowable<Flowable<T>> |
window(long timespan,
@NonNull TimeUnit unit,
@NonNull Scheduler scheduler,
long count)
Returns a
Flowable that emits windows of items it collects from the current Flowable . |
@NonNull Flowable<Flowable<T>> |
window(long timespan,
@NonNull TimeUnit unit,
@NonNull Scheduler scheduler,
long count,
boolean restart)
Returns a
Flowable that emits windows of items it collects from the current Flowable . |
@NonNull Flowable<Flowable<T>> |
window(long timespan,
@NonNull TimeUnit unit,
@NonNull Scheduler scheduler,
long count,
boolean restart,
int bufferSize)
Returns a
Flowable that emits windows of items it collects from the current Flowable . |
<B> @NonNull Flowable<Flowable<T>> |
window(@NonNull Publisher<B> boundaryIndicator)
Returns a
Flowable that emits non-overlapping windows of items it collects from the current Flowable
where the boundary of each window is determined by the items emitted from a specified boundary-governing
Publisher . |
<B> @NonNull Flowable<Flowable<T>> |
window(@NonNull Publisher<B> boundaryIndicator,
int bufferSize)
Returns a
Flowable that emits non-overlapping windows of items it collects from the current Flowable
where the boundary of each window is determined by the items emitted from a specified boundary-governing
Publisher . |
<U,V> @NonNull Flowable<Flowable<T>> |
window(@NonNull Publisher<U> openingIndicator,
@NonNull Function<? super U,? extends Publisher<V>> closingIndicator)
Returns a
Flowable that emits windows of items it collects from the current Flowable . |
<U,V> @NonNull Flowable<Flowable<T>> |
window(@NonNull Publisher<U> openingIndicator,
@NonNull Function<? super U,? extends Publisher<V>> closingIndicator,
int bufferSize)
Returns a
Flowable that emits windows of items it collects from the current Flowable . |
<R> @NonNull Flowable<R> |
withLatestFrom(@NonNull Iterable<? extends Publisher<?>> others,
@NonNull Function<? super Object[],R> combiner)
Combines the value emission from the current
Flowable with the latest emissions from the
other Publisher s via a function to produce the output item. |
<R> @NonNull Flowable<R> |
withLatestFrom(@NonNull Publisher<?>[] others,
@NonNull Function<? super Object[],R> combiner)
Combines the value emission from the current
Flowable with the latest emissions from the
other Publisher s via a function to produce the output item. |
<U,R> @NonNull Flowable<R> |
withLatestFrom(@NonNull Publisher<? extends U> other,
@NonNull BiFunction<? super T,? super U,? extends R> combiner)
Merges the specified
Publisher into the current Flowable sequence by using the resultSelector
function only when the current Flowable (this instance) emits an item. |
<T1,T2,R> @NonNull Flowable<R> |
withLatestFrom(@NonNull Publisher<T1> source1,
@NonNull Publisher<T2> source2,
@NonNull Function3<? super T,? super T1,? super T2,R> combiner)
Combines the value emission from the current
Flowable with the latest emissions from the
other Publisher s via a function to produce the output item. |
<T1,T2,T3,R> |
withLatestFrom(@NonNull Publisher<T1> source1,
@NonNull Publisher<T2> source2,
@NonNull Publisher<T3> source3,
@NonNull Function4<? super T,? super T1,? super T2,? super T3,R> combiner)
Combines the value emission from the current
Flowable with the latest emissions from the
other Publisher s via a function to produce the output item. |
<T1,T2,T3,T4,R> |
withLatestFrom(@NonNull Publisher<T1> source1,
@NonNull Publisher<T2> source2,
@NonNull Publisher<T3> source3,
@NonNull Publisher<T4> source4,
@NonNull Function5<? super T,? super T1,? super T2,? super T3,? super T4,R> combiner)
Combines the value emission from the current
Flowable with the latest emissions from the
other Publisher s via a function to produce the output item. |
static <T,R> @NonNull Flowable<R> |
zip(@NonNull Iterable<? extends Publisher<? extends T>> sources,
@NonNull Function<? super Object[],? extends R> zipper)
|
static <T,R> @NonNull Flowable<R> |
zip(@NonNull Iterable<? extends Publisher<? extends T>> sources,
@NonNull Function<? super Object[],? extends R> zipper,
boolean delayError,
int bufferSize)
|
static <T1,T2,R> @NonNull Flowable<R> |
zip(@NonNull Publisher<? extends T1> source1,
@NonNull Publisher<? extends T2> source2,
@NonNull 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 Publisher s. |
static <T1,T2,R> @NonNull Flowable<R> |
zip(@NonNull Publisher<? extends T1> source1,
@NonNull Publisher<? extends T2> source2,
@NonNull 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 Publisher s. |
static <T1,T2,R> @NonNull Flowable<R> |
zip(@NonNull Publisher<? extends T1> source1,
@NonNull Publisher<? extends T2> source2,
@NonNull 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 Publisher s. |
static <T1,T2,T3,R> |
zip(@NonNull Publisher<? extends T1> source1,
@NonNull Publisher<? extends T2> source2,
@NonNull Publisher<? extends T3> source3,
@NonNull 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 Publisher s. |
static <T1,T2,T3,T4,R> |
zip(@NonNull Publisher<? extends T1> source1,
@NonNull Publisher<? extends T2> source2,
@NonNull Publisher<? extends T3> source3,
@NonNull Publisher<? extends T4> source4,
@NonNull 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 Publisher s. |
static <T1,T2,T3,T4,T5,R> |
zip(@NonNull Publisher<? extends T1> source1,
@NonNull Publisher<? extends T2> source2,
@NonNull Publisher<? extends T3> source3,
@NonNull Publisher<? extends T4> source4,
@NonNull Publisher<? extends T5> source5,
@NonNull 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 Publisher s. |
static <T1,T2,T3,T4,T5,T6,R> |
zip(@NonNull Publisher<? extends T1> source1,
@NonNull Publisher<? extends T2> source2,
@NonNull Publisher<? extends T3> source3,
@NonNull Publisher<? extends T4> source4,
@NonNull Publisher<? extends T5> source5,
@NonNull Publisher<? extends T6> source6,
@NonNull 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 Publisher s. |
static <T1,T2,T3,T4,T5,T6,T7,R> |
zip(@NonNull Publisher<? extends T1> source1,
@NonNull Publisher<? extends T2> source2,
@NonNull Publisher<? extends T3> source3,
@NonNull Publisher<? extends T4> source4,
@NonNull Publisher<? extends T5> source5,
@NonNull Publisher<? extends T6> source6,
@NonNull Publisher<? extends T7> source7,
@NonNull 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 Publisher s. |
static <T1,T2,T3,T4,T5,T6,T7,T8,R> |
zip(@NonNull Publisher<? extends T1> source1,
@NonNull Publisher<? extends T2> source2,
@NonNull Publisher<? extends T3> source3,
@NonNull Publisher<? extends T4> source4,
@NonNull Publisher<? extends T5> source5,
@NonNull Publisher<? extends T6> source6,
@NonNull Publisher<? extends T7> source7,
@NonNull Publisher<? extends T8> source8,
@NonNull 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 Publisher s. |
static <T1,T2,T3,T4,T5,T6,T7,T8,T9,R> |
zip(@NonNull Publisher<? extends T1> source1,
@NonNull Publisher<? extends T2> source2,
@NonNull Publisher<? extends T3> source3,
@NonNull Publisher<? extends T4> source4,
@NonNull Publisher<? extends T5> source5,
@NonNull Publisher<? extends T6> source6,
@NonNull Publisher<? extends T7> source7,
@NonNull Publisher<? extends T8> source8,
@NonNull Publisher<? extends T9> source9,
@NonNull 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 Publisher s. |
static <T,R> @NonNull Flowable<R> |
zipArray(@NonNull Function<? super Object[],? 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 Publisher s. |
<U,R> @NonNull Flowable<R> |
zipWith(@NonNull Iterable<U> other,
@NonNull BiFunction<? super T,? 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 current Flowable and a specified Iterable sequence. |
<U,R> @NonNull Flowable<R> |
zipWith(@NonNull Publisher<? extends U> other,
@NonNull BiFunction<? super T,? 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 current Flowable and another specified Publisher . |
<U,R> @NonNull Flowable<R> |
zipWith(@NonNull Publisher<? extends U> other,
@NonNull BiFunction<? super T,? 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 current Flowable and another specified Publisher . |
<U,R> @NonNull Flowable<R> |
zipWith(@NonNull Publisher<? extends U> other,
@NonNull BiFunction<? super T,? 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 current Flowable and another specified Publisher . |
@CheckReturnValue @NonNull @BackpressureSupport(value=PASS_THROUGH) @SchedulerSupport(value="none") public static <T> @NonNull Flowable<T> amb(@NonNull Iterable<? extends Publisher<? extends T>> sources)
Publisher
in an Iterable
of several Publisher
s that first either emits an item or sends
a termination notification.
When one of the Publisher
s signal an item or terminates first, all subscriptions to the other
Publisher
s are canceled.
Publisher
's backpressure behavior.amb
does not operate by default on a particular Scheduler
.Publisher
s signals an error, the error is routed to the global
error handler via RxJavaPlugins.onError(Throwable)
.
T
- the common element typesources
- an Iterable
of Publisher
s sources competing to react first. A subscription to each Publisher
will
occur in the same order as in this Iterable
.Flowable
instanceNullPointerException
- if sources
is null
@CheckReturnValue @NonNull @BackpressureSupport(value=PASS_THROUGH) @SchedulerSupport(value="none") @SafeVarargs public static <T> @NonNull Flowable<T> ambArray(@NonNull Publisher<? extends T>... sources)
Publisher
in an array of several Publisher
s that first either emits an item or sends
a termination notification.
When one of the Publisher
s signal an item or terminates first, all subscriptions to the other
Publisher
s are canceled.
Publisher
's backpressure behavior.ambArray
does not operate by default on a particular Scheduler
.Publisher
s signals an error, the error is routed to the global
error handler via RxJavaPlugins.onError(Throwable)
.
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 array.Flowable
instanceNullPointerException
- if sources
is null
@CheckReturnValue public static int bufferSize()
The value can be overridden via system parameter rx3.buffer-size
before the Flowable
class is loaded.
@SchedulerSupport(value="none") @CheckReturnValue @BackpressureSupport(value=FULL) @NonNull public static <T,R> @NonNull Flowable<R> combineLatestArray(@NonNull Publisher<? extends T>[] sources, @NonNull Function<? super Object[],? extends R> combiner)
Publisher
s by emitting an item that aggregates the latest values of each of
the source Publisher
s each time an item is received from any of the source Publisher
s, where this
aggregation is defined by a specified function.
Note on method signature: since Java doesn't allow creating a generic array with new T[]
, the
implementation of this operator has to create an Object[]
instead. Unfortunately, a
Function<Integer[], R>
passed to the method would trigger a ClassCastException
.
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 Publisher
s 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 source Publisher
s
are requested in a bounded manner, however, their backpressure is not enforced (the operator won't signal
MissingBackpressureException
) and may lead to OutOfMemoryError
due to internal buffer bloat.combineLatestArray
does not operate by default on a particular Scheduler
.T
- the common base type of source valuesR
- the result typesources
- the collection of source Publisher
scombiner
- the aggregation function used to combine the items emitted by the source Publisher
sFlowable
instanceNullPointerException
- if sources
or combiner
is null
@SchedulerSupport(value="none") @CheckReturnValue @NonNull @BackpressureSupport(value=FULL) public static <T,R> @NonNull Flowable<R> combineLatestArray(@NonNull Publisher<? extends T>[] sources, @NonNull Function<? super Object[],? extends R> combiner, int bufferSize)
Publisher
s by emitting an item that aggregates the latest values of each of
the source Publisher
s each time an item is received from any of the source Publisher
s, where this
aggregation is defined by a specified function.
Note on method signature: since Java doesn't allow creating a generic array with new T[]
, the
implementation of this operator has to create an Object[]
instead. Unfortunately, a
Function<Integer[], R>
passed to the method would trigger a ClassCastException
.
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 Publisher
s 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 source Publisher
s
are requested in a bounded manner, however, their backpressure is not enforced (the operator won't signal
MissingBackpressureException
) and may lead to OutOfMemoryError
due to internal buffer bloat.combineLatestArray
does not operate by default on a particular Scheduler
.T
- the common base type of source valuesR
- the result typesources
- the collection of source Publisher
scombiner
- the aggregation function used to combine the items emitted by the source Publisher
sbufferSize
- the internal buffer size and prefetch amount applied to every source Flowable
Flowable
instanceNullPointerException
- if sources
or combiner
is null
IllegalArgumentException
- if bufferSize
is non-positive@SchedulerSupport(value="none") @CheckReturnValue @BackpressureSupport(value=FULL) @NonNull public static <T,R> @NonNull Flowable<R> combineLatest(@NonNull Iterable<? extends Publisher<? extends T>> sources, @NonNull Function<? super Object[],? extends R> combiner)
Publisher
s by emitting an item that aggregates the latest values of each of
the source Publisher
s each time an item is received from any of the source Publisher
s, where this
aggregation is defined by a specified function.
Note on method signature: since Java doesn't allow creating a generic array with new T[]
, the
implementation of this operator has to create an Object[]
instead. Unfortunately, a
Function<Integer[], R>
passed to the method would trigger a ClassCastException
.
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 Publisher
s 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 source Publisher
s
are requested in a bounded manner, however, their backpressure is not enforced (the operator won't signal
MissingBackpressureException
) and may lead to OutOfMemoryError
due to internal buffer bloat.combineLatest
does not operate by default on a particular Scheduler
.T
- the common base type of source valuesR
- the result typesources
- the collection of source Publisher
scombiner
- the aggregation function used to combine the items emitted by the source Publisher
sFlowable
instanceNullPointerException
- if sources
or combiner
is null
@SchedulerSupport(value="none") @CheckReturnValue @NonNull @BackpressureSupport(value=FULL) public static <T,R> @NonNull Flowable<R> combineLatest(@NonNull Iterable<? extends Publisher<? extends T>> sources, @NonNull Function<? super Object[],? extends R> combiner, int bufferSize)
Publisher
s by emitting an item that aggregates the latest values of each of
the source Publisher
s each time an item is received from any of the source Publisher
s, where this
aggregation is defined by a specified function.
Note on method signature: since Java doesn't allow creating a generic array with new T[]
, the
implementation of this operator has to create an Object[]
instead. Unfortunately, a
Function<Integer[], R>
passed to the method would trigger a ClassCastException
.
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 Publisher
s 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 source Publisher
s
are requested in a bounded manner, however, their backpressure is not enforced (the operator won't signal
MissingBackpressureException
) and may lead to OutOfMemoryError
due to internal buffer bloat.combineLatest
does not operate by default on a particular Scheduler
.T
- the common base type of source valuesR
- the result typesources
- the collection of source Publisher
scombiner
- the aggregation function used to combine the items emitted by the source Publisher
sbufferSize
- the internal buffer size and prefetch amount applied to every source Flowable
Flowable
instanceNullPointerException
- if sources
or combiner
is null
IllegalArgumentException
- if bufferSize
is non-positive@SchedulerSupport(value="none") @CheckReturnValue @BackpressureSupport(value=FULL) @NonNull public static <T,R> @NonNull Flowable<R> combineLatestArrayDelayError(@NonNull Publisher<? extends T>[] sources, @NonNull Function<? super Object[],? extends R> combiner)
Publisher
s by emitting an item that aggregates the latest values of each of
the source Publisher
s each time an item is received from any of the source Publisher
s, where this
aggregation is defined by a specified function.
Note on method signature: since Java doesn't allow creating a generic array with new T[]
, the
implementation of this operator has to create an Object[]
instead. Unfortunately, a
Function<Integer[], R>
passed to the method would trigger a ClassCastException
.
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 Publisher
s 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 source Publisher
s
are requested in a bounded manner, however, their backpressure is not enforced (the operator won't signal
MissingBackpressureException
) and may lead to OutOfMemoryError
due to internal buffer bloat.combineLatestArrayDelayError
does not operate by default on a particular Scheduler
.T
- the common base type of source valuesR
- the result typesources
- the collection of source Publisher
scombiner
- the aggregation function used to combine the items emitted by the source Publisher
sFlowable
instanceNullPointerException
- if sources
or combiner
is null
@SchedulerSupport(value="none") @CheckReturnValue @NonNull @BackpressureSupport(value=FULL) public static <T,R> @NonNull Flowable<R> combineLatestArrayDelayError(@NonNull Publisher<? extends T>[] sources, @NonNull Function<? super Object[],? extends R> combiner, int bufferSize)
Publisher
s by emitting an item that aggregates the latest values of each of
the source Publisher
s each time an item is received from any of the source Publisher
s, where this
aggregation is defined by a specified function and delays any error from the sources until
all source Publisher
s terminate.
Note on method signature: since Java doesn't allow creating a generic array with new T[]
, the
implementation of this operator has to create an Object[]
instead. Unfortunately, a
Function<Integer[], R>
passed to the method would trigger a ClassCastException
.
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 Publisher
s 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 source Publisher
s
are requested in a bounded manner, however, their backpressure is not enforced (the operator won't signal
MissingBackpressureException
) and may lead to OutOfMemoryError
due to internal buffer bloat.combineLatestArrayDelayError
does not operate by default on a particular Scheduler
.T
- the common base type of source valuesR
- the result typesources
- the collection of source Publisher
scombiner
- the aggregation function used to combine the items emitted by the source Publisher
sbufferSize
- the internal buffer size and prefetch amount applied to every source Flowable
Flowable
instanceNullPointerException
- if sources
or combiner
is null
IllegalArgumentException
- if bufferSize
is non-positive@SchedulerSupport(value="none") @CheckReturnValue @BackpressureSupport(value=FULL) @NonNull public static <T,R> @NonNull Flowable<R> combineLatestDelayError(@NonNull Iterable<? extends Publisher<? extends T>> sources, @NonNull Function<? super Object[],? extends R> combiner)
Publisher
s by emitting an item that aggregates the latest values of each of
the source Publisher
s each time an item is received from any of the source Publisher
s, where this
aggregation is defined by a specified function and delays any error from the sources until
all source Publisher
s terminate.
Note on method signature: since Java doesn't allow creating a generic array with new T[]
, the
implementation of this operator has to create an Object[]
instead. Unfortunately, a
Function<Integer[], R>
passed to the method would trigger a ClassCastException
.
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 Publisher
s 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 source Publisher
s
are requested in a bounded manner, however, their backpressure is not enforced (the operator won't signal
MissingBackpressureException
) and may lead to OutOfMemoryError
due to internal buffer bloat.combineLatestDelayError
does not operate by default on a particular Scheduler
.T
- the common base type of source valuesR
- the result typesources
- the collection of source Publisher
scombiner
- the aggregation function used to combine the items emitted by the source Publisher
sFlowable
instanceNullPointerException
- if sources
or combiner
is null
@SchedulerSupport(value="none") @CheckReturnValue @BackpressureSupport(value=FULL) @NonNull public static <T,R> @NonNull Flowable<R> combineLatestDelayError(@NonNull Iterable<? extends Publisher<? extends T>> sources, @NonNull Function<? super Object[],? extends R> combiner, int bufferSize)
Publisher
s by emitting an item that aggregates the latest values of each of
the source Publisher
s each time an item is received from any of the source Publisher
s, where this
aggregation is defined by a specified function and delays any error from the sources until
all source Publisher
s terminate.
Note on method signature: since Java doesn't allow creating a generic array with new T[]
, the
implementation of this operator has to create an Object[]
instead. Unfortunately, a
Function<Integer[], R>
passed to the method would trigger a ClassCastException
.
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 Publisher
s 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 source Publisher
s
are requested in a bounded manner, however, their backpressure is not enforced (the operator won't signal
MissingBackpressureException
) and may lead to OutOfMemoryError
due to internal buffer bloat.combineLatestDelayError
does not operate by default on a particular Scheduler
.T
- the common base type of source valuesR
- the result typesources
- the collection of source Publisher
scombiner
- the aggregation function used to combine the items emitted by the source Publisher
sbufferSize
- the internal buffer size and prefetch amount applied to every source Flowable
Flowable
instanceNullPointerException
- if sources
or combiner
is null
IllegalArgumentException
- if bufferSize
is non-positive@CheckReturnValue @BackpressureSupport(value=FULL) @SchedulerSupport(value="none") @NonNull public static <T1,T2,R> @NonNull Flowable<R> combineLatest(@NonNull Publisher<? extends T1> source1, @NonNull Publisher<? extends T2> source2, @NonNull BiFunction<? super T1,? super T2,? extends R> combiner)
Publisher
s by emitting an item that aggregates the latest values of each of the
source Publisher
s each time an item is received from either of the source Publisher
s, where this
aggregation is defined by a specified function.
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 source Publisher
s
are requested in a bounded manner, however, their backpressure is not enforced (the operator won't signal
MissingBackpressureException
) and may lead to OutOfMemoryError
due to internal buffer bloat.combineLatest
does not operate by default on a particular Scheduler
.T1
- the element type of the first sourceT2
- the element type of the second sourceR
- the combined output typesource1
- the first source Publisher
source2
- the second source Publisher
combiner
- the aggregation function used to combine the items emitted by the source Publisher
sFlowable
instanceNullPointerException
- if source1
, source2
or combiner
is null
@CheckReturnValue @NonNull @BackpressureSupport(value=FULL) @SchedulerSupport(value="none") public static <T1,T2,T3,R> @NonNull Flowable<R> combineLatest(@NonNull Publisher<? extends T1> source1, @NonNull Publisher<? extends T2> source2, @NonNull Publisher<? extends T3> source3, @NonNull Function3<? super T1,? super T2,? super T3,? extends R> combiner)
Publisher
s by emitting an item that aggregates the latest values of each of the
source Publisher
s each time an item is received from any of the source Publisher
s, where this
aggregation is defined by a specified function.
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 source Publisher
s
are requested in a bounded manner, however, their backpressure is not enforced (the operator won't signal
MissingBackpressureException
) and may lead to OutOfMemoryError
due to internal buffer bloat.combineLatest
does not operate by default on a particular Scheduler
.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 Publisher
source2
- the second source Publisher
source3
- the third source Publisher
combiner
- the aggregation function used to combine the items emitted by the source Publisher
sFlowable
instanceNullPointerException
- if source1
, source2
, source3
or combiner
is null
@CheckReturnValue @NonNull @BackpressureSupport(value=FULL) @SchedulerSupport(value="none") public static <T1,T2,T3,T4,R> @NonNull Flowable<R> combineLatest(@NonNull Publisher<? extends T1> source1, @NonNull Publisher<? extends T2> source2, @NonNull Publisher<? extends T3> source3, @NonNull Publisher<? extends T4> source4, @NonNull Function4<? super T1,? super T2,? super T3,? super T4,? extends R> combiner)
Publisher
s by emitting an item that aggregates the latest values of each of the
source Publisher
s each time an item is received from any of the source Publisher
s, where this
aggregation is defined by a specified function.
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 source Publisher
s
are requested in a bounded manner, however, their backpressure is not enforced (the operator won't signal
MissingBackpressureException
) and may lead to OutOfMemoryError
due to internal buffer bloat.combineLatest
does not operate by default on a particular Scheduler
.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 Publisher
source2
- the second source Publisher
source3
- the third source Publisher
source4
- the fourth source Publisher
combiner
- the aggregation function used to combine the items emitted by the source Publisher
sFlowable
instanceNullPointerException
- if source1
, source2
, source3
,
source4
or combiner
is null
@CheckReturnValue @NonNull @BackpressureSupport(value=FULL) @SchedulerSupport(value="none") public static <T1,T2,T3,T4,T5,R> @NonNull Flowable<R> combineLatest(@NonNull Publisher<? extends T1> source1, @NonNull Publisher<? extends T2> source2, @NonNull Publisher<? extends T3> source3, @NonNull Publisher<? extends T4> source4, @NonNull Publisher<? extends T5> source5, @NonNull Function5<? super T1,? super T2,? super T3,? super T4,? super T5,? extends R> combiner)
Publisher
s by emitting an item that aggregates the latest values of each of the
source Publisher
s each time an item is received from any of the source Publisher
s, where this
aggregation is defined by a specified function.
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 source Publisher
s
are requested in a bounded manner, however, their backpressure is not enforced (the operator won't signal
MissingBackpressureException
) and may lead to OutOfMemoryError
due to internal buffer bloat.combineLatest
does not operate by default on a particular Scheduler
.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 Publisher
source2
- the second source Publisher
source3
- the third source Publisher
source4
- the fourth source Publisher
source5
- the fifth source Publisher
combiner
- the aggregation function used to combine the items emitted by the source Publisher
sFlowable
instanceNullPointerException
- if source1
, source2
, source3
,
source4
, source5
or combiner
is null
@CheckReturnValue @NonNull @BackpressureSupport(value=FULL) @SchedulerSupport(value="none") public static <T1,T2,T3,T4,T5,T6,R> @NonNull Flowable<R> combineLatest(@NonNull Publisher<? extends T1> source1, @NonNull Publisher<? extends T2> source2, @NonNull Publisher<? extends T3> source3, @NonNull Publisher<? extends T4> source4, @NonNull Publisher<? extends T5> source5, @NonNull Publisher<? extends T6> source6, @NonNull Function6<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? extends R> combiner)
Publisher
s by emitting an item that aggregates the latest values of each of the
source Publisher
s each time an item is received from any of the source Publisher
s, where this
aggregation is defined by a specified function.
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 source Publisher
s
are requested in a bounded manner, however, their backpressure is not enforced (the operator won't signal
MissingBackpressureException
) and may lead to OutOfMemoryError
due to internal buffer bloat.combineLatest
does not operate by default on a particular Scheduler
.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 Publisher
source2
- the second source Publisher
source3
- the third source Publisher
source4
- the fourth source Publisher
source5
- the fifth source Publisher
source6
- the sixth source Publisher
combiner
- the aggregation function used to combine the items emitted by the source Publisher
sFlowable
instanceNullPointerException
- if source1
, source2
, source3
,
source4
, source5
, source6
or combiner
is null
@CheckReturnValue @NonNull @BackpressureSupport(value=FULL) @SchedulerSupport(value="none") public static <T1,T2,T3,T4,T5,T6,T7,R> @NonNull Flowable<R> combineLatest(@NonNull Publisher<? extends T1> source1, @NonNull Publisher<? extends T2> source2, @NonNull Publisher<? extends T3> source3, @NonNull Publisher<? extends T4> source4, @NonNull Publisher<? extends T5> source5, @NonNull Publisher<? extends T6> source6, @NonNull Publisher<? extends T7> source7, @NonNull Function7<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? extends R> combiner)
Publisher
s by emitting an item that aggregates the latest values of each of the
source Publisher
s each time an item is received from any of the source Publisher
s, where this
aggregation is defined by a specified function.
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 source Publisher
s
are requested in a bounded manner, however, their backpressure is not enforced (the operator won't signal
MissingBackpressureException
) and may lead to OutOfMemoryError
due to internal buffer bloat.combineLatest
does not operate by default on a particular Scheduler
.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 Publisher
source2
- the second source Publisher
source3
- the third source Publisher
source4
- the fourth source Publisher
source5
- the fifth source Publisher
source6
- the sixth source Publisher
source7
- the seventh source Publisher
combiner
- the aggregation function used to combine the items emitted by the source Publisher
sFlowable
instanceNullPointerException
- if source1
, source2
, source3
,
source4
, source5
, source6
,
source7
or combiner
is null
@CheckReturnValue @NonNull @BackpressureSupport(value=FULL) @SchedulerSupport(value="none") public static <T1,T2,T3,T4,T5,T6,T7,T8,R> @NonNull Flowable<R> combineLatest(@NonNull Publisher<? extends T1> source1, @NonNull Publisher<? extends T2> source2, @NonNull Publisher<? extends T3> source3, @NonNull Publisher<? extends T4> source4, @NonNull Publisher<? extends T5> source5, @NonNull Publisher<? extends T6> source6, @NonNull Publisher<? extends T7> source7, @NonNull Publisher<? extends T8> source8, @NonNull Function8<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? super T8,? extends R> combiner)
Publisher
s by emitting an item that aggregates the latest values of each of the
source Publisher
s each time an item is received from any of the source Publisher
s, where this
aggregation is defined by a specified function.
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 source Publisher
s
are requested in a bounded manner, however, their backpressure is not enforced (the operator won't signal
MissingBackpressureException
) and may lead to OutOfMemoryError
due to internal buffer bloat.combineLatest
does not operate by default on a particular Scheduler
.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 Publisher
source2
- the second source Publisher
source3
- the third source Publisher
source4
- the fourth source Publisher
source5
- the fifth source Publisher
source6
- the sixth source Publisher
source7
- the seventh source Publisher
source8
- the eighth source Publisher
combiner
- the aggregation function used to combine the items emitted by the source Publisher
sFlowable
instanceNullPointerException
- if source1
, source2
, source3
,
source4
, source5
, source6
,
source7
, source8
or combiner
is null
@CheckReturnValue @NonNull @BackpressureSupport(value=FULL) @SchedulerSupport(value="none") public static <T1,T2,T3,T4,T5,T6,T7,T8,T9,R> @NonNull Flowable<R> combineLatest(@NonNull Publisher<? extends T1> source1, @NonNull Publisher<? extends T2> source2, @NonNull Publisher<? extends T3> source3, @NonNull Publisher<? extends T4> source4, @NonNull Publisher<? extends T5> source5, @NonNull Publisher<? extends T6> source6, @NonNull Publisher<? extends T7> source7, @NonNull Publisher<? extends T8> source8, @NonNull Publisher<? extends T9> source9, @NonNull Function9<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? super T8,? super T9,? extends R> combiner)
Publisher
s by emitting an item that aggregates the latest values of each of the
source Publisher
s each time an item is received from any of the source Publisher
s, where this
aggregation is defined by a specified function.
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 source Publisher
s
are requested in a bounded manner, however, their backpressure is not enforced (the operator won't signal
MissingBackpressureException
) and may lead to OutOfMemoryError
due to internal buffer bloat.combineLatest
does not operate by default on a particular Scheduler
.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 Publisher
source2
- the second source Publisher
source3
- the third source Publisher
source4
- the fourth source Publisher
source5
- the fifth source Publisher
source6
- the sixth source Publisher
source7
- the seventh source Publisher
source8
- the eighth source Publisher
source9
- the ninth source Publisher
combiner
- the aggregation function used to combine the items emitted by the source Publisher
sFlowable
instanceNullPointerException
- if source1
, source2
, source3
,
source4
, source5
, source6
,
source7
, source8
, source9
or combiner
is null
@CheckReturnValue @NonNull @BackpressureSupport(value=FULL) @SchedulerSupport(value="none") public static <T> @NonNull Flowable<T> concat(@NonNull Iterable<? extends Publisher<? extends T>> sources)
Publisher
provided via an Iterable
sequence into a single sequence
of elements without interleaving them.
Publisher
sources are expected to honor backpressure as well.
If any of the source Publisher
s violate this, it may throw an
IllegalStateException
when that Publisher
completes.concat
does not operate by default on a particular Scheduler
.T
- the common value type of the sourcessources
- the Iterable
sequence of Publisher
sFlowable
instanceNullPointerException
- if sources
is null
@CheckReturnValue @BackpressureSupport(value=FULL) @SchedulerSupport(value="none") @NonNull public static <T> @NonNull Flowable<T> concat(@NonNull Publisher<? extends Publisher<? extends T>> sources)
Flowable
that emits the items emitted by each of the Publisher
s emitted by the source
Publisher
, one after the other, without interleaving them.
Publisher
sources are expected to honor backpressure as well. If the outer violates this, a
MissingBackpressureException
is signaled. If any of the inner Publisher
s violates
this, it may throw an IllegalStateException
when an inner Publisher
completes.concat
does not operate by default on a particular Scheduler
.T
- the common element base typesources
- a Publisher
that emits Publisher
sFlowable
instanceNullPointerException
- if sources
is null
@CheckReturnValue @BackpressureSupport(value=FULL) @SchedulerSupport(value="none") @NonNull public static <T> @NonNull Flowable<T> concat(@NonNull Publisher<? extends Publisher<? extends T>> sources, int prefetch)
Flowable
that emits the items emitted by each of the Publisher
s emitted by the source
Publisher
, one after the other, without interleaving them.
Publisher
sources are expected to honor backpressure as well. If the outer violates this, a
MissingBackpressureException
is signaled. If any of the inner Publisher
s violates
this, it may throw an IllegalStateException
when an inner Publisher
completes.concat
does not operate by default on a particular Scheduler
.T
- the common element base typesources
- a Publisher
that emits Publisher
sprefetch
- the number of Publisher
s to prefetch from the sources sequence.Flowable
instanceNullPointerException
- if sources
is null
IllegalArgumentException
- if prefetch
is non-positive@CheckReturnValue @NonNull @BackpressureSupport(value=FULL) @SchedulerSupport(value="none") public static <T> @NonNull Flowable<T> concat(@NonNull Publisher<? extends T> source1, @NonNull Publisher<? extends T> source2)
Flowable
that emits the items emitted by two Publisher
s, one after the other, without
interleaving them.
Publisher
sources are expected to honor backpressure as well.
If any of the source Publisher
s violate this, it may throw an
IllegalStateException
when that source Publisher
completes.concat
does not operate by default on a particular Scheduler
.T
- the common element base typesource1
- a Publisher
to be concatenatedsource2
- a Publisher
to be concatenatedFlowable
instanceNullPointerException
- if source1
or source2
is null
@CheckReturnValue @NonNull @BackpressureSupport(value=FULL) @SchedulerSupport(value="none") public static <T> @NonNull Flowable<T> concat(@NonNull Publisher<? extends T> source1, @NonNull Publisher<? extends T> source2, @NonNull Publisher<? extends T> source3)
Flowable
that emits the items emitted by three Publisher
s, one after the other, without
interleaving them.
Publisher
sources are expected to honor backpressure as well.
If any of the source Publisher
s violate this, it may throw an
IllegalStateException
when that source Publisher
completes.concat
does not operate by default on a particular Scheduler
.T
- the common element base typesource1
- a Publisher
to be concatenatedsource2
- a Publisher
to be concatenatedsource3
- a Publisher
to be concatenatedFlowable
instanceNullPointerException
- if source1
, source2
or source3
is null
@CheckReturnValue @NonNull @BackpressureSupport(value=FULL) @SchedulerSupport(value="none") public static <T> @NonNull Flowable<T> concat(@NonNull Publisher<? extends T> source1, @NonNull Publisher<? extends T> source2, @NonNull Publisher<? extends T> source3, @NonNull Publisher<? extends T> source4)
Flowable
that emits the items emitted by four Publisher
s, one after the other, without
interleaving them.
Publisher
sources are expected to honor backpressure as well.
If any of the source Publisher
s violate this, it may throw an
IllegalStateException
when that source Publisher
completes.concat
does not operate by default on a particular Scheduler
.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 concatenatedFlowable
instanceNullPointerException
- if source1
, source2
, source3
or source4
is null
@CheckReturnValue @BackpressureSupport(value=FULL) @SchedulerSupport(value="none") @SafeVarargs @NonNull public static <T> @NonNull Flowable<T> concatArray(@NonNull Publisher<? extends T>... sources)
Publisher
sources.
Note: named this way because of overload conflict with concat(Publisher<Publisher<T>>
).
Publisher
sources are expected to honor backpressure as well.
If any of the source Publisher
s violate this, it may throw an
IllegalStateException
when that source Publisher
completes.concatArray
does not operate by default on a particular Scheduler
.T
- the common base value typesources
- the array of source Publisher
sFlowable
instanceNullPointerException
- if sources
is null
@CheckReturnValue @BackpressureSupport(value=FULL) @SchedulerSupport(value="none") @SafeVarargs @NonNull public static <T> @NonNull Flowable<T> concatArrayDelayError(@NonNull Publisher<? extends T>... sources)
Publisher
sources and delays errors from any of them
till all terminate.
Publisher
sources are expected to honor backpressure as well.
If any of the source Publisher
s violate this, it may throw an
IllegalStateException
when that source Publisher
completes.concatArrayDelayError
does not operate by default on a particular Scheduler
.T
- the common base value typesources
- the array of source Publisher
sFlowable
instanceNullPointerException
- if sources
is null
@CheckReturnValue @BackpressureSupport(value=FULL) @SchedulerSupport(value="none") @SafeVarargs @NonNull public static <T> @NonNull Flowable<T> concatArrayEager(@NonNull Publisher<? extends T>... sources)
Publisher
s eagerly into a single stream of values.
Eager concatenation means that once a subscriber subscribes, this operator subscribes to all of the
source Publisher
s. The operator buffers the values emitted by these Publisher
s 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 source Publisher
s violate this, the operator will signal a
MissingBackpressureException
.Scheduler
.T
- the value typesources
- an array of Publisher
s that need to be eagerly concatenatedFlowable
instance with the specified concatenation behaviorNullPointerException
- if sources
is null
@CheckReturnValue @NonNull @BackpressureSupport(value=FULL) @SchedulerSupport(value="none") @SafeVarargs public static <T> @NonNull Flowable<T> concatArrayEager(int maxConcurrency, int prefetch, @NonNull Publisher<? extends T>... sources)
Publisher
s eagerly into a single stream of values.
Eager concatenation means that once a subscriber subscribes, this operator subscribes to all of the
source Publisher
s. The operator buffers the values emitted by these Publisher
s 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 source Publisher
s violate this, the operator will signal a
MissingBackpressureException
.Scheduler
.T
- the value typesources
- an array of Publisher
s 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
sourceFlowable
instance with the specified concatenation behaviorNullPointerException
- if sources
is null
IllegalArgumentException
- if maxConcurrency
or prefetch
is non-positive@CheckReturnValue @SchedulerSupport(value="none") @BackpressureSupport(value=FULL) @SafeVarargs @NonNull public static <T> @NonNull Flowable<T> concatArrayEagerDelayError(@NonNull Publisher<? extends T>... sources)
Publisher
s 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
source Publisher
s. The operator buffers the values emitted by these Publisher
s
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 source Publisher
s violate this, the operator will signal a
MissingBackpressureException
.Scheduler
.T
- the value typesources
- an array of Publisher
s that need to be eagerly concatenatedFlowable
instance with the specified concatenation behaviorNullPointerException
- if sources
is null
@CheckReturnValue @SchedulerSupport(value="none") @BackpressureSupport(value=FULL) @SafeVarargs @NonNull public static <T> @NonNull Flowable<T> concatArrayEagerDelayError(int maxConcurrency, int prefetch, @NonNull Publisher<? extends T>... sources)
Publisher
s 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
source Publisher
s. The operator buffers the values emitted by these Publisher
s
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 source Publisher
s violate this, the operator will signal a
MissingBackpressureException
.Scheduler
.T
- the value typesources
- an array of Publisher
s 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 each Publisher
sourceFlowable
instance with the specified concatenation behaviorNullPointerException
- if sources
is null
IllegalArgumentException
- if maxConcurrency
or prefetch
is non-positive@CheckReturnValue @NonNull @BackpressureSupport(value=FULL) @SchedulerSupport(value="none") public static <T> @NonNull Flowable<T> concatDelayError(@NonNull Iterable<? extends Publisher<? extends T>> sources)
Iterable
sequence of Publisher
s 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 Publisher
s terminate.
Publisher
sources are expected to honor backpressure as well. If the outer violates this, a
MissingBackpressureException
is signaled. If any of the inner Publisher
s violates
this, it may throw an IllegalStateException
when an inner Publisher
completes.concatDelayError
does not operate by default on a particular Scheduler
.T
- the common element base typesources
- the Iterable
sequence of Publisher
sFlowable
with the concatenating behaviorNullPointerException
- if sources
is null
@CheckReturnValue @BackpressureSupport(value=FULL) @SchedulerSupport(value="none") @NonNull public static <T> @NonNull Flowable<T> concatDelayError(@NonNull Publisher<? extends Publisher<? extends T>> sources)
Publisher
sequence of Publisher
s 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 Publisher
s terminate.
concatDelayError
fully supports backpressure.concatDelayError
does not operate by default on a particular Scheduler
.T
- the common element base typesources
- the Publisher
sequence of Publisher
sFlowable
with the concatenating behaviorNullPointerException
- if sources
is null
@CheckReturnValue @BackpressureSupport(value=FULL) @SchedulerSupport(value="none") @NonNull public static <T> @NonNull Flowable<T> concatDelayError(@NonNull Publisher<? extends Publisher<? extends T>> sources, int prefetch, boolean tillTheEnd)
Publisher
sequence of Publisher
s 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 Publisher
s terminate.
concatDelayError
fully supports backpressure.concatDelayError
does not operate by default on a particular Scheduler
.T
- the common element base typesources
- the Publisher
sequence of Publisher
sprefetch
- the number of elements to prefetch from the outer Publisher
tillTheEnd
- if true
, exceptions from the outer and all inner Publisher
s are delayed to the end
if false
, exception from the outer Publisher
is delayed till the current inner Publisher
terminatesFlowable
with the concatenating behaviorNullPointerException
- if sources
is null
IllegalArgumentException
- if prefetch
is null
@CheckReturnValue @BackpressureSupport(value=FULL) @SchedulerSupport(value="none") @NonNull public static <T> @NonNull Flowable<T> concatEager(@NonNull Iterable<? extends Publisher<? extends T>> sources)
Publisher
s eagerly into a single stream of values.
Eager concatenation means that once a subscriber subscribes, this operator subscribes to all of the
source Publisher
s. The operator buffers the values emitted by these Publisher
s and then drains them
in order, each one after the previous one completes.
Publisher
s are
expected to support backpressure. Violating this assumption, the operator will
signal MissingBackpressureException
.Scheduler
.T
- the value typesources
- a sequence of Publisher
s that need to be eagerly concatenatedFlowable
instance with the specified concatenation behaviorNullPointerException
- if sources
is null
@CheckReturnValue @NonNull @BackpressureSupport(value=FULL) @SchedulerSupport(value="none") public static <T> @NonNull Flowable<T> concatEager(@NonNull Iterable<? extends Publisher<? extends T>> sources, int maxConcurrency, int prefetch)
Publisher
s eagerly into a single stream of values and
runs a limited number of inner sequences at once.
Eager concatenation means that once a subscriber subscribes, this operator subscribes to all of the
source Publisher
s. The operator buffers the values emitted by these Publisher
s and then drains them
in order, each one after the previous one completes.
Publisher
s are
expected to support backpressure. Violating this assumption, the operator will
signal MissingBackpressureException
.Scheduler
.T
- the value typesources
- a sequence of Publisher
s that need to be eagerly concatenatedmaxConcurrency
- the maximum number of concurrently running inner Publisher
s; Integer.MAX_VALUE
is interpreted as all inner Publisher
s can be active at the same timeprefetch
- the number of elements to prefetch from each inner Publisher
sourceFlowable
instance with the specified concatenation behaviorNullPointerException
- if sources
is null
IllegalArgumentException
- if maxConcurrency
or prefetch
is non-positive@CheckReturnValue @BackpressureSupport(value=