From c012555812d54084f4680bf76f466eb04a0765cf Mon Sep 17 00:00:00 2001 From: akarnokd Date: Fri, 13 Jan 2017 10:25:34 +0100 Subject: [PATCH 1/2] 2.x: Update marble diagrams for sample overloads --- src/main/java/io/reactivex/Flowable.java | 8 ++++---- src/main/java/io/reactivex/Observable.java | 10 ++++------ 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/main/java/io/reactivex/Flowable.java b/src/main/java/io/reactivex/Flowable.java index 948499da08..1cd3f712b5 100644 --- a/src/main/java/io/reactivex/Flowable.java +++ b/src/main/java/io/reactivex/Flowable.java @@ -11611,7 +11611,7 @@ public final Flowable sample(long period, TimeUnit unit) { * Returns a Flowable that emits the most recently emitted item (if any) emitted by the source Publisher * within periodic time intervals and optionally emit the very last upstream item when the upstream completes. *

- * + * *

*
Backpressure:
*
This operator does not support backpressure as it uses time to control data flow.
@@ -11680,7 +11680,7 @@ public final Flowable sample(long period, TimeUnit unit, Scheduler scheduler) * within periodic time intervals, where the intervals are defined on a particular Scheduler * and optionally emit the very last upstream item when the upstream completes. *

- * + * *

*
Backpressure:
*
This operator does not support backpressure as it uses time to control data flow.
@@ -11720,7 +11720,7 @@ public final Flowable sample(long period, TimeUnit unit, Scheduler scheduler, * emits the most recently emitted item (if any) emitted by the source Publisher since the previous * emission from the {@code sampler} Publisher. *

- * + * *

*
Backpressure:
*
This operator does not support backpressure as it uses the emissions of the {@code sampler} @@ -11751,7 +11751,7 @@ public final Flowable sample(Publisher sampler) { * emission from the {@code sampler} Publisher * and optionally emit the very last upstream item when the upstream or other Publisher complete. *

- * + * *

*
Backpressure:
*
This operator does not support backpressure as it uses the emissions of the {@code sampler} diff --git a/src/main/java/io/reactivex/Observable.java b/src/main/java/io/reactivex/Observable.java index 35646c6a26..5d4c73a30d 100644 --- a/src/main/java/io/reactivex/Observable.java +++ b/src/main/java/io/reactivex/Observable.java @@ -9687,7 +9687,7 @@ public final Observable sample(long period, TimeUnit unit) { * Returns an Observable that emits the most recently emitted item (if any) emitted by the source ObservableSource * within periodic time intervals and optionally emit the very last upstream item when the upstream completes. *

- * + * *

*
Scheduler:
*
{@code sample} operates by default on the {@code computation} {@link Scheduler}.
@@ -9748,7 +9748,7 @@ public final Observable sample(long period, TimeUnit unit, Scheduler schedule * within periodic time intervals, where the intervals are defined on a particular Scheduler * and optionally emit the very last upstream item when the upstream completes. *

- * + * *

*
Scheduler:
*
You specify which {@link Scheduler} this operator will use
@@ -9784,9 +9784,8 @@ public final Observable sample(long period, TimeUnit unit, Scheduler schedule * emits the most recently emitted item (if any) emitted by the source ObservableSource since the previous * emission from the {@code sampler} ObservableSource. *

- * + * *

- * ObservableSource to control data flow.
*
Scheduler:
*
This version of {@code sample} does not operate by default on a particular {@link Scheduler}.
*
@@ -9811,9 +9810,8 @@ public final Observable sample(ObservableSource sampler) { * emission from the {@code sampler} ObservableSource * and optionally emit the very last upstream item when the upstream or other ObservableSource complete. *

- * + * *

- * ObservableSource to control data flow.
*
Scheduler:
*
This version of {@code sample} does not operate by default on a particular {@link Scheduler}.
*
From cf98390ca322b52d906e0e4169789732c9cf02c4 Mon Sep 17 00:00:00 2001 From: akarnokd Date: Fri, 13 Jan 2017 12:38:23 +0100 Subject: [PATCH 2/2] Add Maybe and switchIfEmpty diagrams --- src/main/java/io/reactivex/Flowable.java | 1 + src/main/java/io/reactivex/Maybe.java | 4 ++++ src/main/java/io/reactivex/Observable.java | 1 + 3 files changed, 6 insertions(+) diff --git a/src/main/java/io/reactivex/Flowable.java b/src/main/java/io/reactivex/Flowable.java index 1cd3f712b5..28cdab7477 100644 --- a/src/main/java/io/reactivex/Flowable.java +++ b/src/main/java/io/reactivex/Flowable.java @@ -12877,6 +12877,7 @@ public final Flowable subscribeOn(Scheduler scheduler) { /** * Returns a Flowable that emits the items emitted by the source Publisher or the items of an alternate * Publisher if the source Publisher is empty. + * *

*

*
Backpressure:
diff --git a/src/main/java/io/reactivex/Maybe.java b/src/main/java/io/reactivex/Maybe.java index 32c328bb93..72948d969e 100644 --- a/src/main/java/io/reactivex/Maybe.java +++ b/src/main/java/io/reactivex/Maybe.java @@ -35,6 +35,8 @@ /** * Represents a deferred computation and emission of a maybe value or exception. *

+ * + *

* The main consumer type of Maybe is {@link MaybeObserver} whose methods are called * in a sequential fashion following this protocol:
* {@code onSubscribe (onSuccess | onError | onComplete)?}. @@ -3768,6 +3770,8 @@ public final > E subscribeWith(E observer) { /** * Returns a Maybe that emits the items emitted by the source Maybe or the items of an alternate * MaybeSource if the current Maybe is empty. + *

+ * *

*

*
Scheduler:
diff --git a/src/main/java/io/reactivex/Observable.java b/src/main/java/io/reactivex/Observable.java index 5d4c73a30d..04518e176e 100644 --- a/src/main/java/io/reactivex/Observable.java +++ b/src/main/java/io/reactivex/Observable.java @@ -10764,6 +10764,7 @@ public final Observable subscribeOn(Scheduler scheduler) { /** * Returns an Observable that emits the items emitted by the source ObservableSource or the items of an alternate * ObservableSource if the source ObservableSource is empty. + * *

*

*
Scheduler: