comparison Framework/Plugins/IndexConnectionsPool.h @ 375:824d70ce85ff db-protobuf

implemented database operations
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 28 Mar 2023 18:11:27 +0200
parents 4a3985088723
children 3d6886f3e5b3
comparison
equal deleted inserted replaced
374:4a3985088723 375:824d70ce85ff
24 24
25 #include "IndexBackend.h" 25 #include "IndexBackend.h"
26 26
27 #include <MultiThreading/SharedMessageQueue.h> 27 #include <MultiThreading/SharedMessageQueue.h>
28 28
29 #include <list>
30
29 namespace OrthancDatabases 31 namespace OrthancDatabases
30 { 32 {
31 class IndexConnectionsPool : public boost::noncopyable 33 class IndexConnectionsPool : public boost::noncopyable
32 { 34 {
33 private: 35 private:
39 size_t countConnections_; 41 size_t countConnections_;
40 std::list<DatabaseManager*> connections_; 42 std::list<DatabaseManager*> connections_;
41 Orthanc::SharedMessageQueue availableConnections_; 43 Orthanc::SharedMessageQueue availableConnections_;
42 44
43 public: 45 public:
44 IndexConnectionsPool(IndexBackend* backend, 46 IndexConnectionsPool(IndexBackend* backend /* takes ownership */,
45 size_t countConnections); 47 size_t countConnections);
46 48
47 ~IndexConnectionsPool(); 49 ~IndexConnectionsPool();
48 50
49 OrthancPluginContext* GetContext() const 51 OrthancPluginContext* GetContext() const