Class ParallelCollect<T,C>
- java.lang.Object
-
- io.reactivex.rxjava3.parallel.ParallelFlowable<C>
-
- io.reactivex.rxjava3.internal.operators.parallel.ParallelCollect<T,C>
-
- Type Parameters:
T- the input value typeC- the collection type
public final class ParallelCollect<T,C> extends ParallelFlowable<C>
Reduce the sequence of values in each 'rail' to a single value.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classParallelCollect.ParallelCollectSubscriber<T,C>
-
Field Summary
Fields Modifier and Type Field Description (package private) BiConsumer<? super C,? super T>collector(package private) Supplier<? extends C>initialCollection(package private) ParallelFlowable<? extends T>source
-
Constructor Summary
Constructors Constructor Description ParallelCollect(ParallelFlowable<? extends T> source, Supplier<? extends C> initialCollection, BiConsumer<? super C,? super T> collector)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intparallelism()Returns the number of expected parallelSubscribers.(package private) voidreportError(org.reactivestreams.Subscriber<?>[] subscribers, java.lang.Throwable ex)voidsubscribe(org.reactivestreams.Subscriber<? super C>[] subscribers)Subscribes an array ofSubscribers to thisParallelFlowableand 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 Detail
-
source
final ParallelFlowable<? extends T> source
-
collector
final BiConsumer<? super C,? super T> collector
-
-
Constructor Detail
-
ParallelCollect
public ParallelCollect(ParallelFlowable<? extends T> source, Supplier<? extends C> initialCollection, BiConsumer<? super C,? super T> collector)
-
-
Method Detail
-
subscribe
public void subscribe(org.reactivestreams.Subscriber<? super C>[] subscribers)
Description copied from class:ParallelFlowableSubscribes an array ofSubscribers to thisParallelFlowableand triggers the execution chain for all 'rails'.- Backpressure:
- The backpressure behavior/expectation is determined by the supplied
Subscriber. - Scheduler:
subscribedoes not operate by default on a particularScheduler.
- Specified by:
subscribein classParallelFlowable<C>- Parameters:
subscribers- the subscribers array to run in parallel, the number of items must be equal to the parallelism level of thisParallelFlowable- See Also:
ParallelFlowable.parallelism()
-
reportError
void reportError(org.reactivestreams.Subscriber<?>[] subscribers, java.lang.Throwable ex)
-
parallelism
public int parallelism()
Description copied from class:ParallelFlowableReturns the number of expected parallelSubscribers.- Specified by:
parallelismin classParallelFlowable<C>- Returns:
- the number of expected parallel
Subscribers
-
-