[JAVA-682] Add MongoClient class, to supersede existing Mongo class, with a default WriteConcern.ACKNOWLEDGED Created: 29/Oct/12  Updated: 27/Nov/12  Resolved: 16/Nov/12

Status: Closed
Project: Java Driver
Component/s: API
Affects Version/s: None
Fix Version/s: 2.10.0

Type: New Feature Priority: Major - P3
Reporter: Jeffrey Yemin Assignee: Jeffrey Yemin
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible

 Description   

Add a new class MongoClient with a default write concern of WriteConcern.ACKNOWLEDGED. Users of the Java driver should construct MongoClient instances in preference to Mongo instances.

To ease migration, MongoClient will extend the existing Mongo class. In order to ensure that the default write concern is always ACKNOWLEDGED, new companion classes, MongoClientOptions and MongoClientURI, will also be added.

MongoClientOptions differs from MongoOptions in that all fields will be final (and private), making it immutable. Instances of MongoClientOptions will be constructed with a static inner Builder class. MongoClientOptions will have a default write concern of WriteConcern.ACKNOWLEDGED.



 Comments   
Comment by auto [ 26/Nov/12 ]

Author:

{u'date': u'2012-11-26T12:58:14Z', u'email': u'jeff.yemin@10gen.com', u'name': u'Jeff Yemin'}

Message: Merge pull request #87 from iandaniel/master

JAVA-682: Improved comment of new connectionsPerHost default
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/5f218fc93ecf0ea33c0c1a25ca8444124b00649f

Comment by auto [ 19/Nov/12 ]

Author:

{u'date': u'2012-11-19T19:50:43Z', u'email': u'jeff.yemin@10gen.com', u'name': u'Jeff Yemin'}

Message: JAVA-682: All MongoClient constructors now get default options from MongoClientOptions instead of MongoOptions. So the job
of setting the default writeConcern is now delegated to MongoClientOptions instead of handled explicitly by MongoClient
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/a2ec2d9db5858d89cbad713345058f1435b75d86

Comment by auto [ 19/Nov/12 ]

Author:

{u'date': u'2012-11-19T16:34:52Z', u'email': u'jeff.yemin@10gen.com', u'name': u'Jeff Yemin'}

Message: JAVA-682: Changed MongoURI.getOptions() to return a cached instance, so as not to break clients that are mutating that instance before passing the MongoURI to a Mongo constructor
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/55342ac3d3ab640297cfdf807d73479ea45d91d8

Comment by auto [ 15/Nov/12 ]

Author:

{u'date': u'2012-11-14T19:59:40Z', u'email': u'jeff.yemin@10gen.com', u'name': u'Jeff Yemin'}

Message: JAVA-682: Added new constants for WriteConcern so transition away from 'safe'
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/59eacbff8041d7948cd77e3b6ae683e613725c05

Comment by auto [ 15/Nov/12 ]

Author:

{u'date': u'2012-11-13T22:30:35Z', u'email': u'jeff.yemin@10gen.com', u'name': u'Jeff Yemin'}

Message: JAVA-682: Updated DBCollection Javadoc to use MongoClient instead of Mongo
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/bd068d53b70c19f94b8d7cb23f1c24696e58e49c

Comment by auto [ 15/Nov/12 ]

Author:

{u'date': u'2012-11-11T17:37:43Z', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}

Message: JAVA-682: Added more assertions to testWriteConcern
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/95e38c1f0a0d8ef07c0cc5a6f619bfe2c1a9668e

Comment by auto [ 15/Nov/12 ]

Author:

{u'date': u'2012-11-11T17:19:51Z', u'email': u'jeff.yemin@10gen.com', u'name': u'Jeff Yemin'}

Message: JAVA-682: Updated WriteConcern Java doc
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/e012113ea022345f92892f4f2c1c210dbf8f4cff

Comment by auto [ 15/Nov/12 ]

Author:

{u'date': u'2012-10-31T21:35:13Z', u'email': u'jeff.yemin@10gen.com', u'name': u'Jeff Yemin'}

Message: JAVA-682: Added three new classes--MongoClient, MongoClientOptions, and MongoClientURI, all of which have a default write concern that waits
for acknowledgement of the write from the server. MongoClient extends Mongo so that it's easy to switch to it just by changing which class
is constructed. MongoClientOptions, unlike MongoOptions, is immutable and has a static inner Builder class for construction.
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/b4d0a6ee933b268f9ca0b890adc4aed1bf30e097

Generated at Thu Feb 08 08:52:50 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.