-
Type: Improvement
-
Resolution: Gone away
-
Priority: Major - P3
-
None
-
Affects Version/s: 4.2.1
-
Component/s: API
-
None
-
Fully Compatible
-
- 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.
-
- 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