Class ParallelFromPublisher<T>

java.lang.Object
io.reactivex.rxjava3.parallel.ParallelFlowable<T>
io.reactivex.rxjava3.internal.operators.parallel.ParallelFromPublisher<T>
Type Parameters:
T - the value type

public final class ParallelFromPublisher<T> extends ParallelFlowable<T>
Dispatches the values from upstream in a round robin fashion to subscribers which are ready to consume elements. A value from upstream is sent to only one of the subscribers.
  • Field Details

    • source

      final org.reactivestreams.Publisher<? extends T> source
    • parallelism

      final int parallelism
    • prefetch

      final int prefetch
  • Constructor Details

    • ParallelFromPublisher

      public ParallelFromPublisher(org.reactivestreams.Publisher<? extends T> source, int parallelism, int prefetch)
  • Method Details

    • parallelism

      public int parallelism()
      Description copied from class: ParallelFlowable
      Returns the number of expected parallel Subscribers.
      Specified by:
      parallelism in class ParallelFlowable<T>
      Returns:
      the number of expected parallel Subscribers
    • subscribe

      public void subscribe(org.reactivestreams.Subscriber<? super T>[] subscribers)
      Description copied from class: ParallelFlowable
      Subscribes an array of Subscribers to this ParallelFlowable 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 particular Scheduler.
      Specified by:
      subscribe in class ParallelFlowable<T>
      Parameters:
      subscribers - the subscribers array to run in parallel, the number of items must be equal to the parallelism level of this ParallelFlowable
      See Also: