Skip to content

Commit 1f98875

Browse files
committed
Merge pull request #3684 from akarnokd/ProducerJavadoc1x
1.x: javadoc for Producer
2 parents 0a8b7bc + d827eb4 commit 1f98875

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/main/java/rx/Producer.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,16 @@
1616
package rx;
1717

1818
/**
19-
* @warn javadoc description missing
19+
* Interface that establishes a request-channel between an Observable and a Subscriber and allows
20+
* the Subscriber to request a certain amount of items from the Observable (otherwise known as
21+
* backpressure).
22+
*
23+
* <p>The request amount only affects calls to {@link Subscriber#onNext(Object)}; onError and onCompleted may appear without
24+
* requrests.
25+
*
26+
* <p>However, backpressure is somewhat optional in RxJava 1.x and Subscribers may not
27+
* receive a Producer via their {@link Subscriber#setProducer(Producer)} method and will run
28+
* in unbounded mode. Depending on the chain of operators, this can lead to {@link rx.exceptions.MissingBackpressureException}.
2029
*/
2130
public interface Producer {
2231

@@ -36,6 +45,7 @@ public interface Producer {
3645
*
3746
* @param n the maximum number of items you want this Producer to produce, or {@code Long.MAX_VALUE} if you
3847
* want the Producer to produce items at its own pace
48+
* @throws IllegalArgumentException if the request amount is negative
3949
*/
4050
void request(long n);
4151

0 commit comments

Comments
 (0)