Skip to content

Commit 77a887b

Browse files
committed
javadocs: add @see links to wiki discussion of "Backpressure"; add marble diagrams for onBackpressureFoo() operators
1 parent a7953e6 commit 77a887b

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

rxjava-core/src/main/java/rx/Observable.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3947,6 +3947,7 @@ public final Integer call(Integer t1, T t2) {
39473947
* @return an Observable that omits items emitted by the source Observable that are followed by another item
39483948
* within a computed debounce duration
39493949
* @see <a href="https://github.com/Netflix/RxJava/wiki/Filtering-Observables#throttlewithtimeout-or-debounce">RxJava wiki: debounce</a>
3950+
* @see <a href="https://github.com/Netflix/RxJava/wiki/Backpressure">RxJava wiki: Backpressure</a>
39503951
* @see <a href="http://msdn.microsoft.com/en-us/library/system.reactive.linq.observable.throttle.aspx">MSDN: Observable.Throttle</a>
39513952
*/
39523953
public final <U> Observable<T> debounce(Func1<? super T, ? extends Observable<U>> debounceSelector) {
@@ -3985,6 +3986,7 @@ public final <U> Observable<T> debounce(Func1<? super T, ? extends Observable<U>
39853986
* @return an Observable that filters out items from the source Observable that are too quickly followed by
39863987
* newer items
39873988
* @see <a href="https://github.com/Netflix/RxJava/wiki/Filtering-Observables#throttlewithtimeout-or-debounce">RxJava wiki: debounce</a>
3989+
* @see <a href="https://github.com/Netflix/RxJava/wiki/Backpressure">RxJava wiki: Backpressure</a>
39883990
* @see <a href="http://msdn.microsoft.com/en-us/library/system.reactive.linq.observable.throttle.aspx">MSDN: Observable.Throttle</a>
39893991
* @see #throttleWithTimeout(long, TimeUnit)
39903992
*/
@@ -4027,6 +4029,7 @@ public final Observable<T> debounce(long timeout, TimeUnit unit) {
40274029
* @return an Observable that filters out items from the source Observable that are too quickly followed by
40284030
* newer items
40294031
* @see <a href="https://github.com/Netflix/RxJava/wiki/Filtering-Observables#throttlewithtimeout-or-debounce">RxJava wiki: debounce</a>
4032+
* @see <a href="https://github.com/Netflix/RxJava/wiki/Backpressure">RxJava wiki: Backpressure</a>
40304033
* @see <a href="http://msdn.microsoft.com/en-us/library/system.reactive.linq.observable.throttle.aspx">MSDN: Observable.Throttle</a>
40314034
* @see #throttleWithTimeout(long, TimeUnit, Scheduler)
40324035
*/
@@ -5503,6 +5506,8 @@ public final Boolean call(T t) {
55035506
/**
55045507
* Instructs an Observable that is emitting items faster than its observer can consume them to buffer these
55055508
* items indefinitely until they can be emitted.
5509+
* <p>
5510+
* <img width="640" height="300" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/bp.obp.buffer.png" alt="">
55065511
* <dl>
55075512
* <dt><b>Scheduler:</b></dt>
55085513
* <dd>{@code onBackpressureBuffer} does not operate by default on a particular {@link Scheduler}.</dd>
@@ -5520,6 +5525,8 @@ public final Observable<T> onBackpressureBuffer() {
55205525
* Use this operator when the upstream does not natively support backpressure and you wish to drop
55215526
* {@code onNext} when unable to handle further events.
55225527
* <p>
5528+
* <img width="640" height="245" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/bp.obp.drop.png" alt="">
5529+
* <p>
55235530
* If the downstream request count hits 0 then {@code onNext} will be dropped until {@code request(long n)}
55245531
* is invoked again to increase the request count.
55255532
* <dl>
@@ -6910,6 +6917,7 @@ public final Observable<T> retryWhen(Func1<? super Observable<? extends Notifica
69106917
* @return an Observable that emits the results of sampling the items emitted by the source Observable at
69116918
* the specified time interval
69126919
* @see <a href="https://github.com/Netflix/RxJava/wiki/Filtering-Observables#sample-or-throttlelast">RxJava wiki: sample</a>
6920+
* @see <a href="https://github.com/Netflix/RxJava/wiki/Backpressure">RxJava wiki: Backpressure</a>
69136921
* @see <a href="http://msdn.microsoft.com/en-us/library/system.reactive.linq.observable.sample.aspx">MSDN: Observable.Sample</a>
69146922
* @see #throttleLast(long, TimeUnit)
69156923
*/
@@ -6938,6 +6946,7 @@ public final Observable<T> sample(long period, TimeUnit unit) {
69386946
* @return an Observable that emits the results of sampling the items emitted by the source Observable at
69396947
* the specified time interval
69406948
* @see <a href="https://github.com/Netflix/RxJava/wiki/Filtering-Observables#sample-or-throttlelast">RxJava wiki: sample</a>
6949+
* @see <a href="https://github.com/Netflix/RxJava/wiki/Backpressure">RxJava wiki: Backpressure</a>
69416950
* @see <a href="http://msdn.microsoft.com/en-us/library/system.reactive.linq.observable.sample.aspx">MSDN: Observable.Sample</a>
69426951
* @see #throttleLast(long, TimeUnit, Scheduler)
69436952
*/
@@ -6964,6 +6973,7 @@ public final Observable<T> sample(long period, TimeUnit unit, Scheduler schedule
69646973
* @return an Observable that emits the results of sampling the items emitted by this Observable whenever
69656974
* the {@code sampler} Observable emits an item or completes
69666975
* @see <a href="https://github.com/Netflix/RxJava/wiki/Filtering-Observables#sample-or-throttlelast">RxJava wiki: sample</a>
6976+
* @see <a href="https://github.com/Netflix/RxJava/wiki/Backpressure">RxJava wiki: Backpressure</a>
69676977
* @see <a href="http://msdn.microsoft.com/en-us/library/system.reactive.linq.observable.sample.aspx">MSDN: Observable.Sample</a>
69686978
*/
69696979
public final <U> Observable<T> sample(Observable<U> sampler) {
@@ -8562,6 +8572,7 @@ public final Observable<T> takeWhileWithIndex(final Func2<? super T, ? super Int
85628572
* the unit of time of {@code windowDuration}
85638573
* @return an Observable that performs the throttle operation
85648574
* @see <a href="https://github.com/Netflix/RxJava/wiki/Filtering-Observables#throttlefirst">RxJava wiki: throttleFirst</a>
8575+
* @see <a href="https://github.com/Netflix/RxJava/wiki/Backpressure">RxJava wiki: Backpressure</a>
85658576
*/
85668577
public final Observable<T> throttleFirst(long windowDuration, TimeUnit unit) {
85678578
return lift(new OperatorThrottleFirst<T>(windowDuration, unit, Schedulers.computation()));
@@ -8591,6 +8602,7 @@ public final Observable<T> throttleFirst(long windowDuration, TimeUnit unit) {
85918602
* event
85928603
* @return an Observable that performs the throttle operation
85938604
* @see <a href="https://github.com/Netflix/RxJava/wiki/Filtering-Observables#throttlefirst">RxJava wiki: throttleFirst</a>
8605+
* @see <a href="https://github.com/Netflix/RxJava/wiki/Backpressure">RxJava wiki: Backpressure</a>
85948606
*/
85958607
public final Observable<T> throttleFirst(long skipDuration, TimeUnit unit, Scheduler scheduler) {
85968608
return lift(new OperatorThrottleFirst<T>(skipDuration, unit, scheduler));
@@ -8618,6 +8630,7 @@ public final Observable<T> throttleFirst(long skipDuration, TimeUnit unit, Sched
86188630
* the unit of time of {@code intervalDuration}
86198631
* @return an Observable that performs the throttle operation
86208632
* @see <a href="https://github.com/Netflix/RxJava/wiki/Filtering-Observables#sample-or-throttlelast">RxJava wiki: throttleLast</a>
8633+
* @see <a href="https://github.com/Netflix/RxJava/wiki/Backpressure">RxJava wiki: Backpressure</a>
86218634
* @see <a href="http://msdn.microsoft.com/en-us/library/system.reactive.linq.observable.sample.aspx">MSDN: Observable.Sample</a>
86228635
* @see #sample(long, TimeUnit)
86238636
*/
@@ -8650,6 +8663,7 @@ public final Observable<T> throttleLast(long intervalDuration, TimeUnit unit) {
86508663
* event
86518664
* @return an Observable that performs the throttle operation
86528665
* @see <a href="https://github.com/Netflix/RxJava/wiki/Filtering-Observables#sample-or-throttlelast">RxJava wiki: throttleLast</a>
8666+
* @see <a href="https://github.com/Netflix/RxJava/wiki/Backpressure">RxJava wiki: Backpressure</a>
86538667
* @see <a href="http://msdn.microsoft.com/en-us/library/system.reactive.linq.observable.sample.aspx">MSDN: Observable.Sample</a>
86548668
* @see #sample(long, TimeUnit, Scheduler)
86558669
*/
@@ -8688,6 +8702,7 @@ public final Observable<T> throttleLast(long intervalDuration, TimeUnit unit, Sc
86888702
* the {@link TimeUnit} of {@code timeout}
86898703
* @return an Observable that filters out items that are too quickly followed by newer items
86908704
* @see <a href="https://github.com/Netflix/RxJava/wiki/Filtering-Observables#throttlewithtimeout-or-debounce">RxJava wiki: throttleWithTimeout</a>
8705+
* @see <a href="https://github.com/Netflix/RxJava/wiki/Backpressure">RxJava wiki: Backpressure</a>
86918706
* @see <a href="http://msdn.microsoft.com/en-us/library/system.reactive.linq.observable.throttle.aspx">MSDN: Observable.Throttle</a>
86928707
* @see #debounce(long, TimeUnit)
86938708
*/
@@ -8730,6 +8745,7 @@ public final Observable<T> throttleWithTimeout(long timeout, TimeUnit unit) {
87308745
* item
87318746
* @return an Observable that filters out items that are too quickly followed by newer items
87328747
* @see <a href="https://github.com/Netflix/RxJava/wiki/Filtering-Observables#throttlewithtimeout-or-debounce">RxJava wiki: throttleWithTimeout</a>
8748+
* @see <a href="https://github.com/Netflix/RxJava/wiki/Backpressure">RxJava wiki: Backpressure</a>
87338749
* @see <a href="http://msdn.microsoft.com/en-us/library/system.reactive.linq.observable.throttle.aspx">MSDN: Observable.Throttle</a>
87348750
* @see #debounce(long, TimeUnit, Scheduler)
87358751
*/

0 commit comments

Comments
 (0)