{"action":"created","comment":{"url":"https://api.github.com/repos/rozza/mongo-java-driver/pulls/comments/174925533","pull_request_review_id":104372525,"id":174925533,"diff_hunk":"@@ -0,0 +1,297 @@\n+/*\n+ * Copyright 2008-present MongoDB, Inc.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *   http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+\n+package com.mongodb.embedded;\n+\n+\n+import com.mongodb.ConnectionString;\n+import com.mongodb.MongoClientException;\n+import com.mongodb.MongoCredential;\n+import com.mongodb.annotations.Immutable;\n+import com.mongodb.annotations.NotThreadSafe;\n+import com.mongodb.event.CommandListener;\n+import org.bson.codecs.configuration.CodecRegistry;\n+\n+import java.io.UnsupportedEncodingException;\n+import java.net.URLDecoder;\n+import java.util.List;\n+\n+import static com.mongodb.assertions.Assertions.isTrue;\n+import static com.mongodb.assertions.Assertions.notNull;\n+import static java.lang.String.format;\n+\n+/**\n+ * Various settings to control the behavior of an Embedded {@code MongoClient}.\n+ *\n+ * @since 3.8\n+ * @mongodb.server.release 4.0\n+ */\n+@Immutable\n+public final class MongoClientSettings {\n+    private static final CodecRegistry DEFAULT_CODEC_REGISTRY = com.mongodb.MongoClientSettings.getDefaultCodecRegistry();\n+\n+    private final com.mongodb.MongoClientSettings wrappedMongoClientSettings;\n+    private final String dbPath;\n+    private final String libraryPath;\n+\n+    /**\n+     * Gets the default codec registry.  It includes the following providers:\n+     *\n+     * <ul>\n+     * <li>{@link org.bson.codecs.ValueCodecProvider}</li>\n+     * <li>{@link org.bson.codecs.BsonValueCodecProvider}</li>\n+     * <li>{@link com.mongodb.DBRefCodecProvider}</li>\n+     * <li>{@link com.mongodb.DBObjectCodecProvider}</li>\n+     * <li>{@link org.bson.codecs.DocumentCodecProvider}</li>\n+     * <li>{@link org.bson.codecs.IterableCodecProvider}</li>\n+     * <li>{@link org.bson.codecs.MapCodecProvider}</li>\n+     * <li>{@link com.mongodb.client.model.geojson.codecs.GeoJsonCodecProvider}</li>\n+     * <li>{@link com.mongodb.client.gridfs.codecs.GridFSFileCodecProvider}</li>\n+     * </ul>\n+     *\n+     * @return the default codec registry\n+     */\n+    public static CodecRegistry getDefaultCodecRegistry() {\n+        return DEFAULT_CODEC_REGISTRY;\n+    }\n+\n+    /**\n+     * Convenience method to create a Builder.\n+     *\n+     * @return a builder\n+     */\n+    public static Builder builder() {\n+        return new Builder();\n+    }\n+\n+    /**\n+     * Convenience method to create a from an existing {@code MongoClientSettings}.\n+     *\n+     * @param settings create a builder from existing settings\n+     * @return a builder\n+     */\n+    public static Builder builder(final MongoClientSettings settings) {\n+        return new Builder(settings);\n+    }\n+\n+    /**\n+     * A builder for {@code MongoClientSettings} so that {@code MongoClientSettings} can be immutable, and to support easier construction\n+     * through chaining.\n+     */\n+    @NotThreadSafe\n+    public static final class Builder {\n+        private com.mongodb.MongoClientSettings.Builder wrappedBuilder;\n+        private String dbPath;\n+        private String libraryPath;\n+\n+        private Builder() {\n+            wrappedBuilder = com.mongodb.MongoClientSettings.builder();\n+        }\n+\n+        private Builder(final MongoClientSettings settings) {\n+            notNull(\"settings\", settings);\n+            wrappedBuilder = com.mongodb.MongoClientSettings.builder(settings.wrappedMongoClientSettings);\n+            dbPath = settings.dbPath;\n+            libraryPath = settings.libraryPath;\n+        }\n+\n+        /**\n+         * Takes the settings from the given {@code ConnectionString} and applies them to the builder\n+         *\n+         * @param connectionString the connection string containing details of how to connect to MongoDB\n+         * @return this\n+         */\n+        public Builder applyConnectionString(final ConnectionString connectionString) {","path":"driver-core/src/main/com/mongodb/embedded/MongoClientSettings.java","position":117,"original_position":117,"commit_id":"2696f722c0f5def40c72e897b1e074c000f2985b","original_commit_id":"2696f722c0f5def40c72e897b1e074c000f2985b","user":{"login":"rozza","id":420,"avatar_url":"https://avatars0.githubusercontent.com/u/420?v=4","gravatar_id":"","url":"https://api.github.com/users/rozza","html_url":"https://github.com/rozza","followers_url":"https://api.github.com/users/rozza/followers","following_url":"https://api.github.com/users/rozza/following{/other_user}","gists_url":"https://api.github.com/users/rozza/gists{/gist_id}","starred_url":"https://api.github.com/users/rozza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rozza/subscriptions","organizations_url":"https://api.github.com/users/rozza/orgs","repos_url":"https://api.github.com/users/rozza/repos","events_url":"https://api.github.com/users/rozza/events{/privacy}","received_events_url":"https://api.github.com/users/rozza/received_events","type":"User","site_admin":false},"body":"Also appName will be used.","created_at":"2018-03-15T20:41:51Z","updated_at":"2018-03-15T20:41:51Z","html_url":"https://github.com/rozza/mongo-java-driver/pull/261#discussion_r174925533","pull_request_url":"https://api.github.com/repos/rozza/mongo-java-driver/pulls/261","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/rozza/mongo-java-driver/pulls/comments/174925533"},"html":{"href":"https://github.com/rozza/mongo-java-driver/pull/261#discussion_r174925533"},"pull_request":{"href":"https://api.github.com/repos/rozza/mongo-java-driver/pulls/261"}},"in_reply_to_id":174587597},"pull_request":{"url":"https://api.github.com/repos/rozza/mongo-java-driver/pulls/261","id":174700209,"html_url":"https://github.com/rozza/mongo-java-driver/pull/261","diff_url":"https://github.com/rozza/mongo-java-driver/pull/261.diff","patch_url":"https://github.com/rozza/mongo-java-driver/pull/261.patch","issue_url":"https://api.github.com/repos/rozza/mongo-java-driver/issues/261","number":261,"state":"open","locked":false,"title":"Initial embedded driver support","user":{"login":"rozza","id":420,"avatar_url":"https://avatars0.githubusercontent.com/u/420?v=4","gravatar_id":"","url":"https://api.github.com/users/rozza","html_url":"https://github.com/rozza","followers_url":"https://api.github.com/users/rozza/followers","following_url":"https://api.github.com/users/rozza/following{/other_user}","gists_url":"https://api.github.com/users/rozza/gists{/gist_id}","starred_url":"https://api.github.com/users/rozza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rozza/subscriptions","organizations_url":"https://api.github.com/users/rozza/orgs","repos_url":"https://api.github.com/users/rozza/repos","events_url":"https://api.github.com/users/rozza/events{/privacy}","received_events_url":"https://api.github.com/users/rozza/received_events","type":"User","site_admin":false},"body":"JAVA-2731","created_at":"2018-03-13T15:38:15Z","updated_at":"2018-03-15T20:41:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4739c599694ab2bd2dc3a3d8adda42a8fe6a51bc","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/rozza/mongo-java-driver/pulls/261/commits","review_comments_url":"https://api.github.com/repos/rozza/mongo-java-driver/pulls/261/comments","review_comment_url":"https://api.github.com/repos/rozza/mongo-java-driver/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rozza/mongo-java-driver/issues/261/comments","statuses_url":"https://api.github.com/repos/rozza/mongo-java-driver/statuses/2696f722c0f5def40c72e897b1e074c000f2985b","head":{"label":"rozza:embedded","ref":"embedded","sha":"2696f722c0f5def40c72e897b1e074c000f2985b","user":{"login":"rozza","id":420,"avatar_url":"https://avatars0.githubusercontent.com/u/420?v=4","gravatar_id":"","url":"https://api.github.com/users/rozza","html_url":"https://github.com/rozza","followers_url":"https://api.github.com/users/rozza/followers","following_url":"https://api.github.com/users/rozza/following{/other_user}","gists_url":"https://api.github.com/users/rozza/gists{/gist_id}","starred_url":"https://api.github.com/users/rozza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rozza/subscriptions","organizations_url":"https://api.github.com/users/rozza/orgs","repos_url":"https://api.github.com/users/rozza/repos","events_url":"https://api.github.com/users/rozza/events{/privacy}","received_events_url":"https://api.github.com/users/rozza/received_events","type":"User","site_admin":false},"repo":{"id":10246360,"name":"mongo-java-driver","full_name":"rozza/mongo-java-driver","owner":{"login":"rozza","id":420,"avatar_url":"https://avatars0.githubusercontent.com/u/420?v=4","gravatar_id":"","url":"https://api.github.com/users/rozza","html_url":"https://github.com/rozza","followers_url":"https://api.github.com/users/rozza/followers","following_url":"https://api.github.com/users/rozza/following{/other_user}","gists_url":"https://api.github.com/users/rozza/gists{/gist_id}","starred_url":"https://api.github.com/users/rozza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rozza/subscriptions","organizations_url":"https://api.github.com/users/rozza/orgs","repos_url":"https://api.github.com/users/rozza/repos","events_url":"https://api.github.com/users/rozza/events{/privacy}","received_events_url":"https://api.github.com/users/rozza/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rozza/mongo-java-driver","description":"java driver for mongo","fork":true,"url":"https://api.github.com/repos/rozza/mongo-java-driver","forks_url":"https://api.github.com/repos/rozza/mongo-java-driver/forks","keys_url":"https://api.github.com/repos/rozza/mongo-java-driver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rozza/mongo-java-driver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rozza/mongo-java-driver/teams","hooks_url":"https://api.github.com/repos/rozza/mongo-java-driver/hooks","issue_events_url":"https://api.github.com/repos/rozza/mongo-java-driver/issues/events{/number}","events_url":"https://api.github.com/repos/rozza/mongo-java-driver/events","assignees_url":"https://api.github.com/repos/rozza/mongo-java-driver/assignees{/user}","branches_url":"https://api.github.com/repos/rozza/mongo-java-driver/branches{/branch}","tags_url":"https://api.github.com/repos/rozza/mongo-java-driver/tags","blobs_url":"https://api.github.com/repos/rozza/mongo-java-driver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rozza/mongo-java-driver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rozza/mongo-java-driver/git/refs{/sha}","trees_url":"https://api.github.com/repos/rozza/mongo-java-driver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rozza/mongo-java-driver/statuses/{sha}","languages_url":"https://api.github.com/repos/rozza/mongo-java-driver/languages","stargazers_url":"https://api.github.com/repos/rozza/mongo-java-driver/stargazers","contributors_url":"https://api.github.com/repos/rozza/mongo-java-driver/contributors","subscribers_url":"https://api.github.com/repos/rozza/mongo-java-driver/subscribers","subscription_url":"https://api.github.com/repos/rozza/mongo-java-driver/subscription","commits_url":"https://api.github.com/repos/rozza/mongo-java-driver/commits{/sha}","git_commits_url":"https://api.github.com/repos/rozza/mongo-java-driver/git/commits{/sha}","comments_url":"https://api.github.com/repos/rozza/mongo-java-driver/comments{/number}","issue_comment_url":"https://api.github.com/repos/rozza/mongo-java-driver/issues/comments{/number}","contents_url":"https://api.github.com/repos/rozza/mongo-java-driver/contents/{+path}","compare_url":"https://api.github.com/repos/rozza/mongo-java-driver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rozza/mongo-java-driver/merges","archive_url":"https://api.github.com/repos/rozza/mongo-java-driver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rozza/mongo-java-driver/downloads","issues_url":"https://api.github.com/repos/rozza/mongo-java-driver/issues{/number}","pulls_url":"https://api.github.com/repos/rozza/mongo-java-driver/pulls{/number}","milestones_url":"https://api.github.com/repos/rozza/mongo-java-driver/milestones{/number}","notifications_url":"https://api.github.com/repos/rozza/mongo-java-driver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rozza/mongo-java-driver/labels{/name}","releases_url":"https://api.github.com/repos/rozza/mongo-java-driver/releases{/id}","deployments_url":"https://api.github.com/repos/rozza/mongo-java-driver/deployments","created_at":"2013-05-23T15:06:03Z","updated_at":"2018-02-14T15:28:00Z","pushed_at":"2018-03-15T11:47:50Z","git_url":"git://github.com/rozza/mongo-java-driver.git","ssh_url":"git@github.com:rozza/mongo-java-driver.git","clone_url":"https://github.com/rozza/mongo-java-driver.git","svn_url":"https://github.com/rozza/mongo-java-driver","homepage":"","size":48352,"stargazers_count":3,"watchers_count":3,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":3,"watchers":3,"default_branch":"master"}},"base":{"label":"rozza:master","ref":"master","sha":"ef117d329fb01676eb1233d2d0bc3ff1286c77c2","user":{"login":"rozza","id":420,"avatar_url":"https://avatars0.githubusercontent.com/u/420?v=4","gravatar_id":"","url":"https://api.github.com/users/rozza","html_url":"https://github.com/rozza","followers_url":"https://api.github.com/users/rozza/followers","following_url":"https://api.github.com/users/rozza/following{/other_user}","gists_url":"https://api.github.com/users/rozza/gists{/gist_id}","starred_url":"https://api.github.com/users/rozza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rozza/subscriptions","organizations_url":"https://api.github.com/users/rozza/orgs","repos_url":"https://api.github.com/users/rozza/repos","events_url":"https://api.github.com/users/rozza/events{/privacy}","received_events_url":"https://api.github.com/users/rozza/received_events","type":"User","site_admin":false},"repo":{"id":10246360,"name":"mongo-java-driver","full_name":"rozza/mongo-java-driver","owner":{"login":"rozza","id":420,"avatar_url":"https://avatars0.githubusercontent.com/u/420?v=4","gravatar_id":"","url":"https://api.github.com/users/rozza","html_url":"https://github.com/rozza","followers_url":"https://api.github.com/users/rozza/followers","following_url":"https://api.github.com/users/rozza/following{/other_user}","gists_url":"https://api.github.com/users/rozza/gists{/gist_id}","starred_url":"https://api.github.com/users/rozza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rozza/subscriptions","organizations_url":"https://api.github.com/users/rozza/orgs","repos_url":"https://api.github.com/users/rozza/repos","events_url":"https://api.github.com/users/rozza/events{/privacy}","received_events_url":"https://api.github.com/users/rozza/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rozza/mongo-java-driver","description":"java driver for mongo","fork":true,"url":"https://api.github.com/repos/rozza/mongo-java-driver","forks_url":"https://api.github.com/repos/rozza/mongo-java-driver/forks","keys_url":"https://api.github.com/repos/rozza/mongo-java-driver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rozza/mongo-java-driver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rozza/mongo-java-driver/teams","hooks_url":"https://api.github.com/repos/rozza/mongo-java-driver/hooks","issue_events_url":"https://api.github.com/repos/rozza/mongo-java-driver/issues/events{/number}","events_url":"https://api.github.com/repos/rozza/mongo-java-driver/events","assignees_url":"https://api.github.com/repos/rozza/mongo-java-driver/assignees{/user}","branches_url":"https://api.github.com/repos/rozza/mongo-java-driver/branches{/branch}","tags_url":"https://api.github.com/repos/rozza/mongo-java-driver/tags","blobs_url":"https://api.github.com/repos/rozza/mongo-java-driver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rozza/mongo-java-driver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rozza/mongo-java-driver/git/refs{/sha}","trees_url":"https://api.github.com/repos/rozza/mongo-java-driver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rozza/mongo-java-driver/statuses/{sha}","languages_url":"https://api.github.com/repos/rozza/mongo-java-driver/languages","stargazers_url":"https://api.github.com/repos/rozza/mongo-java-driver/stargazers","contributors_url":"https://api.github.com/repos/rozza/mongo-java-driver/contributors","subscribers_url":"https://api.github.com/repos/rozza/mongo-java-driver/subscribers","subscription_url":"https://api.github.com/repos/rozza/mongo-java-driver/subscription","commits_url":"https://api.github.com/repos/rozza/mongo-java-driver/commits{/sha}","git_commits_url":"https://api.github.com/repos/rozza/mongo-java-driver/git/commits{/sha}","comments_url":"https://api.github.com/repos/rozza/mongo-java-driver/comments{/number}","issue_comment_url":"https://api.github.com/repos/rozza/mongo-java-driver/issues/comments{/number}","contents_url":"https://api.github.com/repos/rozza/mongo-java-driver/contents/{+path}","compare_url":"https://api.github.com/repos/rozza/mongo-java-driver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rozza/mongo-java-driver/merges","archive_url":"https://api.github.com/repos/rozza/mongo-java-driver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rozza/mongo-java-driver/downloads","issues_url":"https://api.github.com/repos/rozza/mongo-java-driver/issues{/number}","pulls_url":"https://api.github.com/repos/rozza/mongo-java-driver/pulls{/number}","milestones_url":"https://api.github.com/repos/rozza/mongo-java-driver/milestones{/number}","notifications_url":"https://api.github.com/repos/rozza/mongo-java-driver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rozza/mongo-java-driver/labels{/name}","releases_url":"https://api.github.com/repos/rozza/mongo-java-driver/releases{/id}","deployments_url":"https://api.github.com/repos/rozza/mongo-java-driver/deployments","created_at":"2013-05-23T15:06:03Z","updated_at":"2018-02-14T15:28:00Z","pushed_at":"2018-03-15T11:47:50Z","git_url":"git://github.com/rozza/mongo-java-driver.git","ssh_url":"git@github.com:rozza/mongo-java-driver.git","clone_url":"https://github.com/rozza/mongo-java-driver.git","svn_url":"https://github.com/rozza/mongo-java-driver","homepage":"","size":48352,"stargazers_count":3,"watchers_count":3,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":3,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rozza/mongo-java-driver/pulls/261"},"html":{"href":"https://github.com/rozza/mongo-java-driver/pull/261"},"issue":{"href":"https://api.github.com/repos/rozza/mongo-java-driver/issues/261"},"comments":{"href":"https://api.github.com/repos/rozza/mongo-java-driver/issues/261/comments"},"review_comments":{"href":"https://api.github.com/repos/rozza/mongo-java-driver/pulls/261/comments"},"review_comment":{"href":"https://api.github.com/repos/rozza/mongo-java-driver/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rozza/mongo-java-driver/pulls/261/commits"},"statuses":{"href":"https://api.github.com/repos/rozza/mongo-java-driver/statuses/2696f722c0f5def40c72e897b1e074c000f2985b"}},"author_association":"OWNER"}}
{"actor":{"display_login":"rozza"}}