Mercurial > hg > orthanc
changeset 6818:7811ff03012f streaming
removed ServerContext::storageCache_
| author | Sebastien Jodogne <s.jodogne@gmail.com> |
|---|---|
| date | Tue, 19 May 2026 18:50:45 +0200 |
| parents | 0ffaef5500c1 |
| children | 28cd72b0960a |
| files | OrthancServer/Plugins/Engine/OrthancPlugins.cpp OrthancServer/Sources/OrthancGetRequestHandler.cpp OrthancServer/Sources/ServerContext.cpp OrthancServer/Sources/ServerContext.h OrthancServer/Sources/ServerJobs/OrthancPeerStoreJob.cpp OrthancServer/Sources/ServerJobs/ResourceModificationJob.cpp OrthancServer/Sources/ServerJobs/ThreadedInstancesLoader.cpp OrthancServer/Sources/main.cpp |
| diffstat | 8 files changed, 21 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/OrthancServer/Plugins/Engine/OrthancPlugins.cpp Tue May 19 18:37:09 2026 +0200 +++ b/OrthancServer/Plugins/Engine/OrthancPlugins.cpp Tue May 19 18:50:45 2026 +0200 @@ -65,6 +65,7 @@ #include "../../Sources/Search/HierarchicalMatcher.h" #include "../../Sources/ServerContext.h" #include "../../Sources/ServerToolbox.h" +#include "../../Sources/ServerTranscoder.h" #include "OrthancPluginDatabase.h" #include "OrthancPluginDatabaseV3.h" #include "OrthancPluginDatabaseV4.h"
--- a/OrthancServer/Sources/OrthancGetRequestHandler.cpp Tue May 19 18:37:09 2026 +0200 +++ b/OrthancServer/Sources/OrthancGetRequestHandler.cpp Tue May 19 18:50:45 2026 +0200 @@ -31,6 +31,7 @@ #include "ServerContext.h" #include "ServerJobs/DicomModalityStoreJob.h" #include "ServerJobs/ThreadedInstancesLoader.h" +#include "ServerTranscoder.h" #include <dcmtk/dcmdata/dcdeftag.h> #include <dcmtk/dcmdata/dcfilefo.h>
--- a/OrthancServer/Sources/ServerContext.cpp Tue May 19 18:37:09 2026 +0200 +++ b/OrthancServer/Sources/ServerContext.cpp Tue May 19 18:50:45 2026 +0200 @@ -46,13 +46,14 @@ #include "DicomInstanceToStore.h" #include "OrthancConfiguration.h" #include "OrthancRestApi/OrthancRestApi.h" +#include "OutgoingDicomInstance.h" #include "ResourceFinder.h" #include "Search/DatabaseLookup.h" #include "ServerJobs/OrthancJobUnserializer.h" #include "ServerToolbox.h" +#include "ServerTranscoder.h" +#include "SimpleInstanceOrdering.h" #include "StorageCommitmentReports.h" -#include "OutgoingDicomInstance.h" -#include "SimpleInstanceOrdering.h" #include <dcmtk/dcmdata/dcfilefo.h> #include <dcmtk/dcmnet/dimse.h> @@ -369,10 +370,10 @@ //static_cast<int64_t>(dicomCache_.GetNumberOfItems())); - metricsRegistry_->SetFloatValue("orthanc_storage_cache_size_mb", - static_cast<float>(storageCache_.GetCurrentSize()) / static_cast<float>(1024 * 1024)); - metricsRegistry_->SetIntegerValue("orthanc_storage_cache_count", - static_cast<int64_t>(storageCache_.GetNumberOfItems())); + //metricsRegistry_->SetFloatValue("orthanc_storage_cache_size_mb", + //static_cast<float>(storageCache_.GetCurrentSize()) / static_cast<float>(1024 * 1024)); + //metricsRegistry_->SetIntegerValue("orthanc_storage_cache_count", + //static_cast<int64_t>(storageCache_.GetNumberOfItems())); } @@ -673,7 +674,7 @@ FileContentType type, const std::string& customData) { - StorageAccessor accessor(area_, storageCache_, GetMetricsRegistry()); + StorageAccessor accessor(area_, GetMetricsRegistry()); accessor.Remove(fileUuid, type, customData); } @@ -735,7 +736,7 @@ try { MetricsRegistry::Timer timer(GetMetricsRegistry(), "orthanc_store_dicom_duration_ms"); - StorageAccessor accessor(area_, storageCache_, GetMetricsRegistry()); + StorageAccessor accessor(area_, GetMetricsRegistry()); DicomInstanceHasher hasher(summary); resultPublicId = hasher.HashInstance(); @@ -1159,7 +1160,7 @@ } - StorageAccessor accessor(area_, storageCache_, GetMetricsRegistry()); + StorageAccessor accessor(area_, GetMetricsRegistry()); FileInfo modified; @@ -1578,7 +1579,7 @@ // TODO Should we use "gzip" instead? CompressionType compression = (compressionEnabled_ ? CompressionType_ZlibWithSize : CompressionType_None); - StorageAccessor accessor(area_, storageCache_, GetMetricsRegistry()); + StorageAccessor accessor(area_, GetMetricsRegistry()); assert(attachmentType != FileContentType_Dicom && attachmentType != FileContentType_DicomUntilPixelData); // this method can not be used to store instances
--- a/OrthancServer/Sources/ServerContext.h Tue May 19 18:37:09 2026 +0200 +++ b/OrthancServer/Sources/ServerContext.h Tue May 19 18:50:45 2026 +0200 @@ -28,14 +28,12 @@ #include "OrthancHttpHandler.h" #include "ServerIndex.h" #include "ServerJobs/IStorageCommitmentFactory.h" -#include "ServerTranscoder.h" #include "../../OrthancFramework/Sources/DataSource/DataSourceReader.h" #include "../../OrthancFramework/Sources/DataSource/DicomDataSource.h" #include "../../OrthancFramework/Sources/DicomParsing/DicomModification.h" -#include "../../OrthancFramework/Sources/FileStorage/StorageAccessor.h" -#include "../../OrthancFramework/Sources/FileStorage/StorageCache.h" #include "../../OrthancFramework/Sources/JobsEngine/JobsEngine.h" +#include "../../OrthancFramework/Sources/MetricsRegistry.h" #include "../../OrthancFramework/Sources/MultiThreading/Semaphore.h" @@ -44,6 +42,7 @@ class DicomElement; class DicomStoreUserConnection; class OrthancPlugins; + class ServerTranscoder; class SharedArchive; class StorageCommitmentReports; class ThreadPool; @@ -195,7 +194,6 @@ ServerIndex index_; IPluginStorageArea& area_; - StorageCache storageCache_; bool compressionEnabled_; bool storeMD5_; @@ -312,7 +310,7 @@ void SetMaximumStorageCacheSize(size_t size) { - return storageCache_.SetMaximumSize(size); + // TODO-Streaming } void SetPatientLevelEnabled(bool enabled);
--- a/OrthancServer/Sources/ServerJobs/OrthancPeerStoreJob.cpp Tue May 19 18:37:09 2026 +0200 +++ b/OrthancServer/Sources/ServerJobs/OrthancPeerStoreJob.cpp Tue May 19 18:50:45 2026 +0200 @@ -28,6 +28,7 @@ #include "../../../OrthancFramework/Sources/Logging.h" #include "../../../OrthancFramework/Sources/SerializationToolbox.h" #include "../ServerContext.h" +#include "../ServerTranscoder.h" #include <dcmtk/dcmdata/dcfilefo.h>
--- a/OrthancServer/Sources/ServerJobs/ResourceModificationJob.cpp Tue May 19 18:37:09 2026 +0200 +++ b/OrthancServer/Sources/ServerJobs/ResourceModificationJob.cpp Tue May 19 18:50:45 2026 +0200 @@ -24,10 +24,12 @@ #include "../PrecompiledHeadersServer.h" #include "ResourceModificationJob.h" +#include "../../../OrthancFramework/Sources/DicomParsing/IDicomTranscoder.h" #include "../../../OrthancFramework/Sources/Logging.h" #include "../../../OrthancFramework/Sources/SerializationToolbox.h" #include "../DicomInstanceToStore.h" #include "../ServerContext.h" +#include "../ServerTranscoder.h" #include <dcmtk/dcmdata/dcfilefo.h> #include <dcmtk/dcmdata/dcdeftag.h>
--- a/OrthancServer/Sources/ServerJobs/ThreadedInstancesLoader.cpp Tue May 19 18:37:09 2026 +0200 +++ b/OrthancServer/Sources/ServerJobs/ThreadedInstancesLoader.cpp Tue May 19 18:50:45 2026 +0200 @@ -27,6 +27,7 @@ #include "../../../OrthancFramework/Sources/DicomParsing/IDicomTranscoder.h" #include "../../../OrthancFramework/Sources/Logging.h" #include "../ServerContext.h" +#include "../ServerTranscoder.h" static boost::mutex loaderThreadsCounterMutex; static uint32_t loaderThreadsCounter = 0;
--- a/OrthancServer/Sources/main.cpp Tue May 19 18:37:09 2026 +0200 +++ b/OrthancServer/Sources/main.cpp Tue May 19 18:50:45 2026 +0200 @@ -52,6 +52,7 @@ #include "ServerJobs/DicomRetrieveScuBaseJob.h" #include "ServerJobs/StorageCommitmentScpJob.h" #include "ServerToolbox.h" +#include "ServerTranscoder.h" #include "StorageCommitmentReports.h" #include <boost/algorithm/string/predicate.hpp>
