Skip to content

Commit 2d20a17

Browse files
authored
2.x: Apply promotions for v2.1 (#5307)
1 parent 475c058 commit 2d20a17

22 files changed

+141
-484
lines changed

src/main/java/io/reactivex/Completable.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -986,12 +986,12 @@ public final Throwable blockingGet(long timeout, TimeUnit unit) {
986986
* <dt><b>Scheduler:</b></dt>
987987
* <dd>{@code cache} does not operate by default on a particular {@link Scheduler}.</dd>
988988
* </dl>
989+
* <p>History: 2.0.4 - experimental
989990
* @return the new Completable instance
990-
* @since 2.0.4 - experimental
991+
* @since 2.1
991992
*/
992993
@CheckReturnValue
993994
@SchedulerSupport(SchedulerSupport.NONE)
994-
@Experimental
995995
public final Completable cache() {
996996
return RxJavaPlugins.onAssembly(new CompletableCache(this));
997997
}
@@ -1262,13 +1262,13 @@ public final Completable doAfterTerminate(final Action onAfterTerminate) {
12621262
* <dt><b>Scheduler:</b></dt>
12631263
* <dd>{@code doFinally} does not operate by default on a particular {@link Scheduler}.</dd>
12641264
* </dl>
1265+
* <p>History: 2.0.1 - experimental
12651266
* @param onFinally the action called when this Completable terminates or gets cancelled
12661267
* @return the new Completable instance
1267-
* @since 2.0.1 - experimental
1268+
* @since 2.1
12681269
*/
12691270
@CheckReturnValue
12701271
@SchedulerSupport(SchedulerSupport.NONE)
1271-
@Experimental
12721272
public final Completable doFinally(Action onFinally) {
12731273
ObjectHelper.requireNonNull(onFinally, "onFinally is null");
12741274
return RxJavaPlugins.onAssembly(new CompletableDoFinally(this, onFinally));
@@ -1598,10 +1598,10 @@ public final <T> Flowable<T> startWith(Publisher<T> other) {
15981598
* <dt><b>Scheduler:</b></dt>
15991599
* <dd>{@code hide} does not operate by default on a particular {@link Scheduler}.</dd>
16001600
* </dl>
1601+
* <p>History: 2.0.5 - experimental
16011602
* @return the new Completable instance
1602-
* @since 2.0.5 - experimental
1603+
* @since 2.1
16031604
*/
1604-
@Experimental
16051605
@CheckReturnValue
16061606
@SchedulerSupport(SchedulerSupport.NONE)
16071607
public final Completable hide() {

src/main/java/io/reactivex/Flowable.java

Lines changed: 22 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -7648,14 +7648,14 @@ public final Flowable<T> distinctUntilChanged(BiPredicate<? super T, ? super T>
76487648
* <dd>This operator supports normal and conditional Subscribers as well as boundary-limited
76497649
* synchronous or asynchronous queue-fusion.</dd>
76507650
* </dl>
7651+
* <p>History: 2.0.1 - experimental
76517652
* @param onFinally the action called when this Flowable terminates or gets cancelled
76527653
* @return the new Flowable instance
7653-
* @since 2.0.1 - experimental
7654+
* @since 2.1
76547655
*/
76557656
@CheckReturnValue
76567657
@BackpressureSupport(BackpressureKind.PASS_THROUGH)
76577658
@SchedulerSupport(SchedulerSupport.NONE)
7658-
@Experimental
76597659
public final Flowable<T> doFinally(Action onFinally) {
76607660
ObjectHelper.requireNonNull(onFinally, "onFinally is null");
76617661
return RxJavaPlugins.onAssembly(new FlowableDoFinally<T>(this, onFinally));
@@ -7675,14 +7675,14 @@ public final Flowable<T> doFinally(Action onFinally) {
76757675
* <dd>This operator supports normal and conditional Subscribers as well as boundary-limited
76767676
* synchronous or asynchronous queue-fusion.</dd>
76777677
* </dl>
7678+
* <p>History: 2.0.1 - experimental
76787679
* @param onAfterNext the Consumer that will be called after emitting an item from upstream to the downstream
76797680
* @return the new Flowable instance
7680-
* @since 2.0.1 - experimental
7681+
* @since 2.1
76817682
*/
76827683
@CheckReturnValue
76837684
@BackpressureSupport(BackpressureKind.PASS_THROUGH)
76847685
@SchedulerSupport(SchedulerSupport.NONE)
7685-
@Experimental
76867686
public final Flowable<T> doAfterNext(Consumer<? super T> onAfterNext) {
76877687
ObjectHelper.requireNonNull(onAfterNext, "onAfterNext is null");
76887688
return RxJavaPlugins.onAssembly(new FlowableDoAfterNext<T>(this, onAfterNext));
@@ -10447,13 +10447,14 @@ public final Flowable<T> onTerminateDetach() {
1044710447
* <dt><b>Scheduler:</b></dt>
1044810448
* <dd>{@code parallel} does not operate by default on a particular {@link Scheduler}.</dd>
1044910449
* </dl>
10450+
* <p>History: 2.0.5 - experimental
1045010451
* @return the new ParallelFlowable instance
10451-
* @since 2.0.5 - experimental
10452+
* @since 2.1 - beta
1045210453
*/
1045310454
@BackpressureSupport(BackpressureKind.FULL)
1045410455
@SchedulerSupport(SchedulerSupport.NONE)
1045510456
@CheckReturnValue
10456-
@Experimental
10457+
@Beta
1045710458
public final ParallelFlowable<T> parallel() {
1045810459
return ParallelFlowable.from(this);
1045910460
}
@@ -10476,14 +10477,15 @@ public final ParallelFlowable<T> parallel() {
1047610477
* <dt><b>Scheduler:</b></dt>
1047710478
* <dd>{@code parallel} does not operate by default on a particular {@link Scheduler}.</dd>
1047810479
* </dl>
10480+
* <p>History: 2.0.5 - experimental
1047910481
* @param parallelism the number of 'rails' to use
1048010482
* @return the new ParallelFlowable instance
10481-
* @since 2.0.5 - experimental
10483+
* @since 2.1 - beta
1048210484
*/
1048310485
@BackpressureSupport(BackpressureKind.FULL)
1048410486
@SchedulerSupport(SchedulerSupport.NONE)
1048510487
@CheckReturnValue
10486-
@Experimental
10488+
@Beta
1048710489
public final ParallelFlowable<T> parallel(int parallelism) {
1048810490
ObjectHelper.verifyPositive(parallelism, "parallelism");
1048910491
return ParallelFlowable.from(this, parallelism);
@@ -10508,15 +10510,16 @@ public final ParallelFlowable<T> parallel(int parallelism) {
1050810510
* <dt><b>Scheduler:</b></dt>
1050910511
* <dd>{@code parallel} does not operate by default on a particular {@link Scheduler}.</dd>
1051010512
* </dl>
10513+
* <p>History: 2.0.5 - experimental
1051110514
* @param parallelism the number of 'rails' to use
1051210515
* @param prefetch the number of items each 'rail' should prefetch
1051310516
* @return the new ParallelFlowable instance
10514-
* @since 2.0.5 - experimental
10517+
* @since 2.1 - beta
1051510518
*/
1051610519
@BackpressureSupport(BackpressureKind.FULL)
1051710520
@SchedulerSupport(SchedulerSupport.NONE)
1051810521
@CheckReturnValue
10519-
@Experimental
10522+
@Beta
1052010523
public final ParallelFlowable<T> parallel(int parallelism, int prefetch) {
1052110524
ObjectHelper.verifyPositive(parallelism, "parallelism");
1052210525
ObjectHelper.verifyPositive(prefetch, "prefetch");
@@ -11787,6 +11790,7 @@ public final Flowable<T> sample(long period, TimeUnit unit) {
1178711790
* <dd>{@code sample} operates by default on the {@code computation} {@link Scheduler}.</dd>
1178811791
* </dl>
1178911792
*
11793+
* <p>History: 2.0.5 - experimental
1179011794
* @param period
1179111795
* the sampling rate
1179211796
* @param unit
@@ -11800,12 +11804,11 @@ public final Flowable<T> sample(long period, TimeUnit unit) {
1180011804
* @see <a href="http://reactivex.io/documentation/operators/sample.html">ReactiveX operators documentation: Sample</a>
1180111805
* @see <a href="https://github.com/ReactiveX/RxJava/wiki/Backpressure">RxJava wiki: Backpressure</a>
1180211806
* @see #throttleLast(long, TimeUnit)
11803-
* @since 2.0.5 - experimental
11807+
* @since 2.1
1180411808
*/
1180511809
@CheckReturnValue
1180611810
@BackpressureSupport(BackpressureKind.ERROR)
1180711811
@SchedulerSupport(SchedulerSupport.COMPUTATION)
11808-
@Experimental
1180911812
public final Flowable<T> sample(long period, TimeUnit unit, boolean emitLast) {
1181011813
return sample(period, unit, Schedulers.computation(), emitLast);
1181111814
}
@@ -11856,6 +11859,7 @@ public final Flowable<T> sample(long period, TimeUnit unit, Scheduler scheduler)
1185611859
* <dd>You specify which {@link Scheduler} this operator will use</dd>
1185711860
* </dl>
1185811861
*
11862+
* <p>History: 2.0.5 - experimental
1185911863
* @param period
1186011864
* the sampling rate
1186111865
* @param unit
@@ -11871,12 +11875,11 @@ public final Flowable<T> sample(long period, TimeUnit unit, Scheduler scheduler)
1187111875
* @see <a href="http://reactivex.io/documentation/operators/sample.html">ReactiveX operators documentation: Sample</a>
1187211876
* @see <a href="https://github.com/ReactiveX/RxJava/wiki/Backpressure">RxJava wiki: Backpressure</a>
1187311877
* @see #throttleLast(long, TimeUnit, Scheduler)
11874-
* @since 2.0.5 - experimental
11878+
* @since 2.1
1187511879
*/
1187611880
@CheckReturnValue
1187711881
@BackpressureSupport(BackpressureKind.ERROR)
1187811882
@SchedulerSupport(SchedulerSupport.CUSTOM)
11879-
@Experimental
1188011883
public final Flowable<T> sample(long period, TimeUnit unit, Scheduler scheduler, boolean emitLast) {
1188111884
ObjectHelper.requireNonNull(unit, "unit is null");
1188211885
ObjectHelper.requireNonNull(scheduler, "scheduler is null");
@@ -11928,6 +11931,7 @@ public final <U> Flowable<T> sample(Publisher<U> sampler) {
1192811931
* <dd>This version of {@code sample} does not operate by default on a particular {@link Scheduler}.</dd>
1192911932
* </dl>
1193011933
*
11934+
* <p>History: 2.0.5 - experimental
1193111935
* @param <U> the element type of the sampler Publisher
1193211936
* @param sampler
1193311937
* the Publisher to use for sampling the source Publisher
@@ -11939,12 +11943,11 @@ public final <U> Flowable<T> sample(Publisher<U> sampler) {
1193911943
* the {@code sampler} Publisher emits an item or completes
1194011944
* @see <a href="http://reactivex.io/documentation/operators/sample.html">ReactiveX operators documentation: Sample</a>
1194111945
* @see <a href="https://github.com/ReactiveX/RxJava/wiki/Backpressure">RxJava wiki: Backpressure</a>
11942-
* @since 2.0.5 - experimental
11946+
* @since 2.1
1194311947
*/
1194411948
@CheckReturnValue
1194511949
@BackpressureSupport(BackpressureKind.ERROR)
1194611950
@SchedulerSupport(SchedulerSupport.NONE)
11947-
@Experimental
1194811951
public final <U> Flowable<T> sample(Publisher<U> sampler, boolean emitLast) {
1194911952
ObjectHelper.requireNonNull(sampler, "sampler is null");
1195011953
return RxJavaPlugins.onAssembly(new FlowableSamplePublisher<T>(this, sampler, emitLast));
@@ -12755,37 +12758,6 @@ public final Flowable<T> startWithArray(T... items) {
1275512758
return concatArray(fromArray, this);
1275612759
}
1275712760

12758-
/**
12759-
* Ensures that the event flow between the upstream and downstream follow
12760-
* the Reactive-Streams 1.0 specification by honoring the 3 additional rules
12761-
* (which are omitted in standard operators due to performance reasons).
12762-
* <ul>
12763-
* <li>§1.3: onNext should not be called concurrently until onSubscribe returns</li>
12764-
* <li>§2.3: onError or onComplete must not call cancel</li>
12765-
* <li>§3.9: negative requests should emit an onError(IllegalArgumentException)</li>
12766-
* </ul>
12767-
* In addition, if rule §2.12 (onSubscribe must be called at most once) is violated,
12768-
* the sequence is cancelled an onError(IllegalStateException) is emitted.
12769-
* <dl>
12770-
* <dt><b>Backpressure:</b></dt>
12771-
* <dd>The operator doesn't interfere with backpressure which is determined by the source {@code Publisher}'s backpressure
12772-
* behavior.</dd>
12773-
* <dt><b>Scheduler:</b></dt>
12774-
* <dd>{@code strict} does not operate by default on a particular {@link Scheduler}.</dd>
12775-
* </dl>
12776-
* @return the new Flowable instance
12777-
* @since 2.0.5 - experimental
12778-
* @deprecated 2.0.7, will be removed in 2.1.0; by default, the Publisher interface is always strict
12779-
*/
12780-
@BackpressureSupport(BackpressureKind.PASS_THROUGH)
12781-
@SchedulerSupport(SchedulerSupport.NONE)
12782-
@Experimental
12783-
@CheckReturnValue
12784-
@Deprecated
12785-
public final Flowable<T> strict() {
12786-
return this;
12787-
}
12788-
1278912761
/**
1279012762
* Subscribes to a Publisher and ignores {@code onNext} and {@code onComplete} emissions.
1279112763
* <p>
@@ -12997,12 +12969,13 @@ public final void subscribe(Subscriber<? super T> s) {
1299712969
* <dt><b>Scheduler:</b></dt>
1299812970
* <dd>{@code subscribe} does not operate by default on a particular {@link Scheduler}.</dd>
1299912971
* </dl>
12972+
* <p>History: 2.0.7 - experimental
1300012973
* @param s the FlowableSubscriber that will consume signals from this Flowable
13001-
* @since 2.0.7 - experimental
12974+
* @since 2.1 - beta
1300212975
*/
1300312976
@BackpressureSupport(BackpressureKind.SPECIAL)
1300412977
@SchedulerSupport(SchedulerSupport.NONE)
13005-
@Experimental
12978+
@Beta
1300612979
public final void subscribe(FlowableSubscriber<? super T> s) {
1300712980
ObjectHelper.requireNonNull(s, "s is null");
1300812981
try {

src/main/java/io/reactivex/FlowableSubscriber.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,11 @@
2020
* Represents a Reactive-Streams inspired Subscriber that is RxJava 2 only
2121
* and weakens rules §1.3 and §3.9 of the specification for gaining performance.
2222
*
23+
* <p>History: 2.0.7 - experimental
2324
* @param <T> the value type
24-
* @since 2.0.7 - experimental
25+
* @since 2.1 - beta
2526
*/
26-
@Experimental
27+
@Beta
2728
public interface FlowableSubscriber<T> extends Subscriber<T> {
2829

2930
/**

src/main/java/io/reactivex/Maybe.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2375,13 +2375,13 @@ public final Maybe<T> delaySubscription(long delay, TimeUnit unit, Scheduler sch
23752375
* <dt><b>Scheduler:</b></dt>
23762376
* <dd>{@code doAfterSuccess} does not operate by default on a particular {@link Scheduler}.</dd>
23772377
* </dl>
2378+
* <p>History: 2.0.1 - experimental
23782379
* @param onAfterSuccess the Consumer that will be called after emitting an item from upstream to the downstream
23792380
* @return the new Maybe instance
2380-
* @since 2.0.1 - experimental
2381+
* @since 2.1
23812382
*/
23822383
@CheckReturnValue
23832384
@SchedulerSupport(SchedulerSupport.NONE)
2384-
@Experimental
23852385
public final Maybe<T> doAfterSuccess(Consumer<? super T> onAfterSuccess) {
23862386
ObjectHelper.requireNonNull(onAfterSuccess, "doAfterSuccess is null");
23872387
return RxJavaPlugins.onAssembly(new MaybeDoAfterSuccess<T>(this, onAfterSuccess));
@@ -2428,13 +2428,13 @@ public final Maybe<T> doAfterTerminate(Action onAfterTerminate) {
24282428
* <dt><b>Scheduler:</b></dt>
24292429
* <dd>{@code doFinally} does not operate by default on a particular {@link Scheduler}.</dd>
24302430
* </dl>
2431+
* <p>History: 2.0.1 - experimental
24312432
* @param onFinally the action called when this Maybe terminates or gets cancelled
24322433
* @return the new Maybe instance
2433-
* @since 2.0.1 - experimental
2434+
* @since 2.1
24342435
*/
24352436
@CheckReturnValue
24362437
@SchedulerSupport(SchedulerSupport.NONE)
2437-
@Experimental
24382438
public final Maybe<T> doFinally(Action onFinally) {
24392439
ObjectHelper.requireNonNull(onFinally, "onFinally is null");
24402440
return RxJavaPlugins.onAssembly(new MaybeDoFinally<T>(this, onFinally));
@@ -2829,17 +2829,17 @@ public final <R> Single<R> flatMapSingle(final Function<? super T, ? extends Sin
28292829
* <dd>{@code flatMapSingleElement} does not operate by default on a particular {@link Scheduler}.</dd>
28302830
* </dl>
28312831
*
2832+
* <p>History: 2.0.2 - experimental
28322833
* @param <R> the result value type
28332834
* @param mapper
28342835
* a function that, when applied to the item emitted by the source Maybe, returns a
28352836
* Single
28362837
* @return the new Maybe instance
28372838
* @see <a href="http://reactivex.io/documentation/operators/flatmap.html">ReactiveX operators documentation: FlatMap</a>
2838-
* @since 2.0.2 - experimental
2839+
* @since 2.1
28392840
*/
28402841
@CheckReturnValue
28412842
@SchedulerSupport(SchedulerSupport.NONE)
2842-
@Experimental
28432843
public final <R> Maybe<R> flatMapSingleElement(final Function<? super T, ? extends SingleSource<? extends R>> mapper) {
28442844
ObjectHelper.requireNonNull(mapper, "mapper is null");
28452845
return RxJavaPlugins.onAssembly(new MaybeFlatMapSingleElement<T, R>(this, mapper));

0 commit comments

Comments
 (0)