File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 1616package  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 */ 
2130public  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
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments