@ SuppressWarnings ( "deprecation" ) public Datastore createDatastore ( final MongoClient mongoClient , final String dbName ) { return new DatastoreImpl ( this , mongoClient , dbName ) ; }
It is best to use a Mongo singleton instance here .