Fawkes API
Fawkes Development Version
|
#include <>>
Public Member Functions | |
MongoDBAspect (const char *config_prefix) | |
Constructor. More... | |
MongoDBAspect () | |
Constructor. More... | |
virtual | ~MongoDBAspect () |
Virtual empty destructor. More... | |
const std::string & | mongodb_config_name () const |
![]() | |
const std::list< const char * > & | get_aspects () const |
Get list of aspect names attached to a aspected thread. More... | |
Protected Attributes | |
mongocxx::client * | mongodb_client |
MongoDBConnCreator * | mongodb_connmgr |
Additional Inherited Members | |
![]() | |
void | add_aspect (const char *name) |
Add an aspect to a thread. More... | |
Thread aspect to access MongoDB. Give this aspect to your thread to gain access to MongoDB. This will setup the mongodb_client member with an active, auto-recovering connection to MongoDB (can be any kind of connection, single server, replicat set, or sync cluster).
fawkes::MongoDBAspect::MongoDBAspect | ( | const char * | config_name | ) |
Constructor.
config_name | optional configuration name from which the configuration for the database is read from the global configuration. |
Definition at line 64 of file mongodb.cpp.
fawkes::MongoDBAspect::MongoDBAspect | ( | ) |
Constructor.
Using this constructor will leave the mongodb_client member uninitialized. The mongodb_connmgr can be used to create connections at a later point in time.
Definition at line 74 of file mongodb.cpp.
|
virtual |
Virtual empty destructor.
Definition at line 80 of file mongodb.cpp.
|
inline |
|
protected |
MongoDB client to use to interact with the database. If database name, user and password were given to constructor, authentication has been executed (and only on success the aspect is considered to be successfully initialized).
Definition at line 57 of file mongodb.h.
Referenced by PointCloudDBRetrieveThread::init(), PointCloudDBMergeThread::init(), MongoLogPointCloudThread::init(), MongoLogImagesThread::init(), MongoRRDThread::loop(), MongoLogPointCloudThread::loop(), and MongoLogBlackboardThread::run().
|
protected |
Connection manager to retrieve more client connections from if necessary.
Definition at line 58 of file mongodb.h.
Referenced by MongoLogBlackboardThread::finalize(), MongoLogBlackboardThread::init(), and RobotMemoryThread::init().