public interface MongoDB
Modifier and Type | Method and Description |
---|---|
com.mongodb.DB |
getDefaultMongoDb()
Obtain a shared instance of the MongoDB database connection object connected
to the default database
|
com.mongodb.DB |
getMongoDb(String dbname)
Obtain a shared instance of the MongoDB database connection object for the
specific database
|
com.mongodb.DB getDefaultMongoDb()
DB
connection objectcom.mongodb.DB getMongoDb(String dbname)
dbname
- the database name to connect toDB
connection object${project.version} - Copyright © 2003-2015 The Apache Software Foundation.