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(ConnectionString connectionString)
Create a new client with the given connection string.
|
static MongoClient |
create(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.
|
static CodecRegistry |
getDefaultCodecRegistry()
Gets the default codec registry.
|
public static MongoClient create()
public static MongoClient create(MongoClientSettings settings)
settings
- the settingspublic static MongoClient create(String connectionString)
connectionString
- the connectionpublic static MongoClient create(ConnectionString connectionString)
connectionString
- the settingspublic static CodecRegistry getDefaultCodecRegistry()
MongoClientSettings.getCodecRegistry()
Copyright © 2016. All Rights Reserved.