public static synchronized void init ( final MongoEmbeddedSettings mongoEmbeddedSettings ) { if ( mongoEmbeddedLibrary != null ) { throw new MongoClientEmbeddedException ( "The mongo embedded library has already been initialized" ) ; } try { mongoEmbeddedLibrary = MongoEmbeddedCAPI . create ( mongoEmbeddedSettings . getYamlConfig ( ) , mongoEmbeddedSettings . getLogLevel ( ) . toCapiLogLevel ( ) , mongoEmbeddedSettings . getLibraryPath ( ) ) ; } catch ( Exception e ) { throw new MongoClientEmbeddedException ( format ( "The mongo embedded library could not be initialized%n" + "Server error message: %s" , e . getMessage ( ) ) , e ) ; } }
Initializes the mongod library for use .