public class MongoDBImpl extends Object implements MongoDB, ThreadCleanupListener
MongoDB| Constructor and Description |
|---|
MongoDBImpl(org.slf4j.Logger logger,
MongoDBSource mongoDBSource,
String defaultDbName,
boolean consistentRequest,
boolean secureMode,
String dbUsername,
String dbPassword) |
| 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
|
void |
threadDidCleanup()
Invoked by
PerthreadManager service when a thread performs and
end-of-request cleanup. |
public MongoDBImpl(org.slf4j.Logger logger, MongoDBSource mongoDBSource, String defaultDbName, boolean consistentRequest, boolean secureMode, String dbUsername, String dbPassword)
public com.mongodb.DB getDefaultMongoDb()
MongoDBgetDefaultMongoDb in interface MongoDBDB connection objectpublic com.mongodb.DB getMongoDb(String dbname)
MongoDBgetMongoDb in interface MongoDBdbname - the database name to connect toDB connection objectpublic void threadDidCleanup()
ThreadCleanupListenerPerthreadManager service when a thread performs and
end-of-request cleanup.threadDidCleanup in interface ThreadCleanupListener5.6.4 - Copyright © 2003-2021 The Apache Software Foundation.