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 66 of file mongodb.cpp.
References fawkes::Aspect::add_aspect().
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 76 of file mongodb.cpp.
|
virtual |
Virtual empty destructor.
Definition at line 82 of file mongodb.cpp.
References mongodb_client, and mongodb_connmgr.
|
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 59 of file mongodb.h.
Referenced by PointCloudDBRetrieveThread::init(), PointCloudDBMergeThread::init(), MongoLogPointCloudThread::init(), MongoLogImagesThread::init(), MongoRRDThread::loop(), MongoLogBlackboardThread::run(), and ~MongoDBAspect().
|
protected |
Connection manager to retrieve more client connections from if necessary.
Definition at line 60 of file mongodb.h.
Referenced by MongoLogBlackboardThread::finalize(), MongoLogBlackboardThread::init(), RobotMemoryThread::init(), and ~MongoDBAspect().