22 #ifndef _PLUGINS_MONGODB_MONGODB_THREAD_H_ 23 #define _PLUGINS_MONGODB_MONGODB_THREAD_H_ 25 #include <aspect/aspect_provider.h> 26 #include <aspect/clock.h> 27 #include <aspect/configurable.h> 28 #include <aspect/logging.h> 29 #include <aspect/thread_producer.h> 30 #include <core/threading/thread.h> 31 #include <plugins/mongodb/aspect/mongodb_conncreator.h> 32 #include <plugins/mongodb/aspect/mongodb_inifin.h> 35 #include <mongo/client/dbclient.h> 62 virtual mongo::DBClientBase *
create_client(
const std::string &config_name =
"");
74 void init_client_configs();
75 void init_instance_configs();
76 void init_replicaset_configs();
79 std::map<std::string, std::shared_ptr<MongoDBClientConfig>> client_configs_;
80 std::map<std::string, std::shared_ptr<MongoDBInstanceConfig>> instance_configs_;
81 std::map<std::string, std::shared_ptr<MongoDBReplicaSetConfig>> replicaset_configs_;
Thread aspect that allows to obtain the current time from the clock.
virtual void finalize()
Finalize the thread.
Thread class encapsulation of pthreads.
virtual ~MongoDBThread()
Destructor.
virtual void loop()
Code to execute in the thread.
MongoDB replica set configuration.
MongoDBAspect initializer/finalizer.
Thread aspect to log output.
Interface for a MongoDB connection creator.
Aspect for thread producing threads.
Thread aspect provide a new aspect.
virtual mongo::DBClientBase * create_client(const std::string &config_name="")
Create a new MongoDB client.
Thread aspect to access configuration data.
MongoDBThread()
Constructor.
virtual void delete_client(mongo::DBClientBase *client)
Delete a client.
virtual void run()
Stub to see name in backtrace for easier debugging.
virtual void init()
Initialize the thread.