-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Unknown
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
Currently MongoDefaults is available only on the Driver level which makes unavailable to get these values on the Core level. The Core analog for this class is MongoInternalDefaults. The Bson level has his own class as well.
Also, the above classes are public(except of MongoInternalDefaults) and mutable which has no a lot of sense since the default values are not supposed to be changed. We should define how we should handle this behavior.
Options that we discussed:
- Remove `MongoInternalDefaults` and move MongoDefaults on the Core level which will make it available everywhere on Core and higher levels
- In this approach, we can consider formatting like grouping all consts by purpose to the nested classes like: Defaults.SDAM.XXX, Defaults.CMAP.XXX
- Remove all these classes and instead place these values as consts into appropriated setting classes. For example: connection pool related properties can be put into ConnectionPoolSettings
Regardless the taken solution, the new approach should be internal and not be exposed for users. Additionally it makes sense to mark current classes with default settings as obsolete