Class ParallelRunOn<T>
java.lang.Object
io.reactivex.rxjava3.parallel.ParallelFlowable<T>
io.reactivex.rxjava3.internal.operators.parallel.ParallelRunOn<T>
- Type Parameters:
T
- the value type
Ensures each 'rail' from upstream runs on a Worker from a Scheduler.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class
(package private) final class
(package private) static final class
(package private) static final class
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionParallelRunOn
(ParallelFlowable<? extends T> parent, Scheduler scheduler, int prefetch) -
Method Summary
Modifier and TypeMethodDescription(package private) void
createSubscriber
(int i, org.reactivestreams.Subscriber<? super T>[] subscribers, org.reactivestreams.Subscriber<T>[] parents, Scheduler.Worker worker) int
Returns the number of expected parallelSubscriber
s.void
Subscribes an array ofSubscriber
s to thisParallelFlowable
and triggers the execution chain for all 'rails'.Methods inherited from class io.reactivex.rxjava3.parallel.ParallelFlowable
collect, collect, compose, concatMap, concatMap, concatMapDelayError, concatMapDelayError, doAfterNext, doAfterTerminated, doOnCancel, doOnComplete, doOnError, doOnNext, doOnNext, doOnNext, doOnRequest, doOnSubscribe, filter, filter, filter, flatMap, flatMap, flatMap, flatMap, flatMapIterable, flatMapIterable, flatMapStream, flatMapStream, from, from, from, fromArray, map, map, map, mapOptional, mapOptional, mapOptional, reduce, reduce, runOn, runOn, sequential, sequential, sequentialDelayError, sequentialDelayError, sorted, sorted, to, toSortedList, toSortedList, validate
-
Field Details
-
source
-
scheduler
-
prefetch
final int prefetch
-
-
Constructor Details
-
ParallelRunOn
-
-
Method Details
-
subscribe
Description copied from class:ParallelFlowable
Subscribes an array ofSubscriber
s to thisParallelFlowable
and triggers the execution chain for all 'rails'.- Backpressure:
- The backpressure behavior/expectation is determined by the supplied
Subscriber
. - Scheduler:
subscribe
does not operate by default on a particularScheduler
.
- Specified by:
subscribe
in classParallelFlowable<T>
- Parameters:
subscribers
- the subscribers array to run in parallel, the number of items must be equal to the parallelism level of thisParallelFlowable
- See Also:
-
createSubscriber
void createSubscriber(int i, org.reactivestreams.Subscriber<? super T>[] subscribers, org.reactivestreams.Subscriber<T>[] parents, Scheduler.Worker worker) -
parallelism
public int parallelism()Description copied from class:ParallelFlowable
Returns the number of expected parallelSubscriber
s.- Specified by:
parallelism
in classParallelFlowable<T>
- Returns:
- the number of expected parallel
Subscriber
s
-