comparison Plugin/Cache/CacheScheduler.h @ 266:4e9d30c19b4b

linking against orthanc framework library
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 10 Jun 2020 12:32:46 +0200
parents aee499712ac4
children e376158e2dbb
comparison
equal deleted inserted replaced
265:af7108b06b4d 266:4e9d30c19b4b
22 #pragma once 22 #pragma once
23 23
24 #include "CacheManager.h" 24 #include "CacheManager.h"
25 #include "ICacheFactory.h" 25 #include "ICacheFactory.h"
26 #include "IPrefetchPolicy.h" 26 #include "IPrefetchPolicy.h"
27 #include <Core/MultiThreading/SharedMessageQueue.h> 27
28 #include <Compatibility.h> // For std::unique_ptr<>
29 #include <MultiThreading/SharedMessageQueue.h>
28 30
29 #include <boost/thread.hpp> 31 #include <boost/thread.hpp>
30 #include <stdio.h> 32 #include <stdio.h>
31 33
32 namespace OrthancPlugins 34 namespace OrthancPlugins
38 class PrefetchQueue; 40 class PrefetchQueue;
39 class BundleScheduler; 41 class BundleScheduler;
40 42
41 typedef std::map<int, BundleScheduler*> BundleSchedulers; 43 typedef std::map<int, BundleScheduler*> BundleSchedulers;
42 44
43 size_t maxPrefetchSize_; 45 size_t maxPrefetchSize_;
44 boost::mutex cacheMutex_; 46 boost::mutex cacheMutex_;
45 boost::mutex factoryMutex_; 47 boost::mutex factoryMutex_;
46 boost::recursive_mutex policyMutex_; 48 boost::recursive_mutex policyMutex_;
47 CacheManager& cache_; 49 CacheManager& cache_;
48 std::auto_ptr<IPrefetchPolicy> policy_; 50 std::unique_ptr<IPrefetchPolicy> policy_;
49 BundleSchedulers bundles_; 51 BundleSchedulers bundles_;
50 52
51 void ApplyPrefetchPolicy(int bundle, 53 void ApplyPrefetchPolicy(int bundle,
52 const std::string& item, 54 const std::string& item,
53 const std::string& content); 55 const std::string& content);
54 56