Mercurial > hg > orthanc
comparison OrthancFramework/Sources/Cache/SharedArchive.h @ 5310:b5c502bcaf99
added a route to DELETE /jobs/../archive
author | Alain Mazy <am@osimis.io> |
---|---|
date | Mon, 12 Jun 2023 18:42:06 +0200 |
parents | 0ea402b4d901 |
children | 48b8dae6dc77 |
comparison
equal
deleted
inserted
replaced
5309:fb231da5c0f1 | 5310:b5c502bcaf99 |
---|---|
42 class ORTHANC_PUBLIC SharedArchive : public boost::noncopyable | 42 class ORTHANC_PUBLIC SharedArchive : public boost::noncopyable |
43 { | 43 { |
44 private: | 44 private: |
45 typedef std::map<std::string, IDynamicObject*> Archive; | 45 typedef std::map<std::string, IDynamicObject*> Archive; |
46 | 46 |
47 size_t maxSize_; | 47 size_t maxSize_; |
48 boost::mutex mutex_; | 48 boost::recursive_mutex mutex_; |
49 Archive archive_; | 49 Archive archive_; |
50 LeastRecentlyUsedIndex<std::string> lru_; | 50 LeastRecentlyUsedIndex<std::string> lru_; |
51 | 51 |
52 void RemoveInternal(const std::string& id); | 52 void RemoveInternal(const std::string& id); |
53 | 53 |
54 public: | 54 public: |
55 class ORTHANC_PUBLIC Accessor : public boost::noncopyable | 55 class ORTHANC_PUBLIC Accessor : public boost::noncopyable |
56 { | 56 { |
57 private: | 57 private: |
58 boost::mutex::scoped_lock lock_; | 58 boost::recursive_mutex::scoped_lock lock_; |
59 IDynamicObject* item_; | 59 IDynamicObject* item_; |
60 | 60 |
61 public: | 61 public: |
62 Accessor(SharedArchive& that, | 62 Accessor(SharedArchive& that, |
63 const std::string& id); | 63 const std::string& id); |
64 | 64 |