Skip to content

Commit 88b41cb

Browse files
committed
Javadocs for MissingBackpressureException (#1800)
1 parent bf6e89b commit 88b41cb

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

src/main/java/rx/exceptions/MissingBackpressureException.java

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,28 @@
1515
*/
1616
package rx.exceptions;
1717

18+
/**
19+
* {@code MissingBackpressureException} indicates that a Subscriber or operator attempted to apply reactive pull
20+
* backpressure to an Observable that does not implement it.
21+
* <p>
22+
* If an Observable has not been written to support reactive pull backpressure (such support is not a
23+
* requirement for Observables), you can apply one of the following operators to it, each of which forces a
24+
* simple form of backpressure behavior:
25+
* <dl>
26+
* <dt><code>onBackpressureBuffer</code></dt>
27+
* <dd>maintains a buffer of all emissions from the source Observable and emits them to downstream Subscribers
28+
* according to the requests they generate</dd>
29+
* <dt><code>onBackpressureDrop</code></dt>
30+
* <dd>drops emissions from the source Observable unless there is a pending request from a downstream
31+
* Subscriber, in which case it will emit enough items to fulfill the request</dd>
32+
* </dl>
33+
* If you do not apply either of these operators to an Observable that does not support backpressure, and if
34+
* either you as the Subscriber or some operator between you and the Observable attempts to apply reactive pull
35+
* backpressure, you will encounter a {@code MissingBackpressureException} which you will be notified of via
36+
* your {@code onError} callback.
37+
*
38+
* @see <a href="https://github.com/ReactiveX/RxJava/wiki/Backpressure">RxJava wiki: Backpressure</a>
39+
*/
1840
public class MissingBackpressureException extends Exception {
1941

2042
private static final long serialVersionUID = 7250870679677032194L;

0 commit comments

Comments
 (0)