Package | Description |
---|---|
io.reactivex |
Base reactive classes:
Flowable , Observable ,
Single , Maybe and
Completable ; base reactive consumers;
other common base interfaces. |
io.reactivex.internal.operators.parallel | |
io.reactivex.parallel |
Contains the base type
ParallelFlowable ,
a sub-DSL for working with Flowable sequences in parallel. |
io.reactivex.plugins |
Contains the central plugin handler
RxJavaPlugins
class to hook into the lifecycle of the base reactive types and schedulers. |
Modifier and Type | Method and Description |
---|---|
ParallelFlowable<T> |
Flowable.parallel()
Parallelizes the flow by creating multiple 'rails' (equal to the number of CPUs)
and dispatches the upstream items to them in a round-robin fashion.
|
ParallelFlowable<T> |
Flowable.parallel(int parallelism)
Parallelizes the flow by creating the specified number of 'rails'
and dispatches the upstream items to them in a round-robin fashion.
|
ParallelFlowable<T> |
Flowable.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.
|
Modifier and Type | Class and Description |
---|---|
class |
ParallelCollect<T,C>
Reduce the sequence of values in each 'rail' to a single value.
|
class |
ParallelConcatMap<T,R>
Concatenates the generated Publishers on each rail.
|
class |
ParallelDoOnNextTry<T>
Calls a Consumer for each upstream value passing by
and handles any failure with a handler function.
|
class |
ParallelFilter<T>
Filters each 'rail' of the source ParallelFlowable with a predicate function.
|
class |
ParallelFilterTry<T>
Filters each 'rail' of the source ParallelFlowable with a predicate function.
|
class |
ParallelFlatMap<T,R>
Flattens the generated Publishers on each rail.
|
class |
ParallelFromArray<T>
Wraps multiple Publishers into a ParallelFlowable which runs them
in parallel.
|
class |
ParallelFromPublisher<T>
Dispatches the values from upstream in a round robin fashion to subscribers which are
ready to consume elements.
|
class |
ParallelMap<T,R>
Maps each 'rail' of the source ParallelFlowable with a mapper function.
|
class |
ParallelMapTry<T,R>
Maps each 'rail' of the source ParallelFlowable with a mapper function
and handle any failure based on a handler function.
|
class |
ParallelPeek<T>
Execute a Consumer in each 'rail' for the current element passing through.
|
class |
ParallelReduce<T,R>
Reduce the sequence of values in each 'rail' to a single value.
|
class |
ParallelRunOn<T>
Ensures each 'rail' from upstream runs on a Worker from a Scheduler.
|
Constructor and Description |
---|
ParallelCollect(ParallelFlowable<? extends T> source,
Callable<? extends C> initialCollection,
BiConsumer<? super C,? super T> collector) |
ParallelConcatMap(ParallelFlowable<T> source,
Function<? super T,? extends org.reactivestreams.Publisher<? extends R>> mapper,
int prefetch,
ErrorMode errorMode) |
ParallelDoOnNextTry(ParallelFlowable<T> source,
Consumer<? super T> onNext,
BiFunction<? super Long,? super Throwable,ParallelFailureHandling> errorHandler) |
ParallelFilter(ParallelFlowable<T> source,
Predicate<? super T> predicate) |
ParallelFilterTry(ParallelFlowable<T> source,
Predicate<? super T> predicate,
BiFunction<? super Long,? super Throwable,ParallelFailureHandling> errorHandler) |
ParallelFlatMap(ParallelFlowable<T> source,
Function<? super T,? extends org.reactivestreams.Publisher<? extends R>> mapper,
boolean delayError,
int maxConcurrency,
int prefetch) |
ParallelJoin(ParallelFlowable<? extends T> source,
int prefetch,
boolean delayErrors) |
ParallelMap(ParallelFlowable<T> source,
Function<? super T,? extends R> mapper) |
ParallelMapTry(ParallelFlowable<T> source,
Function<? super T,? extends R> mapper,
BiFunction<? super Long,? super Throwable,ParallelFailureHandling> errorHandler) |
ParallelPeek(ParallelFlowable<T> source,
Consumer<? super T> onNext,
Consumer<? super T> onAfterNext,
Consumer<? super Throwable> onError,
Action onComplete,
Action onAfterTerminated,
Consumer<? super org.reactivestreams.Subscription> onSubscribe,
LongConsumer onRequest,
Action onCancel) |
ParallelReduce(ParallelFlowable<? extends T> source,
Callable<R> initialSupplier,
BiFunction<R,? super T,R> reducer) |
ParallelReduceFull(ParallelFlowable<? extends T> source,
BiFunction<T,T,T> reducer) |
ParallelRunOn(ParallelFlowable<? extends T> parent,
Scheduler scheduler,
int prefetch) |
ParallelSortedJoin(ParallelFlowable<List<T>> source,
Comparator<? super T> comparator) |
Modifier and Type | Method and Description |
---|---|
ParallelFlowable<Downstream> |
ParallelTransformer.apply(ParallelFlowable<Upstream> upstream)
Applies a function to the upstream ParallelFlowable and returns a ParallelFlowable with
optionally different element type.
|
<C> ParallelFlowable<C> |
ParallelFlowable.collect(Callable<? extends C> collectionSupplier,
BiConsumer<? super C,? super T> collector)
Collect the elements in each rail into a collection supplied via a collectionSupplier
and collected into with a collector action, emitting the collection at the end.
|
<U> ParallelFlowable<U> |
ParallelFlowable.compose(ParallelTransformer<T,U> composer)
Allows composing operators, in assembly time, on top of this ParallelFlowable
and returns another ParallelFlowable with composed features.
|
<R> ParallelFlowable<R> |
ParallelFlowable.concatMap(Function<? super T,? extends org.reactivestreams.Publisher<? extends R>> mapper)
Generates and concatenates Publishers on each 'rail', signalling errors immediately
and generating 2 publishers upfront.
|
<R> ParallelFlowable<R> |
ParallelFlowable.concatMap(Function<? super T,? extends org.reactivestreams.Publisher<? extends R>> mapper,
int prefetch)
Generates and concatenates Publishers on each 'rail', signalling errors immediately
and using the given prefetch amount for generating Publishers upfront.
|
<R> ParallelFlowable<R> |
ParallelFlowable.concatMapDelayError(Function<? super T,? extends org.reactivestreams.Publisher<? extends R>> mapper,
boolean tillTheEnd)
Generates and concatenates Publishers on each 'rail', optionally delaying errors
and generating 2 publishers upfront.
|
<R> ParallelFlowable<R> |
ParallelFlowable.concatMapDelayError(Function<? super T,? extends org.reactivestreams.Publisher<? extends R>> mapper,
int prefetch,
boolean tillTheEnd)
Generates and concatenates Publishers on each 'rail', optionally delaying errors
and using the given prefetch amount for generating Publishers upfront.
|
ParallelFlowable<T> |
ParallelFlowable.doAfterNext(Consumer<? super T> onAfterNext)
Call the specified consumer with the current element passing through any 'rail'
after it has been delivered to downstream within the rail.
|
ParallelFlowable<T> |
ParallelFlowable.doAfterTerminated(Action onAfterTerminate)
Run the specified Action when a 'rail' completes or signals an error.
|
ParallelFlowable<T> |
ParallelFlowable.doOnCancel(Action onCancel)
Run the specified Action when a 'rail' receives a cancellation.
|
ParallelFlowable<T> |
ParallelFlowable.doOnComplete(Action onComplete)
Run the specified Action when a 'rail' completes.
|
ParallelFlowable<T> |
ParallelFlowable.doOnError(Consumer<Throwable> onError)
Call the specified consumer with the exception passing through any 'rail'.
|
ParallelFlowable<T> |
ParallelFlowable.doOnNext(Consumer<? super T> onNext)
Call the specified consumer with the current element passing through any 'rail'.
|
ParallelFlowable<T> |
ParallelFlowable.doOnNext(Consumer<? super T> onNext,
BiFunction<? super Long,? super Throwable,ParallelFailureHandling> errorHandler)
Call the specified consumer with the current element passing through any 'rail' and
handles errors based on the returned value by the handler function.
|
ParallelFlowable<T> |
ParallelFlowable.doOnNext(Consumer<? super T> onNext,
ParallelFailureHandling errorHandler)
Call the specified consumer with the current element passing through any 'rail' and
handles errors based on the given
ParallelFailureHandling enumeration value. |
ParallelFlowable<T> |
ParallelFlowable.doOnRequest(LongConsumer onRequest)
Call the specified consumer with the request amount if any rail receives a request.
|
ParallelFlowable<T> |
ParallelFlowable.doOnSubscribe(Consumer<? super org.reactivestreams.Subscription> onSubscribe)
Call the specified callback when a 'rail' receives a Subscription from its upstream.
|
ParallelFlowable<T> |
ParallelFlowable.filter(Predicate<? super T> predicate)
Filters the source values on each 'rail'.
|
ParallelFlowable<T> |
ParallelFlowable.filter(Predicate<? super T> predicate,
BiFunction<? super Long,? super Throwable,ParallelFailureHandling> errorHandler)
Filters the source values on each 'rail' and
handles errors based on the returned value by the handler function.
|
ParallelFlowable<T> |
ParallelFlowable.filter(Predicate<? super T> predicate,
ParallelFailureHandling errorHandler)
Filters the source values on each 'rail' and
handles errors based on the given
ParallelFailureHandling enumeration value. |
<R> ParallelFlowable<R> |
ParallelFlowable.flatMap(Function<? super T,? extends org.reactivestreams.Publisher<? extends R>> mapper)
Generates and flattens Publishers on each 'rail'.
|
<R> ParallelFlowable<R> |
ParallelFlowable.flatMap(Function<? super T,? extends org.reactivestreams.Publisher<? extends R>> mapper,
boolean delayError)
Generates and flattens Publishers on each 'rail', optionally delaying errors.
|
<R> ParallelFlowable<R> |
ParallelFlowable.flatMap(Function<? super T,? extends org.reactivestreams.Publisher<? extends R>> mapper,
boolean delayError,
int maxConcurrency)
Generates and flattens Publishers on each 'rail', optionally delaying errors
and having a total number of simultaneous subscriptions to the inner Publishers.
|
<R> ParallelFlowable<R> |
ParallelFlowable.flatMap(Function<? super T,? extends org.reactivestreams.Publisher<? extends R>> mapper,
boolean delayError,
int maxConcurrency,
int prefetch)
Generates and flattens Publishers on each 'rail', optionally delaying errors,
having a total number of simultaneous subscriptions to the inner Publishers
and using the given prefetch amount for the inner Publishers.
|
static <T> ParallelFlowable<T> |
ParallelFlowable.from(org.reactivestreams.Publisher<? extends T> source)
Take a Publisher and prepare to consume it on multiple 'rails' (number of CPUs)
in a round-robin fashion.
|
static <T> ParallelFlowable<T> |
ParallelFlowable.from(org.reactivestreams.Publisher<? extends T> source,
int parallelism)
Take a Publisher and prepare to consume it on parallelism number of 'rails' in a round-robin fashion.
|
static <T> ParallelFlowable<T> |
ParallelFlowable.from(org.reactivestreams.Publisher<? extends T> source,
int parallelism,
int prefetch)
Take a Publisher and prepare to consume it on parallelism number of 'rails' ,
possibly ordered and round-robin fashion and use custom prefetch amount and queue
for dealing with the source Publisher's values.
|
static <T> ParallelFlowable<T> |
ParallelFlowable.fromArray(org.reactivestreams.Publisher<T>... publishers)
Wraps multiple Publishers into a ParallelFlowable which runs them
in parallel and unordered.
|
<R> ParallelFlowable<R> |
ParallelFlowable.map(Function<? super T,? extends R> mapper)
Maps the source values on each 'rail' to another value.
|
<R> ParallelFlowable<R> |
ParallelFlowable.map(Function<? super T,? extends R> mapper,
BiFunction<? super Long,? super Throwable,ParallelFailureHandling> errorHandler)
Maps the source values on each 'rail' to another value and
handles errors based on the returned value by the handler function.
|
<R> ParallelFlowable<R> |
ParallelFlowable.map(Function<? super T,? extends R> mapper,
ParallelFailureHandling errorHandler)
Maps the source values on each 'rail' to another value and
handles errors based on the given
ParallelFailureHandling enumeration value. |
<R> ParallelFlowable<R> |
ParallelFlowable.reduce(Callable<R> initialSupplier,
BiFunction<R,? super T,R> reducer)
Reduces all values within a 'rail' to a single value (with a possibly different type) via
a reducer function that is initialized on each rail from an initialSupplier value.
|
ParallelFlowable<T> |
ParallelFlowable.runOn(Scheduler scheduler)
Specifies where each 'rail' will observe its incoming values with
no work-stealing and default prefetch amount.
|
ParallelFlowable<T> |
ParallelFlowable.runOn(Scheduler scheduler,
int prefetch)
Specifies where each 'rail' will observe its incoming values with
possibly work-stealing and a given prefetch amount.
|
Modifier and Type | Method and Description |
---|---|
R |
ParallelFlowableConverter.apply(ParallelFlowable<T> upstream)
Applies a function to the upstream ParallelFlowable and returns a converted value of type
R . |
ParallelFlowable<Downstream> |
ParallelTransformer.apply(ParallelFlowable<Upstream> upstream)
Applies a function to the upstream ParallelFlowable and returns a ParallelFlowable with
optionally different element type.
|
Modifier and Type | Method and Description |
---|---|
<U> U |
ParallelFlowable.to(Function<? super ParallelFlowable<T>,U> converter)
Perform a fluent transformation to a value via a converter function which
receives this ParallelFlowable.
|
Modifier and Type | Method and Description |
---|---|
static <T> ParallelFlowable<T> |
RxJavaPlugins.onAssembly(ParallelFlowable<T> source)
Calls the associated hook function.
|
Modifier and Type | Method and Description |
---|---|
static Function<? super ParallelFlowable,? extends ParallelFlowable> |
RxJavaPlugins.getOnParallelAssembly()
Returns the current hook function.
|
static Function<? super ParallelFlowable,? extends ParallelFlowable> |
RxJavaPlugins.getOnParallelAssembly()
Returns the current hook function.
|
Modifier and Type | Method and Description |
---|---|
static <T> ParallelFlowable<T> |
RxJavaPlugins.onAssembly(ParallelFlowable<T> source)
Calls the associated hook function.
|
Modifier and Type | Method and Description |
---|---|
static void |
RxJavaPlugins.setOnParallelAssembly(Function<? super ParallelFlowable,? extends ParallelFlowable> handler)
Sets the specific hook function.
|
static void |
RxJavaPlugins.setOnParallelAssembly(Function<? super ParallelFlowable,? extends ParallelFlowable> handler)
Sets the specific hook function.
|
Copyright © 2018 JBoss by Red Hat. All rights reserved.