Calls close on each MongoClient instance and clears the HashMap.
Define a MongoClient db using a MongoClient instance.
Get a DB reference
Executes function f
with the mongo named name
.
Executes function f
with the mongo named name
.
Uses the default ConnectionIdentifier
Executes function f
with the mongo db named name
.
Executes function f
with the mongo db named name
.
Same as above except uses DefaultConnectionIdentifier
Executes function f
with the mongo named name
and
collection names collectionName
.
Executes function f
with the mongo named name
and
collection names collectionName
. Gets a collection for you.
Define and authenticate a Mongo db using a MongoClient instance.
Define and authenticate a Mongo db using a MongoClient instance.
(Since version 3.0) Credentials are now passed in via MongoClient
Same as above except uses DefaultConnectionIdentifier
Same as above except uses DefaultConnectionIdentifier
(Since version 3.0) No longer needed. See mongo-java-drivers's JavaDocs for details
Executes function f
with the mongo db named name
.
Executes function f
with the mongo db named name
. Uses the same socket
for the entire function block. Allows multiple operations on the same thread/socket connection
and the use of getLastError.
See: http://docs.mongodb.org/ecosystem/drivers/java-concurrency/
(Since version 3.0) No longer needed. See mongo-java-drivers's JavaDocs for details
Main Mongo object