File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
driver-async/src/main/com/mongodb/async/client Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change 35
35
* @since 3.0
36
36
*/
37
37
public final class MongoClients {
38
+
39
+ /**
40
+ * Creates a new client with the default connection string "mongodb://localhost".
41
+ *
42
+ * @return the client
43
+ */
44
+ public static MongoClient create () {
45
+ return create (new ConnectionString ("mongodb://localhost" ));
46
+ }
47
+
38
48
/**
39
49
* Create a new client with the given client settings.
40
50
*
@@ -45,6 +55,16 @@ public static MongoClient create(final MongoClientSettings settings) {
45
55
return new MongoClientImpl (settings , createCluster (settings , getStreamFactory (settings )));
46
56
}
47
57
58
+ /**
59
+ * Create a new client with the given connection string.
60
+ *
61
+ * @param connectionString the connection
62
+ * @return the client
63
+ */
64
+ public static MongoClient create (final String connectionString ) {
65
+ return create (new ConnectionString (connectionString ));
66
+ }
67
+
48
68
/**
49
69
* Create a new client with the given connection string.
50
70
*
You can’t perform that action at this time.
0 commit comments