Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-1268

Implement back pressure for asynchronous cursor

    XMLWordPrintableJSON

Details

    • Icon: New Feature New Feature
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 3.0.0
    • None
    • Async, Query Operations
    • None

    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

      Attachments

        Activity

          People

            ross@mongodb.com Ross Lawley
            jeff.yemin@mongodb.com Jeffrey Yemin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: