Package hu.akarnokd.rxjava3.parallel
Class ParallelTransformers
- java.lang.Object
-
- hu.akarnokd.rxjava3.parallel.ParallelTransformers
-
public final class ParallelTransformers extends java.lang.ObjectTransformers for RxJava 2 ParallelFlowable sequences.- Since:
- 0.16.3
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T extends java.lang.Comparable<? super T>>
Flowable<T>orderedMerge(ParallelFlowable<T> source)Merges the source ParallelFlowable rails in an ordered fashion picking the smallest of the available value from them (determined by their natural order).static <T extends java.lang.Comparable<? super T>>
Flowable<T>orderedMerge(ParallelFlowable<T> source, boolean delayErrors)Merges the source ParallelFlowable rails in an ordered fashion picking the smallest of the available value from them (determined by their natural order) and allows delaying any error they may signal.static <T extends java.lang.Comparable<? super T>>
Flowable<T>orderedMerge(ParallelFlowable<T> source, boolean delayErrors, int prefetch)Merges the source ParallelFlowable rails in an ordered fashion picking the smallest of the available value from them (determined by their natural order), allows delaying any error they may signal and sets the prefetch amount when requesting from these Publishers.static <T> Flowable<T>orderedMerge(ParallelFlowable<T> source, java.util.Comparator<? super T> comparator)Merges the source ParallelFlowable rails in an ordered fashion picking the smallest of the available value from them (determined by the Comparator).static <T> Flowable<T>orderedMerge(ParallelFlowable<T> source, java.util.Comparator<? super T> comparator, boolean delayErrors)Merges the source ParallelFlowable rails in an ordered fashion picking the smallest of the available value from them (determined by the Comparator) and allows delaying any error they may signal.static <T> Flowable<T>orderedMerge(ParallelFlowable<T> source, java.util.Comparator<? super T> comparator, boolean delayErrors, int prefetch)Merges the source ParallelFlowable rails in an ordered fashion picking the smallest of the available value from them (determined by the Comparator), allows delaying any error they may signal and sets the prefetch amount when requesting from these Publishers.static <T extends java.lang.Number>
ParallelTransformer<T,java.lang.Double>sumDouble()Sums the numbers as longs on each rail.static <T extends java.lang.Number>
ParallelTransformer<T,java.lang.Integer>sumInteger()Sums the numbers as integers on each rail.static <T extends java.lang.Number>
ParallelTransformer<T,java.lang.Long>sumLong()Sums the numbers as longs on each rail.
-
-
-
Method Detail
-
orderedMerge
public static <T extends java.lang.Comparable<? super T>> Flowable<T> orderedMerge(ParallelFlowable<T> source)
Merges the source ParallelFlowable rails in an ordered fashion picking the smallest of the available value from them (determined by their natural order).- Type Parameters:
T- the value type of all sources- Parameters:
source- the source ParallelFlowable- Returns:
- the new Flowable instance
- Since:
- 0.17.9
-
orderedMerge
public static <T extends java.lang.Comparable<? super T>> Flowable<T> orderedMerge(ParallelFlowable<T> source, boolean delayErrors)
Merges the source ParallelFlowable rails in an ordered fashion picking the smallest of the available value from them (determined by their natural order) and allows delaying any error they may signal.- Type Parameters:
T- the value type of all sources- Parameters:
source- the source ParallelFlowabledelayErrors- if true, source errors are delayed until all sources terminate in some way- Returns:
- the new Flowable instance
- Since:
- 0.17.9
-
orderedMerge
public static <T extends java.lang.Comparable<? super T>> Flowable<T> orderedMerge(ParallelFlowable<T> source, boolean delayErrors, int prefetch)
Merges the source ParallelFlowable rails in an ordered fashion picking the smallest of the available value from them (determined by their natural order), allows delaying any error they may signal and sets the prefetch amount when requesting from these Publishers.- Type Parameters:
T- the value type of all sources- Parameters:
source- the source ParallelFlowabledelayErrors- if true, source errors are delayed until all sources terminate in some wayprefetch- the number of items to prefetch from the sources- Returns:
- the new Flowable instance
- Since:
- 0.17.9
-
orderedMerge
public static <T> Flowable<T> orderedMerge(ParallelFlowable<T> source, java.util.Comparator<? super T> comparator)
Merges the source ParallelFlowable rails in an ordered fashion picking the smallest of the available value from them (determined by the Comparator).- Type Parameters:
T- the value type of all sources- Parameters:
source- the source ParallelFlowablecomparator- the comparator to use for comparing items; it is called with the last known smallest in its first argument- Returns:
- the new Flowable instance
- Since:
- 0.17.9
-
orderedMerge
public static <T> Flowable<T> orderedMerge(ParallelFlowable<T> source, java.util.Comparator<? super T> comparator, boolean delayErrors)
Merges the source ParallelFlowable rails in an ordered fashion picking the smallest of the available value from them (determined by the Comparator) and allows delaying any error they may signal.- Type Parameters:
T- the value type of all sources- Parameters:
source- the source ParallelFlowablecomparator- the comparator to use for comparing items; it is called with the last known smallest in its first argumentdelayErrors- if true, source errors are delayed until all sources terminate in some way- Returns:
- the new Flowable instance
- Since:
- 0.17.9
-
orderedMerge
public static <T> Flowable<T> orderedMerge(ParallelFlowable<T> source, java.util.Comparator<? super T> comparator, boolean delayErrors, int prefetch)
Merges the source ParallelFlowable rails in an ordered fashion picking the smallest of the available value from them (determined by the Comparator), allows delaying any error they may signal and sets the prefetch amount when requesting from these Publishers.- Type Parameters:
T- the value type of all sources- Parameters:
source- the source ParallelFlowablecomparator- the comparator to use for comparing items; it is called with the last known smallest in its first argumentdelayErrors- if true, source errors are delayed until all sources terminate in some wayprefetch- the number of items to prefetch from the sources- Returns:
- the new Flowable instance
- Since:
- 0.17.9
-
sumInteger
public static <T extends java.lang.Number> ParallelTransformer<T,java.lang.Integer> sumInteger()
Sums the numbers as integers on each rail.- Type Parameters:
T- the numerical type of the input values- Returns:
- the new ParallelTransformer type
- Since:
- 0.16.3
-
sumLong
public static <T extends java.lang.Number> ParallelTransformer<T,java.lang.Long> sumLong()
Sums the numbers as longs on each rail.- Type Parameters:
T- the numerical type of the input values- Returns:
- the new ParallelTransformer type
- Since:
- 0.16.3
-
sumDouble
public static <T extends java.lang.Number> ParallelTransformer<T,java.lang.Double> sumDouble()
Sums the numbers as longs on each rail.- Type Parameters:
T- the numerical type of the input values- Returns:
- the new ParallelTransformer type
- Since:
- 0.16.3
-
-