Subscribers.
Use from(Publisher) to start processing a regular Publisher in 'rails'.
Use runOn(Scheduler) 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 collection type C> @NonNull ParallelFlowable | Returns: the newParallelFlowable instancethe supplier of the collection in each rail collectionSupplier, @NonNull 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 |
| public final < the accumulator type A, the output value type R> @NonNull Flowable | |
| public final < the output value type U> @NonNull ParallelFlowable | Returns: theParallelFlowable returned by the functionthe composer function from composer)ParallelFlowable (this) to another ParallelFlowableAllows composing operators, in assembly time, on top of this |
| public final < the result type R> @NonNull ParallelFlowable | Returns: the newParallelFlowable instancethe function to map each rail's value into a mapper)Publisher
source and the inner Publishers (immediate, boundary, end)Generates and concatenates |
| public final < the result type R> @NonNull ParallelFlowable | Returns: the newParallelFlowable instancethe function to map each rail's value into a mapper, int Publisherthe number of items to prefetch from each inner prefetch)Publisher
source and the inner Publishers (immediate, boundary, end)Generates and concatenates |
| public final < the result type R> @NonNull ParallelFlowable | Returns: the newParallelFlowable instancethe function to map each rail's value into a mapper, boolean Publisherif tillTheEnd)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)Generates and concatenates |
| public final < the result type R> @NonNull ParallelFlowable | Returns: the newParallelFlowable instancethe function to map each rail's value into a mapper, int Publisherthe number of items to prefetch from each inner prefetch, boolean Publisherif tillTheEnd)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.Generates and concatenates |
| public final @NonNull ParallelFlowable | Returns: the newParallelFlowable 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 @NonNull ParallelFlowable | Returns: the newParallelFlowable instancethe callback onAfterTerminate)Run the specified |
| public final @NonNull ParallelFlowable | Returns: the newParallelFlowable instancethe callback onCancel)Run the specified |
| public final @NonNull ParallelFlowable | Returns: the newParallelFlowable instancethe callback onComplete)Run the specified |
| public final @NonNull ParallelFlowable | |
| public final @NonNull ParallelFlowable | |
| public final @NonNull ParallelFlowable | Returns: the newParallelFlowable instancethe callback onNext, @NonNull ParallelFailureHandling the enumeration that defines how to handle errors thrown
from the errorHandler)onNext consumerCall the specified consumer with the current element passing through any 'rail' and
handles errors based on the given |
| public final @NonNull ParallelFlowable | Returns: the newParallelFlowable instancethe callback onNext, @NonNull BiFunction<? super Long, ? super Throwable, ParallelFailureHandling> the function called with the current repeat count and
failure errorHandler)Throwable and should return one of the 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 @NonNull ParallelFlowable | Returns: the newParallelFlowable instancethe callback onRequest)Call the specified consumer with the request amount if any rail receives a request. |
| public final @NonNull ParallelFlowable | Returns: the newParallelFlowable instancethe callback onSubscribe)Call the specified callback when a 'rail' receives a |
| public final @NonNull ParallelFlowable | |
| public final @NonNull ParallelFlowable | Returns: the newParallelFlowable instancethe function returning predicate, @NonNull ParallelFailureHandling true to keep a value or false to drop a valuethe enumeration that defines how to handle errors thrown
from the errorHandler)predicateFilters the source values on each 'rail' and
handles errors based on the given |
| public final @NonNull ParallelFlowable | Returns: the newParallelFlowable instancethe function returning predicate, @NonNull BiFunction<? super Long, ? super Throwable, ParallelFailureHandling> true to keep a value or false to drop a valuethe function called with the current repeat count and
failure errorHandler)Throwable and should return one of the 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> @NonNull ParallelFlowable | |
| public final < the result type R> @NonNull ParallelFlowable | Returns: the newParallelFlowable instancethe function to map each rail's value into a mapper, boolean Publishershould the errors from the main and the inner sources delayed till everybody terminates? delayError)Generates and flattens |
| public final < the result type R> @NonNull ParallelFlowable | Returns: the newParallelFlowable instancethe function to map each rail's value into a mapper, boolean Publishershould 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 maxConcurrency)PublishersGenerates and flattens |
| public final < the result type R> @NonNull ParallelFlowable | Returns: the newParallelFlowable instancethe function to map each rail's value into a mapper, boolean Publishershould 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 maxConcurrency, int Publishersthe number of items to prefetch from each inner prefetch)PublisherGenerates and flattens |
| public final < the type of item emitted by the resulting U> @NonNull ParallelFlowableIterable | Returns: the newParallelFlowable instancea function that returns an mapper)Iterable sequence of values for when given an item emitted by the
source ParallelFlowableReturns a |
| public final < the type of item emitted by the resulting U> @NonNull ParallelFlowableIterable | Returns: the newParallelFlowable instancea function that returns an mapper, int Iterable sequence of values for when given an item emitted by the
source ParallelFlowablethe number of elements to prefetch from each upstream rail bufferSize)Returns a |
| public final < the element type of the R> @NonNull ParallelFlowableStreams and the result | Returns: the newParallelFlowable instancethe function that receives an upstream item and should return a mapper)Stream whose elements
will be emitted to the downstreamMaps each upstream item on each rail into a |
| public final < the element type of the R> @NonNull ParallelFlowableStreams and the result | Returns: the newParallelFlowable instancethe function that receives an upstream item and should return a mapper, int Stream whose elements
will be emitted to the downstreamthe number of upstream items to request upfront, then 75% of this amount after each 75% upstream items received prefetch)Maps each upstream item of each rail into a |
| public static < the value type T> @NonNull ParallelFlowable | |
| public static < the value type T> @NonNull ParallelFlowable | |
| public static < the value type T> @NonNull ParallelFlowable | Returns: the newParallelFlowable instancethe source source, int Publisherthe 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 |
| public static < the value type T> @NonNull ParallelFlowable | |
| public final < the output value type R> @NonNull ParallelFlowable | |
| public final < the output value type R> @NonNull ParallelFlowable | Returns: the newParallelFlowable instancethe mapper function turning Ts into Rs. mapper, @NonNull ParallelFailureHandling the enumeration that defines how to handle errors thrown
from the errorHandler)mapper functionMaps the source values on each 'rail' to another value and
handles errors based on the given |
| public final < the output value type R> @NonNull ParallelFlowable | Returns: the newParallelFlowable instancethe mapper function turning Ts into Rs. mapper, @NonNull BiFunction<? super Long, ? super Throwable, ParallelFailureHandling> the function called with the current repeat count and
failure errorHandler)Throwable and should return one of the 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 final < the output value type R> @NonNull ParallelFlowable | Returns: the newParallelFlowable instancethe mapper function turning Ts into optional of Rs. mapper)Maps the source values on each 'rail' to an optional and emits its value if any. |
| public final < the output value type R> @NonNull ParallelFlowable | Returns: the newParallelFlowable instancethe mapper function turning Ts into optional of Rs. mapper, @NonNull ParallelFailureHandling the enumeration that defines how to handle errors thrown
from the mapper function errorHandler)Maps the source values on each 'rail' to an optional and emits its value if any and
handles errors based on the given |
| public final < the output value type R> @NonNull ParallelFlowable | Returns: the newParallelFlowable instancethe mapper function turning Ts into optional of Rs. mapper, @NonNull BiFunction<? super Long, ? super Throwable, ParallelFailureHandling> the function called with the current repeat count and
failure errorHandler)Throwable and should return one of the ParallelFailureHandling
enumeration values to indicate how to proceed.Maps the source values on each 'rail' to an optional and emits its value if any and handles errors based on the returned value by the handler function. |
| public abstract int | Returns: the number of expected parallelSubscribersReturns the number of expected parallel |
| public final @NonNull Flowable | Returns: the newFlowable instance emitting the reduced value or empty if the current ParallelFlowable is emptythe function to reduce two values into one. reducer)Reduces all values within a 'rail' and across 'rails' with a reducer function into one
|
| public final < the reduced output type R> @NonNull ParallelFlowable | Returns: the newParallelFlowable instancethe supplier for the initial value initialSupplier, @NonNull 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 |
| public final @NonNull ParallelFlowable | |
| public final @NonNull ParallelFlowable | Returns: the newParallelFlowable 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, specified via a |
| public final @NonNull Flowable | Returns: the newFlowable instanceMerges the values from each 'rail' in a round-robin or same-order fashion and
exposes it as a regular |
| public final @NonNull Flowable | Returns: the newFlowable 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 |
| public final @NonNull Flowable | Returns: the newFlowable instanceMerges the values from each 'rail' in a round-robin or same-order fashion and
exposes it as a regular |
| public final @NonNull Flowable | Returns: the newFlowable 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 |
| public final @NonNull Flowable | Returns: the newFlowable instancethe comparator to use comparator)Sorts the 'rails' of this |
| public final @NonNull Flowable | Returns: the newFlowable instancethe comparator to use comparator, int the expected number of total elements capacityHint)Sorts the 'rails' of this |
| public abstract void | subscribe(@NonNull Subscriber<? super T>[]
the subscribers array to run in parallel, the number
of items must be equal to the parallelism level of this subscribers)ParallelFlowableSubscribes an array of |
| public final < the resulting object type R> R | Returns: the converted valuethe function that receives the current converter)ParallelFlowable instance and returns a valueCalls the specified converter function during assembly time and returns its resulting value. |
| public final @NonNull Flowable | Returns: the newFlowable instancethe comparator to compare elements comparator)Sorts the 'rails' according to the comparator and returns a full sorted |
| public final @NonNull Flowable | Returns: the newFlowable 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 |
| protected final boolean | Returns: true if the number of subscribers equals to the parallelism levelthe array of subscribers)SubscribersValidates the number of subscribers and returns |