Fawkes API
Fawkes Development Version
|
Thread aspect to access MongoDB. More...
#include <>>
Public Member Functions | |
MongoDBAspect (const char *config_prefix=0) | |
Constructor. More... | |
virtual | ~MongoDBAspect () |
Virtual empty destructor. More... | |
const char * | mongodb_config_name () const |
Get MongoDB configuration name. More... | |
![]() | |
const std::list< const char * > & | get_aspects () const |
Get list of aspect names attached to a aspected thread. More... | |
Protected Attributes | |
mongo::DBClientBase * | mongodb_client |
MongoDB client to use to interact with the database. More... | |
MongoDBConnCreator * | mongodb_connmgr |
Connection manager to retrieve more client connections from if necessary. More... | |
Friends | |
class | MongoDBAspectIniFin |
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 = 0 | ) |
Constructor.
config_name | optional configuration name from which the configuration for the database is read from the global configuration. |
Definition at line 68 of file mongodb.cpp.
References fawkes::Aspect::add_aspect().
|
virtual |
Virtual empty destructor.
Definition at line 76 of file mongodb.cpp.
References mongodb_client, and mongodb_connmgr.
|
inline |
Get MongoDB configuration name.
Definition at line 48 of file mongodb.h.
Referenced by fawkes::MongoDBAspectIniFin::init().
|
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 51 of file mongodb.h.
Referenced by fawkes::MongoDBAspectIniFin::finalize(), PointCloudDBRetrieveThread::init(), PointCloudDBMergeThread::init(), MongoLogImagesThread::init(), MongoLogPointCloudThread::init(), MongoLogLoggerThread::log_error(), MongoRRDThread::loop(), MongoLogLoggerThread::loop(), MongoLogTransformsThread::loop(), PointCloudDBStoreThread::loop(), MongoLogPointCloudThread::loop(), MongoLogBlackboardThread::run(), and ~MongoDBAspect().
|
protected |
Connection manager to retrieve more client connections from if necessary.
Definition at line 52 of file mongodb.h.
Referenced by MongoLogBlackboardThread::bb_interface_created(), MongoLogBlackboardThread::finalize(), MongoLogBlackboardThread::init(), and ~MongoDBAspect().