Skip to content

3.x: API promotions for 3.1.0 #7296

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/main/java/io/reactivex/rxjava3/core/Flowable.java
Original file line number Diff line number Diff line change
Expand Up @@ -12725,15 +12725,15 @@ public final Flowable<T> onBackpressureLatest() {
* <dt><b>Scheduler:</b></dt>
* <dd>{@code onBackpressureReduce} does not operate by default on a particular {@link Scheduler}.</dd>
* </dl>
* <p>History: 3.0.9 - experimental
* @param reducer the bi-function to call when there is more than one non-emitted value to downstream,
* the first argument of the bi-function is previous item and the second one is currently
* emitting from upstream
* @return the new {@code Flowable} instance
* @throws NullPointerException if {@code reducer} is {@code null}
* @since 3.0.9 - experimental
* @since 3.1.0
* @see #onBackpressureReduce(Supplier, BiFunction)
*/
@Experimental
@CheckReturnValue
@BackpressureSupport(BackpressureKind.UNBOUNDED_IN)
@SchedulerSupport(SchedulerSupport.NONE)
Expand Down Expand Up @@ -12764,6 +12764,7 @@ public final Flowable<T> onBackpressureReduce(@NonNull BiFunction<T, T, T> reduc
* <dt><b>Scheduler:</b></dt>
* <dd>{@code onBackpressureReduce} does not operate by default on a particular {@link Scheduler}.</dd>
* </dl>
* <p>History: 3.0.9 - experimental
* @param <R> the aggregate type emitted when the downstream requests more items
* @param supplier the factory to call to create new item of type R to pass it as the first argument to {@code reducer}.
* It is called when previous returned value by {@code reducer} already sent to
Expand All @@ -12774,9 +12775,8 @@ public final Flowable<T> onBackpressureReduce(@NonNull BiFunction<T, T, T> reduc
* @return the new {@code Flowable} instance
* @throws NullPointerException if {@code supplier} or {@code reducer} is {@code null}
* @see #onBackpressureReduce(BiFunction)
* @since 3.0.9 - experimental
* @since 3.1.0
*/
@Experimental
@CheckReturnValue
@BackpressureSupport(BackpressureKind.UNBOUNDED_IN)
@SchedulerSupport(SchedulerSupport.NONE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@

package io.reactivex.rxjava3.internal.schedulers;

import java.util.*;
import java.util.concurrent.*;
import java.util.concurrent.atomic.AtomicReference;

import io.reactivex.rxjava3.exceptions.Exceptions;
import io.reactivex.rxjava3.functions.Function;
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/io/reactivex/rxjava3/plugins/RxJavaPlugins.java
Original file line number Diff line number Diff line change
Expand Up @@ -1153,11 +1153,11 @@ public static void setOnParallelAssembly(@Nullable Function<? super ParallelFlow

/**
* Sets the specific hook function.
* <p>History: 3.0.11 - experimental
* @param handler the hook function to set, null allowed
* @since 3.0.11 - experimental
* @since 3.1.0
*/
@SuppressWarnings("rawtypes")
@Experimental
public static void setOnParallelSubscribe(@Nullable BiFunction<? super ParallelFlowable, ? super Subscriber[], ? extends Subscriber[]> handler) {
if (lockdown) {
throw new IllegalStateException("Plugins can't be changed anymore");
Expand All @@ -1167,11 +1167,11 @@ public static void setOnParallelSubscribe(@Nullable BiFunction<? super ParallelF

/**
* Returns the current hook function.
* <p>History: 3.0.11 - experimental
* @return the hook function, may be null
* @since 3.0.11 - experimental
* @since 3.1.0
*/
@SuppressWarnings("rawtypes")
@Experimental
@Nullable
public static BiFunction<? super ParallelFlowable, ? super Subscriber[], ? extends Subscriber[]> getOnParallelSubscribe() {
return onParallelSubscribe;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ public TestScheduler() {
/**
* Creates a new TestScheduler with the option to use the
* {@link RxJavaPlugins#onSchedule(Runnable)} hook when scheduling tasks.
* <p>History: 3.0.10 - experimental
* @param useOnScheduleHook if {@code true}, the tasks submitted to this
* TestScheduler is wrapped via the
* {@link RxJavaPlugins#onSchedule(Runnable)} hook
* @since 3.0.10 - experimental
* @since 3.1.0
*/
@Experimental
public TestScheduler(boolean useOnScheduleHook) {
this.useOnScheduleHook = useOnScheduleHook;
}
Expand All @@ -78,17 +78,16 @@ public TestScheduler(long delayTime, TimeUnit unit) {
* Creates a new TestScheduler with the specified initial virtual time
* and with the option to use the
* {@link RxJavaPlugins#onSchedule(Runnable)} hook when scheduling tasks.
*
* <p>History: 3.0.10 - experimental
* @param delayTime
* the point in time to move the Scheduler's clock to
* @param unit
* the units of time that {@code delayTime} is expressed in
* @param useOnScheduleHook if {@code true}, the tasks submitted to this
* TestScheduler is wrapped via the
* {@link RxJavaPlugins#onSchedule(Runnable)} hook
* @since 3.0.10 - experimental
* @since 3.1.0
*/
@Experimental
public TestScheduler(long delayTime, TimeUnit unit, boolean useOnScheduleHook) {
time = unit.toNanos(delayTime);
this.useOnScheduleHook = useOnScheduleHook;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import io.reactivex.rxjava3.core.RxJavaTest;
import io.reactivex.rxjava3.functions.Function;
import io.reactivex.rxjava3.internal.functions.Functions;
import io.reactivex.rxjava3.schedulers.Schedulers;
import io.reactivex.rxjava3.testsupport.TestHelper;

public class SchedulerPoolFactoryTest extends RxJavaTest {
Expand Down