Close a client connection, without removing it from the internal map.
Close a client connection, without removing it from the internal map.
Get a CodecRegistry from a MongoDatabase.
Get a CodecRegistry from a MongoDatabase.
Get a MongoCollection from a MongoDatabase.
Get a MongoCollection from a MongoDatabase. TODO(jacob): We should get rid of the option to send down a read preference here and just use the one on the query.
Get a MongoDatabase from a MongoClient.
Get a MongoDatabase from a MongoClient.
Close all clients and clear the internal map.
Get a set of all connection ids handled by this client manager.
Executes the given function with the specified database.
Executes the given function with the specified database. Throws if the database does not exist.
Executes the given function with the specified database and collection.
Executes the given function with the specified database and collection. Throws if the database does not exist.
Manages mongo connections and provides access to the client objects. This class is modeled after lift's MongoDB singleton, but in a way that abstracts out the type of client used (async vs blocking). Users must implement closeClient, getCodecRegistry, getDatabase, and getCollection.