Class ParallelPeek<T>
- java.lang.Object
-
- io.reactivex.rxjava3.parallel.ParallelFlowable<T>
-
- io.reactivex.rxjava3.internal.operators.parallel.ParallelPeek<T>
-
- Type Parameters:
T
- the value type
public final class ParallelPeek<T> extends ParallelFlowable<T>
Execute a Consumer in each 'rail' for the current element passing through.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
ParallelPeek.ParallelPeekSubscriber<T>
-
Field Summary
Fields Modifier and Type Field Description (package private) Consumer<? super T>
onAfterNext
(package private) Action
onAfterTerminated
(package private) Action
onCancel
(package private) Action
onComplete
(package private) Consumer<? super java.lang.Throwable>
onError
(package private) Consumer<? super T>
onNext
(package private) LongConsumer
onRequest
(package private) Consumer<? super org.reactivestreams.Subscription>
onSubscribe
(package private) ParallelFlowable<T>
source
-
Constructor Summary
Constructors Constructor Description ParallelPeek(ParallelFlowable<T> source, Consumer<? super T> onNext, Consumer<? super T> onAfterNext, Consumer<? super java.lang.Throwable> onError, Action onComplete, Action onAfterTerminated, Consumer<? super org.reactivestreams.Subscription> onSubscribe, LongConsumer onRequest, Action onCancel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
parallelism()
Returns the number of expected parallelSubscriber
s.void
subscribe(org.reactivestreams.Subscriber<? super T>[] subscribers)
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 Detail
-
source
final ParallelFlowable<T> source
-
onError
final Consumer<? super java.lang.Throwable> onError
-
onComplete
final Action onComplete
-
onAfterTerminated
final Action onAfterTerminated
-
onSubscribe
final Consumer<? super org.reactivestreams.Subscription> onSubscribe
-
onRequest
final LongConsumer onRequest
-
onCancel
final Action onCancel
-
-
Constructor Detail
-
ParallelPeek
public ParallelPeek(ParallelFlowable<T> source, Consumer<? super T> onNext, Consumer<? super T> onAfterNext, Consumer<? super java.lang.Throwable> onError, Action onComplete, Action onAfterTerminated, Consumer<? super org.reactivestreams.Subscription> onSubscribe, LongConsumer onRequest, Action onCancel)
-
-
Method Detail
-
subscribe
public void subscribe(org.reactivestreams.Subscriber<? super T>[] subscribers)
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:
ParallelFlowable.parallelism()
-
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
-
-