Class MongoClients


  • @Deprecated
    public final class MongoClients
    extends Object
    Deprecated.
    the embedded driver will be removed in the next major release
    A factory for MongoClient instances.
    Since:
    3.8
    See Also:
    MongoClient
    • Method Detail

      • init

        public static void init​(MongoEmbeddedSettings mongoEmbeddedSettings)
        Deprecated.
        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)
        Deprecated.
        Creates a new client.
        Parameters:
        mongoClientSettings - the mongoClientSettings
        Returns:
        the client
      • close

        public static void close()
        Deprecated.
        Closes down the mongod library