CatapultServer
v0.5.0.1 (Elephant)
|
Context for creating a mongo storage. More...
Public Member Functions | |
MongoStorageContext ()=default | |
Creates an empty storage context. More... | |
MongoStorageContext (const mongocxx::uri &uri, const std::string &databaseName, const std::shared_ptr< MongoBulkWriter > &pBulkWriter, MongoErrorPolicy::Mode errorPolicyMode) | |
MongoDatabase | createDatabaseConnection () |
Creates a mongo database connection. More... | |
MongoErrorPolicy | createCollectionErrorPolicy (const std::string &collectionName) |
Creates a mongo error policy for the collection with name collectionName. More... | |
MongoBulkWriter & | bulkWriter () const |
Gets the bulk writer. More... | |
Private Attributes | |
mongocxx::pool | m_connectionPool |
std::string | m_databaseName |
std::shared_ptr< MongoBulkWriter > | m_pBulkWriter |
MongoErrorPolicy::Mode | m_errorPolicyMode |
Context for creating a mongo storage.
|
default |
Creates an empty storage context.
|
inline |
Creates a storage context for a mongodb-based storage connected to uri storing inside database databaseName with the specified bulk writer (pBulkWriter) and error policy mode (errorPolicyMode).
|
inline |
Gets the bulk writer.
|
inline |
Creates a mongo error policy for the collection with name collectionName.
|
inline |
Creates a mongo database connection.
|
private |
|
private |
|
private |
|
private |