-
Type:
Improvement
-
Resolution: Done
-
Priority:
Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: Configuration
-
None
-
None
-
Fully Compatible
-
None
-
None
-
None
-
None
-
None
-
None
Currently MongoClientURI can be created either from String or String + MongoClientOptions.Builder and can't be created from existing MongoClientURI with some alterations.
I propose adding a builder (public static inner class in MongoClientURI would be OK, I think) with convenience static methods like MongoClientURI.builder() and MongoClientURI.builder(MongoClientURI from).
Builder itself would have convenient methods like hosts(String...), hosts(List<String>), database(String), collection(String), username(String), password(char[]) and a number of methods for standard options, present in ConnectionString/MongoClientURI.
If this proposal is acceptable, I'll publish prototype on github.