#include <mongocxx/v_noabi/mongocxx/pool.hpp>
A pool of reusable client objects connected to the same MongoDB topology.
- Important
- This class does NOT implement Connection Monitoring and Pooling (MongoDB Specifications).
For interoperability with other MongoDB drivers, the minimum and maximum number of connections in the pool is configured using the 'minPoolSize' and 'maxPoolSize' connection string options.
- See also
-
|
| class | entry |
| | An owning handle to a client obtained from a pool. More...
|
◆ pool()
Creates a pool associated with a connection string.
- Parameters
-
| mongodb_uri | A MongoDB URI representing the connection parameters |
| options | Options to use when connecting to the MongoDB deployment. |
- Exceptions
-
◆ ~pool()
◆ acquire()
Acquires a client from the pool. The calling thread will block until a connection is available.
◆ append_metadata()
Append client metadata to the handshake command sent as part of the initial connection handshake.
- Parameters
-
| name | The name of the wrapping driver. Must not be empty. |
| version | The optional version of the wrapping driver. |
| platform | The optional information about the current platform, for example configure options or compile flags. |
- Exceptions
-
| mongocxx::v_noabi::operation_exception | when one of the following occurs:
- The resulting handshake document would exceed the size limit.
- A string argument contains the metadata delimiter " / ".
|
- See also
-
◆ try_acquire()
Acquires a client from the pool. This method will return immediately, but may return a disengaged optional if a client is not available.
The documentation for this class was generated from the following file: