public final class MongoClients extends Object
MongoClient
instances.MongoClient
Modifier and Type | Method | Description |
---|---|---|
static void |
close() |
Closes down the mongod library
|
static MongoClient |
create(MongoClientSettings mongoClientSettings) |
Creates a new client.
|
static void |
init(MongoEmbeddedSettings mongoEmbeddedSettings) |
Initializes the mongod library for use.
|
public static void init(MongoEmbeddedSettings mongoEmbeddedSettings)
The library must be called at most once per process before calling create(MongoClientSettings)
.
mongoEmbeddedSettings
- the settings for the embedded driver.public static MongoClient create(MongoClientSettings mongoClientSettings)
mongoClientSettings
- the mongoClientSettingspublic static void close()