Mercurial > hg > orthanc
annotate OrthancServer/Sources/ServerIndex.h @ 4582:fb0379abb4a7 db-changes
assume that "GetDatabaseVersion()" can run out of a database transaction
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 09 Mar 2021 15:25:17 +0100 |
parents | bb3c82b8f373 |
children | 42a846166fa3 |
rev | line source |
---|---|
0 | 1 /** |
62 | 2 * Orthanc - A Lightweight, RESTful DICOM Store |
1900 | 3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
1288
6e7e5ed91c2d
upgrade to year 2015
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1286
diff
changeset
|
4 * Department, University Hospital of Liege, Belgium |
4437
d9473bd5ed43
upgrade to year 2021
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4205
diff
changeset
|
5 * Copyright (C) 2017-2021 Osimis S.A., Belgium |
0 | 6 * |
7 * This program is free software: you can redistribute it and/or | |
8 * modify it under the terms of the GNU General Public License as | |
9 * published by the Free Software Foundation, either version 3 of the | |
10 * License, or (at your option) any later version. | |
136 | 11 * |
12 * In addition, as a special exception, the copyright holders of this | |
13 * program give permission to link the code of its release with the | |
14 * OpenSSL project's "OpenSSL" library (or with modified versions of it | |
15 * that use the same license as the "OpenSSL" library), and distribute | |
16 * the linked executables. You must obey the GNU General Public License | |
17 * in all respects for all of the code used other than "OpenSSL". If you | |
18 * modify file(s) with this exception, you may extend this exception to | |
19 * your version of the file(s), but you are not obligated to do so. If | |
20 * you do not wish to do so, delete this exception statement from your | |
21 * version. If you delete this exception statement from all source files | |
22 * in the program, then also delete it here. | |
0 | 23 * |
24 * This program is distributed in the hope that it will be useful, but | |
25 * WITHOUT ANY WARRANTY; without even the implied warranty of | |
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
27 * General Public License for more details. | |
28 * | |
29 * You should have received a copy of the GNU General Public License | |
30 * along with this program. If not, see <http://www.gnu.org/licenses/>. | |
31 **/ | |
32 | |
33 | |
34 #pragma once | |
35 | |
4045 | 36 #include "../../OrthancFramework/Sources/Cache/LeastRecentlyUsedIndex.h" |
37 #include "../../OrthancFramework/Sources/DicomFormat/DicomMap.h" | |
3094
61da3c9b4121
cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3093
diff
changeset
|
38 |
61da3c9b4121
cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3093
diff
changeset
|
39 #include "Database/IDatabaseWrapper.h" |
4506
ac69c9f76c71
refactoring ServerIndex::Store()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4505
diff
changeset
|
40 #include "DicomInstanceOrigin.h" |
3094
61da3c9b4121
cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3093
diff
changeset
|
41 |
0 | 42 #include <boost/thread.hpp> |
220 | 43 #include <boost/noncopyable.hpp> |
186
f68c039b0571
preparing refactoring of ServerIndex
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
183
diff
changeset
|
44 |
62 | 45 namespace Orthanc |
0 | 46 { |
3094
61da3c9b4121
cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3093
diff
changeset
|
47 class DatabaseLookup; |
2209
e3fd5bc429a2
URI to reconstruct the main DICOM tags, the JSON summary and the metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2188
diff
changeset
|
48 class ParsedDicomFile; |
3094
61da3c9b4121
cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3093
diff
changeset
|
49 class ServerContext; |
226
8a26a8e85edf
refactoring to read files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
50 |
220 | 51 class ServerIndex : public boost::noncopyable |
0 | 52 { |
1002
b067017a8a5b
anonymization refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
739
diff
changeset
|
53 public: |
b067017a8a5b
anonymization refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
739
diff
changeset
|
54 typedef std::list<FileInfo> Attachments; |
2894
a27b0e9a3fd9
refactoring DicomInstanceToStore
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2825
diff
changeset
|
55 typedef std::map<std::pair<ResourceType, MetadataType>, std::string> MetadataMap; |
1002
b067017a8a5b
anonymization refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
739
diff
changeset
|
56 |
0 | 57 private: |
1432
0ac74fa21db8
rename IServerIndexListener as IDatabaseListener
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1364
diff
changeset
|
58 class Listener; |
278
771f12042be9
more efficient determination of storage size for recycling
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
272
diff
changeset
|
59 class Transaction; |
1177
5b2d8c280ac2
Plugins can monitor changes through callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1162
diff
changeset
|
60 class UnstableResourcePayload; |
3027 | 61 class MainDicomTagsRegistry; |
278
771f12042be9
more efficient determination of storage size for recycling
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
272
diff
changeset
|
62 |
511
3b735fdf320b
monitoring of stable patients/studies/series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
440
diff
changeset
|
63 bool done_; |
4577
a114a5db2afe
end of refactoring read-write transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4574
diff
changeset
|
64 boost::mutex monitoringMutex_; |
4581
bb3c82b8f373
transient introduction of ServerIndex::databaseMutex_
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4580
diff
changeset
|
65 boost::mutex databaseMutex_; // TODO - REMOVE |
206
4453a010d0db
flush to disk thread
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
204
diff
changeset
|
66 boost::thread flushThread_; |
511
3b735fdf320b
monitoring of stable patients/studies/series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
440
diff
changeset
|
67 boost::thread unstableResourcesMonitorThread_; |
0 | 68 |
3712
2a170a8f1faf
replacing std::auto_ptr by std::unique_ptr
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
69 std::unique_ptr<Listener> listener_; |
1247 | 70 IDatabaseWrapper& db_; |
511
3b735fdf320b
monitoring of stable patients/studies/series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
440
diff
changeset
|
71 LeastRecentlyUsedIndex<int64_t, UnstableResourcePayload> unstableResources_; |
180
626777d01dc4
use of hashes to index dicom objects
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
179
diff
changeset
|
72 |
2825
8aa6aef11b70
New configuration option "OverwriteInstances" to choose how duplicate SOPInstanceUID are handled
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2668
diff
changeset
|
73 uint64_t maximumStorageSize_; |
269
f6fdf5abe751
recycling up and running
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
268
diff
changeset
|
74 unsigned int maximumPatients_; |
3712
2a170a8f1faf
replacing std::auto_ptr by std::unique_ptr
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
75 std::unique_ptr<MainDicomTagsRegistry> mainDicomTagsRegistry_; |
269
f6fdf5abe751
recycling up and running
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
268
diff
changeset
|
76 |
2665
389d050a2e66
fix deadlock, speed up unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
77 static void FlushThread(ServerIndex* that, |
389d050a2e66
fix deadlock, speed up unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
78 unsigned int threadSleep); |
511
3b735fdf320b
monitoring of stable patients/studies/series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
440
diff
changeset
|
79 |
2665
389d050a2e66
fix deadlock, speed up unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
80 static void UnstableResourcesMonitorThread(ServerIndex* that, |
389d050a2e66
fix deadlock, speed up unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
81 unsigned int threadSleep); |
511
3b735fdf320b
monitoring of stable patients/studies/series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
440
diff
changeset
|
82 |
4577
a114a5db2afe
end of refactoring read-write transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4574
diff
changeset
|
83 void StandaloneRecycling(uint64_t maximumStorageSize, |
a114a5db2afe
end of refactoring read-write transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4574
diff
changeset
|
84 unsigned int maximumPatientCount); |
269
f6fdf5abe751
recycling up and running
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
268
diff
changeset
|
85 |
511
3b735fdf320b
monitoring of stable patients/studies/series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
440
diff
changeset
|
86 void MarkAsUnstable(int64_t id, |
1177
5b2d8c280ac2
Plugins can monitor changes through callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1162
diff
changeset
|
87 Orthanc::ResourceType type, |
5b2d8c280ac2
Plugins can monitor changes through callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1162
diff
changeset
|
88 const std::string& publicId); |
511
3b735fdf320b
monitoring of stable patients/studies/series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
440
diff
changeset
|
89 |
3029
ea653ec47f31
new class: DatabaseConstraint
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3027
diff
changeset
|
90 void NormalizeLookup(std::vector<DatabaseConstraint>& target, |
3027 | 91 const DatabaseLookup& source, |
92 ResourceType level) const; | |
93 | |
4554 | 94 bool IsUnstableResource(int64_t id); |
3090
31244604f617
starting optimization of SeriesIndex::GetSeriesStatus()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3086
diff
changeset
|
95 |
0 | 96 public: |
226
8a26a8e85edf
refactoring to read files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
97 ServerIndex(ServerContext& context, |
2665
389d050a2e66
fix deadlock, speed up unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
98 IDatabaseWrapper& database, |
4580
49f6b9a2b9f5
remove the only use of GlobalProperty_FlushSleep
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4579
diff
changeset
|
99 unsigned int threadSleepGranularityMilliseconds); |
0 | 100 |
206
4453a010d0db
flush to disk thread
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
204
diff
changeset
|
101 ~ServerIndex(); |
4453a010d0db
flush to disk thread
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
204
diff
changeset
|
102 |
1453
c0bdc47165ef
code to warn about possible threading problems
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1432
diff
changeset
|
103 void Stop(); |
c0bdc47165ef
code to warn about possible threading problems
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1432
diff
changeset
|
104 |
269
f6fdf5abe751
recycling up and running
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
268
diff
changeset
|
105 // "size == 0" means no limit on the storage size |
f6fdf5abe751
recycling up and running
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
268
diff
changeset
|
106 void SetMaximumStorageSize(uint64_t size); |
f6fdf5abe751
recycling up and running
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
268
diff
changeset
|
107 |
f6fdf5abe751
recycling up and running
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
268
diff
changeset
|
108 // "count == 0" means no limit on the number of patients |
f6fdf5abe751
recycling up and running
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
268
diff
changeset
|
109 void SetMaximumPatientCount(unsigned int count); |
f6fdf5abe751
recycling up and running
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
268
diff
changeset
|
110 |
4582
fb0379abb4a7
assume that "GetDatabaseVersion()" can run out of a database transaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4581
diff
changeset
|
111 // It is assumed that "GetDatabaseVersion()" can run out of a |
fb0379abb4a7
assume that "GetDatabaseVersion()" can run out of a database transaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4581
diff
changeset
|
112 // database transaction |
fb0379abb4a7
assume that "GetDatabaseVersion()" can run out of a database transaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4581
diff
changeset
|
113 unsigned int GetDatabaseVersion() |
fb0379abb4a7
assume that "GetDatabaseVersion()" can run out of a database transaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4581
diff
changeset
|
114 { |
fb0379abb4a7
assume that "GetDatabaseVersion()" can run out of a database transaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4581
diff
changeset
|
115 return db_.GetDatabaseVersion(); |
fb0379abb4a7
assume that "GetDatabaseVersion()" can run out of a database transaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4581
diff
changeset
|
116 } |
fb0379abb4a7
assume that "GetDatabaseVersion()" can run out of a database transaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4581
diff
changeset
|
117 |
0 | 118 |
4577
a114a5db2afe
end of refactoring read-write transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4574
diff
changeset
|
119 |
4551
350a22c094f2
testing replay of transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4514
diff
changeset
|
120 /*** |
350a22c094f2
testing replay of transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4514
diff
changeset
|
121 ** PROTOTYPING FOR DB REFACTORING BELOW |
350a22c094f2
testing replay of transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4514
diff
changeset
|
122 ***/ |
350a22c094f2
testing replay of transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4514
diff
changeset
|
123 |
350a22c094f2
testing replay of transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4514
diff
changeset
|
124 public: |
350a22c094f2
testing replay of transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4514
diff
changeset
|
125 class ReadOnlyTransaction : public boost::noncopyable |
350a22c094f2
testing replay of transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4514
diff
changeset
|
126 { |
350a22c094f2
testing replay of transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4514
diff
changeset
|
127 protected: |
4554 | 128 IDatabaseWrapper& db_; |
4551
350a22c094f2
testing replay of transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4514
diff
changeset
|
129 |
350a22c094f2
testing replay of transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4514
diff
changeset
|
130 public: |
4555 | 131 explicit ReadOnlyTransaction(IDatabaseWrapper& db) : |
4554 | 132 db_(db) |
133 { | |
134 } | |
135 | |
136 /** | |
137 * Higher-level constructions | |
138 **/ | |
139 | |
140 SeriesStatus GetSeriesStatus(int64_t id, | |
4577
a114a5db2afe
end of refactoring read-write transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4574
diff
changeset
|
141 int64_t expectedNumberOfInstances); |
4554 | 142 |
143 void MainDicomTagsToJson(Json::Value& result, | |
144 int64_t resourceId, | |
4578 | 145 ResourceType resourceType); |
4554 | 146 |
147 /** | |
148 * Read-only methods from "IDatabaseWrapper" | |
149 **/ | |
150 | |
4562 | 151 void ApplyLookupResources(std::list<std::string>& resourcesId, |
152 std::list<std::string>* instancesId, // Can be NULL if not needed | |
153 const std::vector<DatabaseConstraint>& lookup, | |
154 ResourceType queryLevel, | |
155 size_t limit) | |
156 { | |
157 return db_.ApplyLookupResources(resourcesId, instancesId, lookup, queryLevel, limit); | |
158 } | |
159 | |
4554 | 160 void GetAllMetadata(std::map<MetadataType, std::string>& target, |
161 int64_t id) | |
162 { | |
163 db_.GetAllMetadata(target, id); | |
4555 | 164 } |
165 | |
166 void GetAllPublicIds(std::list<std::string>& target, | |
167 ResourceType resourceType) | |
168 { | |
169 return db_.GetAllPublicIds(target, resourceType); | |
170 } | |
171 | |
172 void GetAllPublicIds(std::list<std::string>& target, | |
173 ResourceType resourceType, | |
174 size_t since, | |
175 size_t limit) | |
176 { | |
177 return db_.GetAllPublicIds(target, resourceType, since, limit); | |
178 } | |
4554 | 179 |
4558 | 180 void GetChanges(std::list<ServerIndexChange>& target /*out*/, |
181 bool& done /*out*/, | |
182 int64_t since, | |
183 uint32_t maxResults) | |
184 { | |
185 db_.GetChanges(target, done, since, maxResults); | |
186 } | |
187 | |
4559 | 188 void GetChildrenInternalId(std::list<int64_t>& target, |
189 int64_t id) | |
190 { | |
191 db_.GetChildrenInternalId(target, id); | |
192 } | |
193 | |
4554 | 194 void GetChildrenPublicId(std::list<std::string>& target, |
195 int64_t id) | |
196 { | |
197 db_.GetChildrenPublicId(target, id); | |
198 } | |
199 | |
4558 | 200 void GetExportedResources(std::list<ExportedResource>& target /*out*/, |
201 bool& done /*out*/, | |
202 int64_t since, | |
203 uint32_t maxResults) | |
204 { | |
205 return db_.GetExportedResources(target, done, since, maxResults); | |
206 } | |
207 | |
208 void GetLastChange(std::list<ServerIndexChange>& target /*out*/) | |
209 { | |
210 db_.GetLastChange(target); | |
211 } | |
212 | |
213 void GetLastExportedResource(std::list<ExportedResource>& target /*out*/) | |
214 { | |
215 return db_.GetLastExportedResource(target); | |
216 } | |
217 | |
218 int64_t GetLastChangeIndex() | |
219 { | |
220 return db_.GetLastChangeIndex(); | |
221 } | |
222 | |
4554 | 223 void GetMainDicomTags(DicomMap& map, |
224 int64_t id) | |
225 { | |
226 db_.GetMainDicomTags(map, id); | |
4551
350a22c094f2
testing replay of transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4514
diff
changeset
|
227 } |
4558 | 228 |
4559 | 229 std::string GetPublicId(int64_t resourceId) |
230 { | |
231 return db_.GetPublicId(resourceId); | |
232 } | |
233 | |
4558 | 234 uint64_t GetResourceCount(ResourceType resourceType) |
235 { | |
236 return db_.GetResourceCount(resourceType); | |
237 } | |
238 | |
4559 | 239 ResourceType GetResourceType(int64_t resourceId) |
240 { | |
241 return db_.GetResourceType(resourceId); | |
242 } | |
243 | |
4558 | 244 uint64_t GetTotalCompressedSize() |
245 { | |
246 return db_.GetTotalCompressedSize(); | |
247 } | |
248 | |
249 uint64_t GetTotalUncompressedSize() | |
250 { | |
251 return db_.GetTotalUncompressedSize(); | |
252 } | |
4551
350a22c094f2
testing replay of transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4514
diff
changeset
|
253 |
4559 | 254 bool IsProtectedPatient(int64_t internalId) |
255 { | |
256 return db_.IsProtectedPatient(internalId); | |
257 } | |
258 | |
4560 | 259 void ListAvailableAttachments(std::set<FileContentType>& target, |
260 int64_t id) | |
261 { | |
262 db_.ListAvailableAttachments(target, id); | |
263 } | |
264 | |
4554 | 265 bool LookupAttachment(FileInfo& attachment, |
266 int64_t id, | |
267 FileContentType contentType) | |
4551
350a22c094f2
testing replay of transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4514
diff
changeset
|
268 { |
4554 | 269 return db_.LookupAttachment(attachment, id, contentType); |
4551
350a22c094f2
testing replay of transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4514
diff
changeset
|
270 } |
4554 | 271 |
4562 | 272 bool LookupGlobalProperty(std::string& target, |
273 GlobalProperty property) | |
274 { | |
275 return db_.LookupGlobalProperty(target, property); | |
276 } | |
277 | |
4560 | 278 bool LookupMetadata(std::string& target, |
279 int64_t id, | |
280 MetadataType type) | |
281 { | |
282 return db_.LookupMetadata(target, id, type); | |
283 } | |
284 | |
285 bool LookupParent(int64_t& parentId, | |
286 int64_t resourceId) | |
287 { | |
288 return db_.LookupParent(parentId, resourceId); | |
289 } | |
290 | |
4554 | 291 bool LookupResource(int64_t& id, |
292 ResourceType& type, | |
293 const std::string& publicId) | |
4551
350a22c094f2
testing replay of transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4514
diff
changeset
|
294 { |
4554 | 295 return db_.LookupResource(id, type, publicId); |
296 } | |
297 | |
298 bool LookupResourceAndParent(int64_t& id, | |
299 ResourceType& type, | |
300 std::string& parentPublicId, | |
301 const std::string& publicId) | |
302 { | |
303 return db_.LookupResourceAndParent(id, type, parentPublicId, publicId); | |
4551
350a22c094f2
testing replay of transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4514
diff
changeset
|
304 } |
350a22c094f2
testing replay of transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4514
diff
changeset
|
305 }; |
350a22c094f2
testing replay of transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4514
diff
changeset
|
306 |
350a22c094f2
testing replay of transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4514
diff
changeset
|
307 |
350a22c094f2
testing replay of transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4514
diff
changeset
|
308 class ReadWriteTransaction : public ReadOnlyTransaction |
350a22c094f2
testing replay of transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4514
diff
changeset
|
309 { |
4567 | 310 private: |
4573 | 311 Listener& listener_; |
312 ServerIndex& index_; // TODO - REMOVE | |
4567 | 313 |
4551
350a22c094f2
testing replay of transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4514
diff
changeset
|
314 public: |
4567 | 315 ReadWriteTransaction(IDatabaseWrapper& db, |
4573 | 316 Listener& listener, |
4567 | 317 ServerIndex& index) : |
318 ReadOnlyTransaction(db), | |
4573 | 319 listener_(listener), |
320 index_(index) | |
4567 | 321 { |
322 } | |
323 | |
4573 | 324 Listener& GetListener() |
325 { | |
326 return listener_; | |
327 } | |
328 | |
4577
a114a5db2afe
end of refactoring read-write transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4574
diff
changeset
|
329 void AddAttachment(int64_t id, |
a114a5db2afe
end of refactoring read-write transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4574
diff
changeset
|
330 const FileInfo& attachment) |
a114a5db2afe
end of refactoring read-write transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4574
diff
changeset
|
331 { |
a114a5db2afe
end of refactoring read-write transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4574
diff
changeset
|
332 db_.AddAttachment(id, attachment); |
a114a5db2afe
end of refactoring read-write transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4574
diff
changeset
|
333 } |
a114a5db2afe
end of refactoring read-write transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4574
diff
changeset
|
334 |
4567 | 335 void ClearChanges() |
4551
350a22c094f2
testing replay of transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4514
diff
changeset
|
336 { |
4567 | 337 db_.ClearChanges(); |
338 } | |
339 | |
340 void ClearExportedResources() | |
341 { | |
342 db_.ClearExportedResources(); | |
343 } | |
344 | |
4574 | 345 void ClearMainDicomTags(int64_t id) |
346 { | |
347 return db_.ClearMainDicomTags(id); | |
348 } | |
349 | |
4577
a114a5db2afe
end of refactoring read-write transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4574
diff
changeset
|
350 bool CreateInstance(IDatabaseWrapper::CreateInstanceResult& result, /* out */ |
a114a5db2afe
end of refactoring read-write transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4574
diff
changeset
|
351 int64_t& instanceId, /* out */ |
a114a5db2afe
end of refactoring read-write transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4574
diff
changeset
|
352 const std::string& patient, |
a114a5db2afe
end of refactoring read-write transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4574
diff
changeset
|
353 const std::string& study, |
a114a5db2afe
end of refactoring read-write transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4574
diff
changeset
|
354 const std::string& series, |
a114a5db2afe
end of refactoring read-write transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4574
diff
changeset
|
355 const std::string& instance) |
a114a5db2afe
end of refactoring read-write transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4574
diff
changeset
|
356 { |
a114a5db2afe
end of refactoring read-write transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4574
diff
changeset
|
357 return db_.CreateInstance(result, instanceId, patient, study, series, instance); |
a114a5db2afe
end of refactoring read-write transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4574
diff
changeset
|
358 } |
a114a5db2afe
end of refactoring read-write transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4574
diff
changeset
|
359 |
4568 | 360 void DeleteAttachment(int64_t id, |
361 FileContentType attachment) | |
362 { | |
363 return db_.DeleteAttachment(id, attachment); | |
364 } | |
365 | |
4567 | 366 void DeleteMetadata(int64_t id, |
367 MetadataType type) | |
368 { | |
369 db_.DeleteMetadata(id, type); | |
4551
350a22c094f2
testing replay of transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4514
diff
changeset
|
370 } |
350a22c094f2
testing replay of transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4514
diff
changeset
|
371 |
4565
3495a3d97ab6
start of read-write transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4563
diff
changeset
|
372 void DeleteResource(int64_t id) |
3495a3d97ab6
start of read-write transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4563
diff
changeset
|
373 { |
3495a3d97ab6
start of read-write transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4563
diff
changeset
|
374 db_.DeleteResource(id); |
3495a3d97ab6
start of read-write transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4563
diff
changeset
|
375 } |
3495a3d97ab6
start of read-write transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4563
diff
changeset
|
376 |
4567 | 377 void LogChange(int64_t internalId, |
378 ChangeType changeType, | |
379 ResourceType resourceType, | |
4581
bb3c82b8f373
transient introduction of ServerIndex::databaseMutex_
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4580
diff
changeset
|
380 const std::string& publicId); |
4567 | 381 |
4565
3495a3d97ab6
start of read-write transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4563
diff
changeset
|
382 void LogExportedResource(const ExportedResource& resource) |
3495a3d97ab6
start of read-write transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4563
diff
changeset
|
383 { |
3495a3d97ab6
start of read-write transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4563
diff
changeset
|
384 db_.LogExportedResource(resource); |
3495a3d97ab6
start of read-write transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4563
diff
changeset
|
385 } |
4567 | 386 |
387 void SetGlobalProperty(GlobalProperty property, | |
388 const std::string& value) | |
389 { | |
390 db_.SetGlobalProperty(property, value); | |
391 } | |
392 | |
393 void SetMetadata(int64_t id, | |
394 MetadataType type, | |
395 const std::string& value) | |
396 { | |
397 return db_.SetMetadata(id, type, value); | |
398 } | |
399 | |
400 void SetProtectedPatient(int64_t internalId, | |
401 bool isProtected) | |
402 { | |
403 db_.SetProtectedPatient(internalId, isProtected); | |
404 } | |
4574 | 405 |
406 void SetResourcesContent(const ResourcesContent& content) | |
407 { | |
408 db_.SetResourcesContent(content); | |
409 } | |
4577
a114a5db2afe
end of refactoring read-write transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4574
diff
changeset
|
410 |
a114a5db2afe
end of refactoring read-write transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4574
diff
changeset
|
411 void Recycle(uint64_t maximumStorageSize, |
a114a5db2afe
end of refactoring read-write transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4574
diff
changeset
|
412 unsigned int maximumPatients, |
a114a5db2afe
end of refactoring read-write transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4574
diff
changeset
|
413 uint64_t addedInstanceSize, |
a114a5db2afe
end of refactoring read-write transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4574
diff
changeset
|
414 const std::string& newPatientId); |
4551
350a22c094f2
testing replay of transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4514
diff
changeset
|
415 }; |
350a22c094f2
testing replay of transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4514
diff
changeset
|
416 |
350a22c094f2
testing replay of transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4514
diff
changeset
|
417 |
350a22c094f2
testing replay of transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4514
diff
changeset
|
418 class IReadOnlyOperations : public boost::noncopyable |
350a22c094f2
testing replay of transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4514
diff
changeset
|
419 { |
350a22c094f2
testing replay of transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4514
diff
changeset
|
420 public: |
350a22c094f2
testing replay of transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4514
diff
changeset
|
421 virtual ~IReadOnlyOperations() |
350a22c094f2
testing replay of transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4514
diff
changeset
|
422 { |
350a22c094f2
testing replay of transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4514
diff
changeset
|
423 } |
350a22c094f2
testing replay of transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4514
diff
changeset
|
424 |
350a22c094f2
testing replay of transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4514
diff
changeset
|
425 virtual void Apply(ReadOnlyTransaction& transaction) = 0; |
350a22c094f2
testing replay of transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4514
diff
changeset
|
426 }; |
350a22c094f2
testing replay of transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4514
diff
changeset
|
427 |
350a22c094f2
testing replay of transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4514
diff
changeset
|
428 |
350a22c094f2
testing replay of transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4514
diff
changeset
|
429 class IReadWriteOperations : public boost::noncopyable |
350a22c094f2
testing replay of transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4514
diff
changeset
|
430 { |
350a22c094f2
testing replay of transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4514
diff
changeset
|
431 public: |
350a22c094f2
testing replay of transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4514
diff
changeset
|
432 virtual ~IReadWriteOperations() |
350a22c094f2
testing replay of transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4514
diff
changeset
|
433 { |
350a22c094f2
testing replay of transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4514
diff
changeset
|
434 } |
350a22c094f2
testing replay of transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4514
diff
changeset
|
435 |
4573 | 436 virtual void Apply(ReadWriteTransaction& transaction) = 0; |
4551
350a22c094f2
testing replay of transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4514
diff
changeset
|
437 }; |
350a22c094f2
testing replay of transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4514
diff
changeset
|
438 |
350a22c094f2
testing replay of transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4514
diff
changeset
|
439 private: |
350a22c094f2
testing replay of transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4514
diff
changeset
|
440 void ApplyInternal(IReadOnlyOperations* readOperations, |
350a22c094f2
testing replay of transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4514
diff
changeset
|
441 IReadWriteOperations* writeOperations); |
350a22c094f2
testing replay of transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4514
diff
changeset
|
442 |
350a22c094f2
testing replay of transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4514
diff
changeset
|
443 unsigned int maxRetries_; |
350a22c094f2
testing replay of transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4514
diff
changeset
|
444 |
350a22c094f2
testing replay of transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4514
diff
changeset
|
445 public: |
350a22c094f2
testing replay of transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4514
diff
changeset
|
446 void Apply(IReadOnlyOperations& operations); |
350a22c094f2
testing replay of transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4514
diff
changeset
|
447 |
350a22c094f2
testing replay of transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4514
diff
changeset
|
448 void Apply(IReadWriteOperations& operations); |
350a22c094f2
testing replay of transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4514
diff
changeset
|
449 |
4554 | 450 bool ExpandResource(Json::Value& target, |
451 const std::string& publicId, | |
452 ResourceType level); | |
453 | |
454 void GetAllMetadata(std::map<MetadataType, std::string>& target, | |
455 const std::string& publicId, | |
456 ResourceType level); | |
4555 | 457 |
458 void GetAllUuids(std::list<std::string>& target, | |
459 ResourceType resourceType); | |
460 | |
461 void GetAllUuids(std::list<std::string>& target, | |
462 ResourceType resourceType, | |
463 size_t since, | |
464 size_t limit); | |
465 | |
4558 | 466 void GetGlobalStatistics(/* out */ uint64_t& diskSize, |
467 /* out */ uint64_t& uncompressedSize, | |
468 /* out */ uint64_t& countPatients, | |
469 /* out */ uint64_t& countStudies, | |
470 /* out */ uint64_t& countSeries, | |
471 /* out */ uint64_t& countInstances); | |
472 | |
4555 | 473 bool LookupAttachment(FileInfo& attachment, |
474 const std::string& instancePublicId, | |
475 FileContentType contentType); | |
4558 | 476 |
477 void GetChanges(Json::Value& target, | |
478 int64_t since, | |
479 unsigned int maxResults); | |
480 | |
481 void GetLastChange(Json::Value& target); | |
482 | |
483 void GetExportedResources(Json::Value& target, | |
484 int64_t since, | |
485 unsigned int maxResults); | |
486 | |
487 void GetLastExportedResource(Json::Value& target); | |
488 | |
4559 | 489 bool IsProtectedPatient(const std::string& publicId); |
490 | |
491 void GetChildren(std::list<std::string>& result, | |
492 const std::string& publicId); | |
493 | |
494 void GetChildInstances(std::list<std::string>& result, | |
495 const std::string& publicId); | |
4560 | 496 |
497 bool LookupMetadata(std::string& target, | |
498 const std::string& publicId, | |
499 ResourceType expectedType, | |
500 MetadataType type); | |
501 | |
502 void ListAvailableAttachments(std::set<FileContentType>& target, | |
503 const std::string& publicId, | |
504 ResourceType expectedType); | |
505 | |
506 bool LookupParent(std::string& target, | |
507 const std::string& publicId); | |
4562 | 508 |
509 void GetResourceStatistics(/* out */ ResourceType& type, | |
510 /* out */ uint64_t& diskSize, | |
511 /* out */ uint64_t& uncompressedSize, | |
512 /* out */ unsigned int& countStudies, | |
513 /* out */ unsigned int& countSeries, | |
514 /* out */ unsigned int& countInstances, | |
515 /* out */ uint64_t& dicomDiskSize, | |
516 /* out */ uint64_t& dicomUncompressedSize, | |
517 const std::string& publicId); | |
518 | |
519 void LookupIdentifierExact(std::vector<std::string>& result, | |
520 ResourceType level, | |
521 const DicomTag& tag, | |
522 const std::string& value); | |
523 | |
524 bool LookupGlobalProperty(std::string& value, | |
525 GlobalProperty property); | |
526 | |
527 std::string GetGlobalProperty(GlobalProperty property, | |
528 const std::string& defaultValue); | |
529 | |
530 bool GetMainDicomTags(DicomMap& result, | |
531 const std::string& publicId, | |
532 ResourceType expectedType, | |
533 ResourceType levelOfInterest); | |
4563
bb1c365f9e44
end of refactoring read-only transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4562
diff
changeset
|
534 |
bb1c365f9e44
end of refactoring read-only transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4562
diff
changeset
|
535 // Only applicable at the instance level |
bb1c365f9e44
end of refactoring read-only transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4562
diff
changeset
|
536 bool GetAllMainDicomTags(DicomMap& result, |
bb1c365f9e44
end of refactoring read-only transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4562
diff
changeset
|
537 const std::string& instancePublicId); |
bb1c365f9e44
end of refactoring read-only transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4562
diff
changeset
|
538 |
bb1c365f9e44
end of refactoring read-only transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4562
diff
changeset
|
539 bool LookupResourceType(ResourceType& type, |
bb1c365f9e44
end of refactoring read-only transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4562
diff
changeset
|
540 const std::string& publicId); |
bb1c365f9e44
end of refactoring read-only transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4562
diff
changeset
|
541 |
bb1c365f9e44
end of refactoring read-only transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4562
diff
changeset
|
542 bool LookupParent(std::string& target, |
bb1c365f9e44
end of refactoring read-only transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4562
diff
changeset
|
543 const std::string& publicId, |
bb1c365f9e44
end of refactoring read-only transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4562
diff
changeset
|
544 ResourceType parentType); |
bb1c365f9e44
end of refactoring read-only transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4562
diff
changeset
|
545 |
bb1c365f9e44
end of refactoring read-only transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4562
diff
changeset
|
546 void ApplyLookupResources(std::vector<std::string>& resourcesId, |
bb1c365f9e44
end of refactoring read-only transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4562
diff
changeset
|
547 std::vector<std::string>* instancesId, // Can be NULL if not needed |
bb1c365f9e44
end of refactoring read-only transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4562
diff
changeset
|
548 const DatabaseLookup& lookup, |
bb1c365f9e44
end of refactoring read-only transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4562
diff
changeset
|
549 ResourceType queryLevel, |
bb1c365f9e44
end of refactoring read-only transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4562
diff
changeset
|
550 size_t limit); |
4565
3495a3d97ab6
start of read-write transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4563
diff
changeset
|
551 |
3495a3d97ab6
start of read-write transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4563
diff
changeset
|
552 bool DeleteResource(Json::Value& target /* out */, |
3495a3d97ab6
start of read-write transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4563
diff
changeset
|
553 const std::string& uuid, |
3495a3d97ab6
start of read-write transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4563
diff
changeset
|
554 ResourceType expectedType); |
3495a3d97ab6
start of read-write transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4563
diff
changeset
|
555 |
3495a3d97ab6
start of read-write transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4563
diff
changeset
|
556 void LogExportedResource(const std::string& publicId, |
3495a3d97ab6
start of read-write transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4563
diff
changeset
|
557 const std::string& remoteModality); |
4567 | 558 |
559 void SetProtectedPatient(const std::string& publicId, | |
560 bool isProtected); | |
561 | |
562 void SetMetadata(const std::string& publicId, | |
563 MetadataType type, | |
564 const std::string& value); | |
565 | |
566 void DeleteMetadata(const std::string& publicId, | |
567 MetadataType type); | |
568 | |
569 uint64_t IncrementGlobalSequence(GlobalProperty sequence); | |
570 | |
571 void DeleteChanges(); | |
572 | |
573 void DeleteExportedResources(); | |
574 | |
575 void SetGlobalProperty(GlobalProperty property, | |
576 const std::string& value); | |
4568 | 577 |
578 void DeleteAttachment(const std::string& publicId, | |
579 FileContentType type); | |
580 | |
581 void LogChange(ChangeType changeType, | |
4579 | 582 const std::string& publicId, |
583 ResourceType level); | |
4574 | 584 |
585 void ReconstructInstance(const ParsedDicomFile& dicom); | |
4577
a114a5db2afe
end of refactoring read-write transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4574
diff
changeset
|
586 |
a114a5db2afe
end of refactoring read-write transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4574
diff
changeset
|
587 StoreStatus Store(std::map<MetadataType, std::string>& instanceMetadata, |
a114a5db2afe
end of refactoring read-write transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4574
diff
changeset
|
588 const DicomMap& dicomSummary, |
a114a5db2afe
end of refactoring read-write transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4574
diff
changeset
|
589 const Attachments& attachments, |
a114a5db2afe
end of refactoring read-write transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4574
diff
changeset
|
590 const MetadataMap& metadata, |
a114a5db2afe
end of refactoring read-write transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4574
diff
changeset
|
591 const DicomInstanceOrigin& origin, |
a114a5db2afe
end of refactoring read-write transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4574
diff
changeset
|
592 bool overwrite, |
a114a5db2afe
end of refactoring read-write transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4574
diff
changeset
|
593 bool hasTransferSyntax, |
a114a5db2afe
end of refactoring read-write transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4574
diff
changeset
|
594 DicomTransferSyntax transferSyntax, |
a114a5db2afe
end of refactoring read-write transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4574
diff
changeset
|
595 bool hasPixelDataOffset, |
a114a5db2afe
end of refactoring read-write transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4574
diff
changeset
|
596 uint64_t pixelDataOffset); |
a114a5db2afe
end of refactoring read-write transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4574
diff
changeset
|
597 |
a114a5db2afe
end of refactoring read-write transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4574
diff
changeset
|
598 StoreStatus AddAttachment(const FileInfo& attachment, |
a114a5db2afe
end of refactoring read-write transactions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4574
diff
changeset
|
599 const std::string& publicId); |
0 | 600 }; |
601 } |