[JAVA-1268] Implement back pressure for asynchronous cursor Created: 10/Jun/14  Updated: 31/Mar/15  Resolved: 15/Jan/15

Status: Closed
Project: Java Driver
Component/s: Async, Query Operations
Affects Version/s: None
Fix Version/s: 3.0.0

Type: New Feature Priority: Major - P3
Reporter: Jeffrey Yemin Assignee: Ross Lawley
Resolution: Done Votes: 0
Labels: None
Σ Remaining Estimate: Not Specified Remaining Estimate: Not Specified
Σ Time Spent: Not Specified Time Spent: Not Specified
Σ Original Estimate: Not Specified Original Estimate: Not Specified

Issue Links:
Related
related to JAVA-1259 Ensure Async cursors can be cancelled Closed
Sub-Tasks:
Key
Summary
Type
Status
Assignee
JAVA-1556 Ensure first() uses the batch cursor ... Sub-task Closed  
Epic Link: Async

 Description   

Currently there is no way to pause the firehose of documents returned by asynchronous iteration of a cursor.

One possibility is to extend MongoFuture with MongoCursorFuture, and add appropriate methods there to implement back pressure:

public interface MongoCursorFuture extends MongoFuture<Void> {
   void requestMore(int howMany);
}

*Update*
Should follow the http://www.reactive-streams.org/ spec once 0.4 is out of milestone



 Comments   
Comment by Jeffrey Yemin [ 31/Mar/15 ]

Closing all resolved 3.0.0 issues, as 3.0.0 has been tagged and released.

Comment by Githook User [ 30/Jan/15 ]

Author:

{u'username': u'rozza', u'name': u'Ross Lawley', u'email': u'ross.lawley@gmail.com'}

Message: Added batchCursor method to the async MongoIterable

Allows users fine grained control over the cursor. They can
implement their own backpressure logic and cancel the cursor
as they need.

JAVA-1259 JAVA-1268
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/52dd64229932ce83acdb9a63f47ce198e89fec94

Comment by Githook User [ 15/Jan/15 ]

Author:

{u'username': u'rozza', u'name': u'Ross Lawley', u'email': u'ross.lawley@gmail.com'}

Message: Added batchCursor method to the async MongoIterable

Allows users fine grained control over the cursor. They can
implement their own backpressure logic and cancel the cursor
as they need.

JAVA-1259 JAVA-1268
Branch: 3.0.x
https://github.com/mongodb/mongo-java-driver/commit/52dd64229932ce83acdb9a63f47ce198e89fec94

Generated at Thu Feb 08 08:54:12 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.