Class MongoClients

    • Method Detail

      • init

        public static void init​(MongoEmbeddedSettings mongoEmbeddedSettings)
        Initializes the mongod library for use.

        The library must be called at most once per process before calling create(MongoClientSettings).

        Parameters:
        mongoEmbeddedSettings - the settings for the embedded driver.
      • create

        public static MongoClient create​(MongoClientSettings mongoClientSettings)
        Creates a new client.
        Parameters:
        mongoClientSettings - the mongoClientSettings
        Returns:
        the client
      • close

        public static void close()
        Closes down the mongod library