comparison OrthancServer/Sources/ServerIndex.h @ 5603:b2a97dfd719f

monitoring of stable resources now also considers the resource type
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 08 May 2024 10:29:35 +0200
parents 48b8dae6dc77
children 6e2dad336446 f7adfb22e20e
comparison
equal deleted inserted replaced
5599:3487684fd331 5603:b2a97dfd719f
41 bool done_; 41 bool done_;
42 boost::mutex monitoringMutex_; 42 boost::mutex monitoringMutex_;
43 boost::thread flushThread_; 43 boost::thread flushThread_;
44 boost::thread unstableResourcesMonitorThread_; 44 boost::thread unstableResourcesMonitorThread_;
45 45
46 LeastRecentlyUsedIndex<int64_t, UnstableResourcePayload> unstableResources_; 46 LeastRecentlyUsedIndex<std::pair<ResourceType, int64_t>, UnstableResourcePayload> unstableResources_;
47 47
48 MaxStorageMode maximumStorageMode_; 48 MaxStorageMode maximumStorageMode_;
49 uint64_t maximumStorageSize_; 49 uint64_t maximumStorageSize_;
50 unsigned int maximumPatients_; 50 unsigned int maximumPatients_;
51 51
53 unsigned int threadSleep); 53 unsigned int threadSleep);
54 54
55 static void UnstableResourcesMonitorThread(ServerIndex* that, 55 static void UnstableResourcesMonitorThread(ServerIndex* that,
56 unsigned int threadSleep); 56 unsigned int threadSleep);
57 57
58 void MarkAsUnstable(int64_t id, 58 void MarkAsUnstable(ResourceType type,
59 Orthanc::ResourceType type, 59 int64_t id,
60 const std::string& publicId); 60 const std::string& publicId);
61 61
62 bool IsUnstableResource(int64_t id); 62 bool IsUnstableResource(ResourceType type,
63 int64_t id);
63 64
64 public: 65 public:
65 ServerIndex(ServerContext& context, 66 ServerIndex(ServerContext& context,
66 IDatabaseWrapper& database, 67 IDatabaseWrapper& database,
67 unsigned int threadSleepGranularityMilliseconds); 68 unsigned int threadSleepGranularityMilliseconds);