Mercurial > hg > orthanc
diff OrthancServer/Sources/Database/StatelessDatabaseOperations.h @ 4587:888868a5dc4e db-changes
ServerIndex now uses StatelessDatabaseOperations
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 10 Mar 2021 15:59:03 +0100 |
parents | 1d96fe7e054e |
children | 94147ce2f097 |
line wrap: on
line diff
--- a/OrthancServer/Sources/Database/StatelessDatabaseOperations.h Tue Mar 09 18:24:59 2021 +0100 +++ b/OrthancServer/Sources/Database/StatelessDatabaseOperations.h Wed Mar 10 15:59:03 2021 +0100 @@ -404,11 +404,12 @@ class MainDicomTagsRegistry; class Transaction; - IDatabaseWrapper& db_; - boost::mutex databaseMutex_; // TODO - REMOVE + IDatabaseWrapper& db_; + boost::mutex databaseMutex_; // TODO - REMOVE std::unique_ptr<ITransactionContextFactory> factory_; - unsigned int maxRetries_; - std::unique_ptr<MainDicomTagsRegistry> mainDicomTagsRegistry_; + unsigned int maxRetries_; + std::unique_ptr<MainDicomTagsRegistry> mainDicomTagsRegistry_; + bool hasFlushToDisk_; void NormalizeLookup(std::vector<DatabaseConstraint>& target, const DatabaseLookup& source, @@ -433,6 +434,13 @@ return db_.GetDatabaseVersion(); } + void FlushToDisk(); + + bool HasFlushToDisk() const + { + return hasFlushToDisk_; + } + void Apply(IReadOnlyOperations& operations); void Apply(IReadWriteOperations& operations); @@ -568,7 +576,8 @@ void DeleteAttachment(const std::string& publicId, FileContentType type); - void LogChange(ChangeType changeType, + void LogChange(int64_t internalId, + ChangeType changeType, const std::string& publicId, ResourceType level);