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

Expose a new parameter to pass FindOptions for find operations in MongoCollection

    • Type: Icon: Improvement Improvement
    • Resolution: Gone away
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 4.2.1
    • Component/s: API
    • Labels:
      None
    • Fully Compatible

        1. Motivation ##

      The constructor of  com.mongodb.reactivestreams.client.internal.FindPublisherImpl#FindPublisherImpl creates a new instance of FindOptions, which is a waste of memory.

      And MongoCollection doesn't allow developers to pass the instance of FindOptions (while update/count/delete operations allow passing their options)

      We want to pass our own FindOptions instance to avoid recreating the same FindOptions instance.

        1. Solution ##

      1. Expose a new parameter to pass FindOptions for find operations in MongoCollection

      2. Allow pass custom FindOptions to com.mongodb.reactivestreams.client.internal.FindPublisherImpl#FindPublisherImpl

            Assignee:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Reporter:
            eurekajameschen@gmail.com James Chen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: