annotate Framework/Plugins/DatabaseBackendAdapterV3.h @ 395:a7a029043670 db-protobuf

integration mainline->db-protobuf
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 05 Apr 2023 14:53:57 +0200
parents 3d6886f3e5b3
children ecd0b719cff5
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
389
3d6886f3e5b3 upgrade to year 2023
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 375
diff changeset
5 * Copyright (C) 2017-2023 Osimis S.A., Belgium
3d6886f3e5b3 upgrade to year 2023
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 375
diff changeset
6 * Copyright (C) 2021-2023 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
212
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 *
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 * This program is free software: you can redistribute it and/or
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 * modify it under the terms of the GNU Affero General Public License
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 * as published by the Free Software Foundation, either version 3 of
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 * the License, or (at your option) any later version.
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 *
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 * This program is distributed in the hope that it will be useful, but
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 * Affero General Public License for more details.
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 *
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 * You should have received a copy of the GNU Affero General Public License
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
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
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 #pragma once
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 #include "IndexBackend.h"
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 #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
30 # if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 9, 2)
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32 namespace OrthancDatabases
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 {
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 /**
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 * @brief Bridge between C and C++ database engines.
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 *
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 * Class creating the bridge between the C low-level primitives for
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 * custom database engines, and the high-level IDatabaseBackend C++
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 * interface, for Orthanc >= 1.9.2.
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40 **/
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 class DatabaseBackendAdapterV3
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 {
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43 private:
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44 class Output;
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 // This class cannot be instantiated
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 DatabaseBackendAdapterV3()
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
821d4ba83dc3 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51 public:
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