annotate Framework/Plugins/DatabaseBackendAdapterV3.h @ 249:7f5ee2b42a86

better performance warnings
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 14 Apr 2021 10:07:14 +0200
parents d1b124d116c1
children 16aac0287485
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
212
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 /**
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 * Orthanc - A Lightweight, RESTful DICOM Store
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 * Department, University Hospital of Liege, Belgium
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5 * Copyright (C) 2017-2021 Osimis S.A., Belgium
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 *
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 * This program is free software: you can redistribute it and/or
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 * modify it under the terms of the GNU Affero General Public License
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 * as published by the Free Software Foundation, either version 3 of
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 * the License, or (at your option) any later version.
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 *
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 * This program is distributed in the hope that it will be useful, but
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 * Affero General Public License for more details.
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 *
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 * You should have received a copy of the GNU Affero General Public License
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 **/
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 #pragma once
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 #include "IndexBackend.h"
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 #if defined(ORTHANC_PLUGINS_VERSION_IS_ABOVE) // Macro introduced in Orthanc 1.3.1
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 # if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 9, 2)
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 namespace OrthancDatabases
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32 {
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 /**
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 * @brief Bridge between C and C++ database engines.
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 *
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 * Class creating the bridge between the C low-level primitives for
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 * custom database engines, and the high-level IDatabaseBackend C++
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 * interface, for Orthanc >= 1.9.2.
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 **/
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40 class DatabaseBackendAdapterV3
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 {
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 private:
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43 class Output;
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 // This class cannot be instantiated
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 DatabaseBackendAdapterV3()
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 {
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48 }
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50 public:
225
94c9908e6aca removed DatabaseManager member out of class IndexBackend
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 222
diff changeset
51 class Adapter;
212
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52 class Transaction;
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54 class Factory : public IDatabaseBackendOutput::IFactory
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55 {
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56 public:
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57 virtual IDatabaseBackendOutput* CreateOutput() ORTHANC_OVERRIDE;
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58 };
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59
234
d1b124d116c1 PostgreSQL index plugin handles retries for collisions between multiple writers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 225
diff changeset
60 static void Register(IndexBackend* backend,
d1b124d116c1 PostgreSQL index plugin handles retries for collisions between multiple writers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 225
diff changeset
61 size_t countConnections,
d1b124d116c1 PostgreSQL index plugin handles retries for collisions between multiple writers
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 225
diff changeset
62 unsigned int maxDatabaseRetries);
222
c8e06b41feec refactoring registration/finalization of index backend
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 212
diff changeset
63
c8e06b41feec refactoring registration/finalization of index backend
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 212
diff changeset
64 static void Finalize();
212
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
65 };
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
66 }
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
67
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
68 # endif
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
69 #endif