public final class MongoClients extends Object
Modifier and Type | Method and Description |
---|---|
static MongoClient |
create()
Creates a new client with the default connection string "mongodb://localhost".
|
static MongoClient |
create(com.mongodb.ConnectionString connectionString)
Create a new client with the given connection string.
|
static MongoClient |
create(com.mongodb.async.client.MongoClientSettings settings)
Create a new client with the given client settings.
|
static MongoClient |
create(String connectionString)
Create a new client with the given connection string.
|
public static MongoClient create()
public static MongoClient create(com.mongodb.async.client.MongoClientSettings settings)
settings
- the settingspublic static MongoClient create(String connectionString)
connectionString
- the connectionpublic static MongoClient create(com.mongodb.ConnectionString connectionString)
connectionString
- the settings