Yes, that's pretty much what I had mind with the comment above. Would you like to give it a go? That'd be great!
The problem would be to use addGlobalOption() to update the map
A problem in which way exactly? The calls to MongoDBGlobalContext#replicaSet() would add an option of a new type to the current configuration context (see MongoDBGlobalContextImpl for an example). Then in MongoDBDataStoreProvider the option value could be obtained.
API-wise, I kind of like the fluent approach:
configurable.configureOptionsFor( MongoDB.class ) .replicaSet()
.member( "host1" ) .member( "host2" )
.member( "host3", 27018 );
|