Use from() to start processing a regular Publisher in 'rails'.
Use runOn() to introduce where each 'rail' should run on thread-vise.
Use sequential() to merge the sources back into a single Flowable.
History: 2.0.5 - experimental; 2.1 - beta
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public final < the resulting object type R> R | Returns: the converted valuethe function that receives the current ParallelFlowable instance and returns a value converter)Calls the specified converter function during assembly time and returns its resulting value. |
| public final < the collection type C> ParallelFlowable | Returns: the new ParallelFlowable instancethe supplier of the collection in each rail collectionSupplier, BiConsumer<? super C, ? super T> the collector, taking the per-rail collection and the current item 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. |
| public final < the output value type U> ParallelFlowable | Returns: the ParallelFlowable returned by the functionthe composer function from ParallelFlowable (this) to another ParallelFlowable composer)Allows composing operators, in assembly time, on top of this ParallelFlowable and returns another ParallelFlowable with composed features. |
| public final < the result type R> ParallelFlowable | Returns: the new ParallelFlowable instancethe function to map each rail's value into a Publisher
source and the inner Publishers (immediate, boundary, end) mapper)Generates and concatenates Publishers on each 'rail', signalling errors immediately and generating 2 publishers upfront. |
| public final < the result type R> ParallelFlowable | Returns: the new ParallelFlowable instancethe function to map each rail's value into a Publisher mapper, int the number of items to prefetch from each inner Publisher
source and the inner Publishers (immediate, boundary, end) prefetch)Generates and concatenates Publishers on each 'rail', signalling errors immediately and using the given prefetch amount for generating Publishers upfront. |
| public final < the result type R> ParallelFlowable | Returns: the new ParallelFlowable instancethe function to map each rail's value into a Publisher mapper, boolean if true all errors from the upstream and inner Publishers are delayed
till all of them terminate, if false, the error is emitted when an inner Publisher terminates.
source and the inner Publishers (immediate, boundary, end) tillTheEnd)Generates and concatenates Publishers on each 'rail', optionally delaying errors and generating 2 publishers upfront. |
| public final < the result type R> ParallelFlowable | Returns: the new ParallelFlowable instancethe function to map each rail's value into a Publisher mapper, int the number of items to prefetch from each inner Publisher prefetch, boolean if true all errors from the upstream and inner Publishers are delayed
till all of them terminate, if false, the error is emitted when an inner Publisher terminates. tillTheEnd)Generates and concatenates Publishers on each 'rail', optionally delaying errors and using the given prefetch amount for generating Publishers upfront. |
| public final ParallelFlowable | Returns: the new ParallelFlowable instancethe callback onAfterNext)Call the specified consumer with the current element passing through any 'rail' after it has been delivered to downstream within the rail. |
| public final ParallelFlowable | Returns: the new ParallelFlowable instancethe callback onAfterTerminate)Run the specified Action when a 'rail' completes or signals an error. |
| public final ParallelFlowable | Returns: the new ParallelFlowable instancethe callback onCancel)Run the specified Action when a 'rail' receives a cancellation. |
| public final ParallelFlowable | Returns: the new ParallelFlowable instancethe callback onComplete)Run the specified Action when a 'rail' completes. |
| public final ParallelFlowable | |
| public final ParallelFlowable | |
| public final ParallelFlowable | Returns: the new ParallelFlowable instancethe callback onNext, ParallelFailureHandling the enumeration that defines how to handle errors thrown
from the onNext consumer errorHandler)Call the specified consumer with the current element passing through any 'rail' and
handles errors based on the given |
| public final ParallelFlowable | Returns: the new ParallelFlowable instancethe callback onNext, BiFunction<? super Long, ? super Throwable, ParallelFailureHandling> the function called with the current repeat count and
failure Throwable and should return one of the errorHandler)ParallelFailureHandling
enumeration values to indicate how to proceed.Call the specified consumer with the current element passing through any 'rail' and handles errors based on the returned value by the handler function. |
| public final ParallelFlowable | Returns: the new ParallelFlowable instancethe callback onRequest)Call the specified consumer with the request amount if any rail receives a request. |
| public final ParallelFlowable | Returns: the new ParallelFlowable instancethe callback onSubscribe)Call the specified callback when a 'rail' receives a Subscription from its upstream. |
| public final ParallelFlowable | |
| public final ParallelFlowable | Returns: the new ParallelFlowable instancethe function returning true to keep a value or false to drop a value predicate, ParallelFailureHandling the enumeration that defines how to handle errors thrown
from the predicate errorHandler)Filters the source values on each 'rail' and
handles errors based on the given |
| public final ParallelFlowable | Returns: the new ParallelFlowable instancethe function returning true to keep a value or false to drop a value predicate, BiFunction<? super Long, ? super Throwable, ParallelFailureHandling> the function called with the current repeat count and
failure Throwable and should return one of the errorHandler)ParallelFailureHandling
enumeration values to indicate how to proceed.Filters the source values on each 'rail' and handles errors based on the returned value by the handler function. |
| public final < the result type R> ParallelFlowable | |
| public final < the result type R> ParallelFlowable | Returns: the new ParallelFlowable instancethe function to map each rail's value into a Publisher mapper, boolean should the errors from the main and the inner sources delayed till everybody terminates? delayError)Generates and flattens Publishers on each 'rail', optionally delaying errors. |
| public final < the result type R> ParallelFlowable | Returns: the new ParallelFlowable instancethe function to map each rail's value into a Publisher mapper, boolean should the errors from the main and the inner sources delayed till everybody terminates? delayError, int the maximum number of simultaneous subscriptions to the generated inner Publishers maxConcurrency)Generates and flattens Publishers on each 'rail', optionally delaying errors and having a total number of simultaneous subscriptions to the inner Publishers. |
| public final < the result type R> ParallelFlowable | Returns: the new ParallelFlowable instancethe function to map each rail's value into a Publisher mapper, boolean should the errors from the main and the inner sources delayed till everybody terminates? delayError, int the maximum number of simultaneous subscriptions to the generated inner Publishers maxConcurrency, int the number of items to prefetch from each inner Publisher 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. |
| public static < the value type T> ParallelFlowable | |
| public static < the value type T> ParallelFlowable | |
| public static < the value type T> ParallelFlowable | Returns: the new ParallelFlowable instancethe source Publisher source, int the number of parallel rails parallelism, int the number of values to prefetch from the source
the source until there is a rail ready to process it. 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. |
| public static < the value type T> ParallelFlowable | |
| public final < the output value type R> ParallelFlowable | |
| public final < the output value type R> ParallelFlowable | Returns: the new ParallelFlowable instancethe mapper function turning Ts into Us. mapper, ParallelFailureHandling the enumeration that defines how to handle errors thrown
from the mapper function errorHandler)Maps the source values on each 'rail' to another value and
handles errors based on the given |
| public final < the output value type R> ParallelFlowable | Returns: the new ParallelFlowable instancethe mapper function turning Ts into Us. mapper, BiFunction<? super Long, ? super Throwable, ParallelFailureHandling> the function called with the current repeat count and
failure Throwable and should return one of the errorHandler)ParallelFailureHandling
enumeration values to indicate how to proceed.Maps the source values on each 'rail' to another value and handles errors based on the returned value by the handler function. |
| public abstract int | Returns: the number of expected parallel SubscribersReturns the number of expected parallel Subscribers. |
| public final Flowable | Returns: the new Flowable instance emitting the reduced value or empty if the ParallelFlowable was emptythe function to reduce two values into one. reducer)Reduces all values within a 'rail' and across 'rails' with a reducer function into a single sequential value. |
| public final < the reduced output type R> ParallelFlowable | Returns: the new ParallelFlowable instancethe supplier for the initial value initialSupplier, BiFunction<R, ? super T, R> the function to reduce a previous output of reduce (or the initial value supplied)
with a current source value. 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. |
| public final ParallelFlowable | |
| public final ParallelFlowable | Returns: the new ParallelFlowable instancethe scheduler to use
that rail's worker has run out of work. scheduler, int the number of values to request on each 'rail' from the source prefetch)Specifies where each 'rail' will observe its incoming values with possibly work-stealing and a given prefetch amount. |
| public final Flowable | Returns: the new Flowable instanceMerges the values from each 'rail' in a round-robin or same-order fashion and exposes it as a regular Publisher sequence, running with a default prefetch value for the rails. |
| public final Flowable | Returns: the new Flowable instancethe prefetch amount to use for each rail prefetch)Merges the values from each 'rail' in a round-robin or same-order fashion and exposes it as a regular Publisher sequence, running with a give prefetch value for the rails. |
| public final Flowable | Returns: the new Flowable instanceMerges the values from each 'rail' in a round-robin or same-order fashion and exposes it as a regular Flowable sequence, running with a default prefetch value for the rails and delaying errors from all rails till all terminate. |
| public final Flowable | Returns: the new Flowable instancethe prefetch amount to use for each rail prefetch)Merges the values from each 'rail' in a round-robin or same-order fashion and exposes it as a regular Publisher sequence, running with a give prefetch value for the rails and delaying errors from all rails till all terminate. |
| public final Flowable | Returns: the new Flowable instancethe comparator to use comparator)Sorts the 'rails' of this ParallelFlowable and returns a Publisher that sequentially picks the smallest next value from the rails. |
| public final Flowable | Returns: the new Flowable instancethe comparator to use comparator, int the expected number of total elements capacityHint)Sorts the 'rails' of this ParallelFlowable and returns a Publisher that sequentially picks the smallest next value from the rails. |
| public abstract void | subscribe(Subscriber<? super T>[]
the subscribers array to run in parallel, the number
of items must be equal to the parallelism level of this ParallelFlowable subscribers)Subscribes an array of Subscribers to this ParallelFlowable and triggers the execution chain for all 'rails'. |
| public final < the output value type U> U | Returns: the value returned by the converter functionthe converter function from ParallelFlowable to some type converter)Perform a fluent transformation to a value via a converter function which receives this ParallelFlowable. |
| public final Flowable | Returns: the new Flowable instancethe comparator to compare elements comparator)Sorts the 'rails' according to the comparator and returns a full sorted list as a Publisher. |
| public final Flowable | Returns: the new Flowable instancethe comparator to compare elements comparator, int the expected number of total elements capacityHint)Sorts the 'rails' according to the comparator and returns a full sorted list as a Publisher. |
| protected final boolean | Returns: true if the number of subscribers equals to the parallelism levelthe array of Subscribers subscribers)Validates the number of subscribers and returns true if their number matches the parallelism level of this ParallelFlowable. |