[SERVER-79356] Refactor AutoGet* Options to use designated intialisers Created: 26/Jul/23  Updated: 18/Sep/23  Resolved: 18/Sep/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Yujin Kang Park Assignee: Yujin Kang Park
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-72646 The Options passed into AutoGet* cons... Closed
Assigned Teams:
Storage Execution
Sprint: Execution EMEA Team 2023-09-04, Execution EMEA Team 2023-10-02
Participants:

 Description   

We follow a pattern where the OptionsBase struct contains seemingly private members (e.g. _viewMode) with setter functions which emulate designated initialisers.

e.g. to initialise with a viewmode and a deadline.

AutoGetCollection::Options{}.viewMode(auto_get_collection::ViewMode::kViewsPermitted).deadline(someDeadline);

It is confusing because those members are not really private, and are being accessed when using the options. Now that we have designated initialisers we could improve how we initialise options.



 Comments   
Comment by Yujin Kang Park [ 18/Sep/23 ]

Closing out as this is a minor improvement to the API AutoGet* API which is being phased out in favour of acquisitions.

Generated at Thu Feb 08 06:40:46 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.