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

MongoBatchCursorAdapter with setBatchSize and getBatchSize

    • Type: Icon: New Feature New Feature
    • Resolution: Unresolved
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: Query Operations
    • None
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      We would like to implement an automatic adaption of the cursor size during iteration. But the sync-driver is not exposing the methods necessary.

      When using FindIterable or AggregateIterable .iterator() a new MongoBatchCursorAdapter instance is created. 

      But it hides the setBatchSize and getBatchSize methods of the BatchCursor, which it wraps.

      We can only use these methods using undesired reflection to access the private batchCursor field of the MongoBatchCursorAdapter

      It would be great to have these batch size methods available in the MongoBatchCursorAdapter.

       

            Assignee:
            Unassigned Unassigned
            Reporter:
            hed1wa3@bosch.com Dominik Herbst
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: