19
19
20
20
import io.reactivex.rxjava3.annotations.*;
21
21
import io.reactivex.rxjava3.disposables.Disposable;
22
- import io.reactivex.rxjava3.exceptions.Exceptions ;
22
+ import io.reactivex.rxjava3.exceptions.* ;
23
23
import io.reactivex.rxjava3.flowables.*;
24
24
import io.reactivex.rxjava3.functions.*;
25
25
import io.reactivex.rxjava3.internal.functions.*;
@@ -10421,13 +10421,16 @@ public final Disposable forEachWhile(final Predicate<? super T> onNext, final Co
10421
10421
*
10422
10422
* <dl>
10423
10423
* <dt><b>Backpressure:</b></dt>
10424
- * <dd>Both the returned and its inner {@code Publisher}s honor backpressure and the source {@code Publisher}
10425
- * is consumed in a bounded mode (i.e., requested a fixed amount upfront and replenished based on
10426
- * downstream consumption). Note that both the returned and its inner {@code Publisher}s use
10427
- * unbounded internal buffers and if the source {@code Publisher} doesn't honor backpressure, that <em>may</em>
10428
- * lead to {@code OutOfMemoryError} .</dd>
10424
+ * <dd>The consumer of the returned {@code Flowable} has to be ready to receive new {@code GroupedFlowable}s or else
10425
+ * this operator will signal {@link MissingBackpressureException}. To avoid this exception, make
10426
+ * sure a combining operator (such as {@code flatMap}) has adequate amount of buffering/prefetch configured.
10427
+ * The inner {@code GroupedFlowable}s honor backpressure but due to the single-source multiple consumer
10428
+ * nature of this operator, each group must be consumed so the whole operator can make progress and not hang .</dd>
10429
10429
* <dt><b>Scheduler:</b></dt>
10430
10430
* <dd>{@code groupBy} does not operate by default on a particular {@link Scheduler}.</dd>
10431
+ * <dt><b>Error handling:</b></dt>
10432
+ * <dd>If the upstream signals or the callback(s) throw an exception, the returned {@code Flowable} and
10433
+ * all active inner {@code GroupedFlowable}s will signal the same exception.</dd>
10431
10434
* </dl>
10432
10435
*
10433
10436
* @param keySelector
@@ -10438,9 +10441,11 @@ public final Disposable forEachWhile(final Predicate<? super T> onNext, final Co
10438
10441
* unique key value and each of which emits those items from the source Publisher that share that
10439
10442
* key value
10440
10443
* @see <a href="http://reactivex.io/documentation/operators/groupby.html">ReactiveX operators documentation: GroupBy</a>
10444
+ * @see #groupBy(Function, boolean)
10445
+ * @see #groupBy(Function, Function)
10441
10446
*/
10442
10447
@CheckReturnValue
10443
- @BackpressureSupport(BackpressureKind.FULL )
10448
+ @BackpressureSupport(BackpressureKind.ERROR )
10444
10449
@SchedulerSupport(SchedulerSupport.NONE)
10445
10450
public final <K> Flowable<GroupedFlowable<K, T>> groupBy(Function<? super T, ? extends K> keySelector) {
10446
10451
return groupBy(keySelector, Functions.<T>identity(), false, bufferSize());
@@ -10474,13 +10479,16 @@ public final <K> Flowable<GroupedFlowable<K, T>> groupBy(Function<? super T, ? e
10474
10479
*
10475
10480
* <dl>
10476
10481
* <dt><b>Backpressure:</b></dt>
10477
- * <dd>Both the returned and its inner {@code Publisher}s honor backpressure and the source {@code Publisher}
10478
- * is consumed in a bounded mode (i.e., requested a fixed amount upfront and replenished based on
10479
- * downstream consumption). Note that both the returned and its inner {@code Publisher}s use
10480
- * unbounded internal buffers and if the source {@code Publisher} doesn't honor backpressure, that <em>may</em>
10481
- * lead to {@code OutOfMemoryError} .</dd>
10482
+ * <dd>The consumer of the returned {@code Flowable} has to be ready to receive new {@code GroupedFlowable}s or else
10483
+ * this operator will signal {@link MissingBackpressureException}. To avoid this exception, make
10484
+ * sure a combining operator (such as {@code flatMap}) has adequate amount of buffering/prefetch configured.
10485
+ * The inner {@code GroupedFlowable}s honor backpressure but due to the single-source multiple consumer
10486
+ * nature of this operator, each group must be consumed so the whole operator can make progress and not hang .</dd>
10482
10487
* <dt><b>Scheduler:</b></dt>
10483
10488
* <dd>{@code groupBy} does not operate by default on a particular {@link Scheduler}.</dd>
10489
+ * <dt><b>Error handling:</b></dt>
10490
+ * <dd>If the upstream signals or the callback(s) throw an exception, the returned {@code Flowable} and
10491
+ * all active inner {@code GroupedFlowable}s will signal the same exception.</dd>
10484
10492
* </dl>
10485
10493
*
10486
10494
* @param keySelector
@@ -10496,7 +10504,7 @@ public final <K> Flowable<GroupedFlowable<K, T>> groupBy(Function<? super T, ? e
10496
10504
* @see <a href="http://reactivex.io/documentation/operators/groupby.html">ReactiveX operators documentation: GroupBy</a>
10497
10505
*/
10498
10506
@CheckReturnValue
10499
- @BackpressureSupport(BackpressureKind.FULL )
10507
+ @BackpressureSupport(BackpressureKind.ERROR )
10500
10508
@SchedulerSupport(SchedulerSupport.NONE)
10501
10509
public final <K> Flowable<GroupedFlowable<K, T>> groupBy(Function<? super T, ? extends K> keySelector, boolean delayError) {
10502
10510
return groupBy(keySelector, Functions.<T>identity(), delayError, bufferSize());
@@ -10530,13 +10538,16 @@ public final <K> Flowable<GroupedFlowable<K, T>> groupBy(Function<? super T, ? e
10530
10538
*
10531
10539
* <dl>
10532
10540
* <dt><b>Backpressure:</b></dt>
10533
- * <dd>Both the returned and its inner {@code Publisher}s honor backpressure and the source {@code Publisher}
10534
- * is consumed in a bounded mode (i.e., requested a fixed amount upfront and replenished based on
10535
- * downstream consumption). Note that both the returned and its inner {@code Publisher}s use
10536
- * unbounded internal buffers and if the source {@code Publisher} doesn't honor backpressure, that <em>may</em>
10537
- * lead to {@code OutOfMemoryError} .</dd>
10541
+ * <dd>The consumer of the returned {@code Flowable} has to be ready to receive new {@code GroupedFlowable}s or else
10542
+ * this operator will signal {@link MissingBackpressureException}. To avoid this exception, make
10543
+ * sure a combining operator (such as {@code flatMap}) has adequate amount of buffering/prefetch configured.
10544
+ * The inner {@code GroupedFlowable}s honor backpressure but due to the single-source multiple consumer
10545
+ * nature of this operator, each group must be consumed so the whole operator can make progress and not hang .</dd>
10538
10546
* <dt><b>Scheduler:</b></dt>
10539
10547
* <dd>{@code groupBy} does not operate by default on a particular {@link Scheduler}.</dd>
10548
+ * <dt><b>Error handling:</b></dt>
10549
+ * <dd>If the upstream signals or the callback(s) throw an exception, the returned {@code Flowable} and
10550
+ * all active inner {@code GroupedFlowable}s will signal the same exception.</dd>
10540
10551
* </dl>
10541
10552
*
10542
10553
* @param keySelector
@@ -10551,9 +10562,12 @@ public final <K> Flowable<GroupedFlowable<K, T>> groupBy(Function<? super T, ? e
10551
10562
* unique key value and each of which emits those items from the source Publisher that share that
10552
10563
* key value
10553
10564
* @see <a href="http://reactivex.io/documentation/operators/groupby.html">ReactiveX operators documentation: GroupBy</a>
10565
+ * @see #groupBy(Function, Function, boolean)
10566
+ * @see #groupBy(Function, Function, boolean, int)
10567
+ * @see #groupBy(Function, Function, boolean, int, Function)
10554
10568
*/
10555
10569
@CheckReturnValue
10556
- @BackpressureSupport(BackpressureKind.FULL )
10570
+ @BackpressureSupport(BackpressureKind.ERROR )
10557
10571
@SchedulerSupport(SchedulerSupport.NONE)
10558
10572
public final <K, V> Flowable<GroupedFlowable<K, V>> groupBy(Function<? super T, ? extends K> keySelector,
10559
10573
Function<? super T, ? extends V> valueSelector) {
@@ -10588,13 +10602,16 @@ public final <K, V> Flowable<GroupedFlowable<K, V>> groupBy(Function<? super T,
10588
10602
*
10589
10603
* <dl>
10590
10604
* <dt><b>Backpressure:</b></dt>
10591
- * <dd>Both the returned and its inner {@code Publisher}s honor backpressure and the source {@code Publisher}
10592
- * is consumed in a bounded mode (i.e., requested a fixed amount upfront and replenished based on
10593
- * downstream consumption). Note that both the returned and its inner {@code Publisher}s use
10594
- * unbounded internal buffers and if the source {@code Publisher} doesn't honor backpressure, that <em>may</em>
10595
- * lead to {@code OutOfMemoryError} .</dd>
10605
+ * <dd>The consumer of the returned {@code Flowable} has to be ready to receive new {@code GroupedFlowable}s or else
10606
+ * this operator will signal {@link MissingBackpressureException}. To avoid this exception, make
10607
+ * sure a combining operator (such as {@code flatMap}) has adequate amount of buffering/prefetch configured.
10608
+ * The inner {@code GroupedFlowable}s honor backpressure but due to the single-source multiple consumer
10609
+ * nature of this operator, each group must be consumed so the whole operator can make progress and not hang .</dd>
10596
10610
* <dt><b>Scheduler:</b></dt>
10597
10611
* <dd>{@code groupBy} does not operate by default on a particular {@link Scheduler}.</dd>
10612
+ * <dt><b>Error handling:</b></dt>
10613
+ * <dd>If the upstream signals or the callback(s) throw an exception, the returned {@code Flowable} and
10614
+ * all active inner {@code GroupedFlowable}s will signal the same exception.</dd>
10598
10615
* </dl>
10599
10616
*
10600
10617
* @param keySelector
@@ -10612,9 +10629,10 @@ public final <K, V> Flowable<GroupedFlowable<K, V>> groupBy(Function<? super T,
10612
10629
* unique key value and each of which emits those items from the source Publisher that share that
10613
10630
* key value
10614
10631
* @see <a href="http://reactivex.io/documentation/operators/groupby.html">ReactiveX operators documentation: GroupBy</a>
10632
+ * @see #groupBy(Function, Function, boolean, int)
10615
10633
*/
10616
10634
@CheckReturnValue
10617
- @BackpressureSupport(BackpressureKind.FULL )
10635
+ @BackpressureSupport(BackpressureKind.ERROR )
10618
10636
@SchedulerSupport(SchedulerSupport.NONE)
10619
10637
public final <K, V> Flowable<GroupedFlowable<K, V>> groupBy(Function<? super T, ? extends K> keySelector,
10620
10638
Function<? super T, ? extends V> valueSelector, boolean delayError) {
@@ -10649,13 +10667,16 @@ public final <K, V> Flowable<GroupedFlowable<K, V>> groupBy(Function<? super T,
10649
10667
*
10650
10668
* <dl>
10651
10669
* <dt><b>Backpressure:</b></dt>
10652
- * <dd>Both the returned and its inner {@code Publisher}s honor backpressure and the source {@code Publisher}
10653
- * is consumed in a bounded mode (i.e., requested a fixed amount upfront and replenished based on
10654
- * downstream consumption). Note that both the returned and its inner {@code Publisher}s use
10655
- * unbounded internal buffers and if the source {@code Publisher} doesn't honor backpressure, that <em>may</em>
10656
- * lead to {@code OutOfMemoryError} .</dd>
10670
+ * <dd>The consumer of the returned {@code Flowable} has to be ready to receive new {@code GroupedFlowable}s or else
10671
+ * this operator will signal {@link MissingBackpressureException}. To avoid this exception, make
10672
+ * sure a combining operator (such as {@code flatMap}) has adequate amount of buffering/prefetch configured.
10673
+ * The inner {@code GroupedFlowable}s honor backpressure but due to the single-source multiple consumer
10674
+ * nature of this operator, each group must be consumed so the whole operator can make progress and not hang .</dd>
10657
10675
* <dt><b>Scheduler:</b></dt>
10658
10676
* <dd>{@code groupBy} does not operate by default on a particular {@link Scheduler}.</dd>
10677
+ * <dt><b>Error handling:</b></dt>
10678
+ * <dd>If the upstream signals or the callback(s) throw an exception, the returned {@code Flowable} and
10679
+ * all active inner {@code GroupedFlowable}s will signal the same exception.</dd>
10659
10680
* </dl>
10660
10681
*
10661
10682
* @param keySelector
@@ -10678,7 +10699,7 @@ public final <K, V> Flowable<GroupedFlowable<K, V>> groupBy(Function<? super T,
10678
10699
*/
10679
10700
@CheckReturnValue
10680
10701
@NonNull
10681
- @BackpressureSupport(BackpressureKind.FULL )
10702
+ @BackpressureSupport(BackpressureKind.SPECIAL )
10682
10703
@SchedulerSupport(SchedulerSupport.NONE)
10683
10704
public final <K, V> Flowable<GroupedFlowable<K, V>> groupBy(Function<? super T, ? extends K> keySelector,
10684
10705
Function<? super T, ? extends V> valueSelector,
@@ -10759,13 +10780,16 @@ public final <K, V> Flowable<GroupedFlowable<K, V>> groupBy(Function<? super T,
10759
10780
*
10760
10781
* <dl>
10761
10782
* <dt><b>Backpressure:</b></dt>
10762
- * <dd>Both the returned and its inner {@code GroupedFlowable}s honor backpressure and the source {@code Publisher}
10763
- * is consumed in a bounded mode (i.e., requested a fixed amount upfront and replenished based on
10764
- * downstream consumption). Note that both the returned and its inner {@code GroupedFlowable}s use
10765
- * unbounded internal buffers and if the source {@code Publisher} doesn't honor backpressure, that <em>may</em>
10766
- * lead to {@code OutOfMemoryError} .</dd>
10783
+ * <dd>The consumer of the returned {@code Flowable} has to be ready to receive new {@code GroupedFlowable}s or else
10784
+ * this operator will signal {@link MissingBackpressureException}. To avoid this exception, make
10785
+ * sure a combining operator (such as {@code flatMap}) has adequate amount of buffering/prefetch configured.
10786
+ * The inner {@code GroupedFlowable}s honor backpressure but due to the single-source multiple consumer
10787
+ * nature of this operator, each group must be consumed so the whole operator can make progress and not hang .</dd>
10767
10788
* <dt><b>Scheduler:</b></dt>
10768
10789
* <dd>{@code groupBy} does not operate by default on a particular {@link Scheduler}.</dd>
10790
+ * <dt><b>Error handling:</b></dt>
10791
+ * <dd>If the upstream signals or the callback(s) throw an exception, the returned {@code Flowable} and
10792
+ * all active inner {@code GroupedFlowable}s will signal the same exception.</dd>
10769
10793
* </dl>
10770
10794
* <p>History: 2.1.10 - beta
10771
10795
* @param keySelector
@@ -10796,7 +10820,7 @@ public final <K, V> Flowable<GroupedFlowable<K, V>> groupBy(Function<? super T,
10796
10820
*/
10797
10821
@CheckReturnValue
10798
10822
@NonNull
10799
- @BackpressureSupport(BackpressureKind.FULL )
10823
+ @BackpressureSupport(BackpressureKind.SPECIAL )
10800
10824
@SchedulerSupport(SchedulerSupport.NONE)
10801
10825
public final <K, V> Flowable<GroupedFlowable<K, V>> groupBy(Function<? super T, ? extends K> keySelector,
10802
10826
Function<? super T, ? extends V> valueSelector,
0 commit comments