Mercurial > hg > orthanc
comparison OrthancServer/ServerIndex.h @ 269:f6fdf5abe751
recycling up and running
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 07 Dec 2012 14:46:44 +0100 |
parents | 4bc02e2254ec |
children | 337c506461d2 |
comparison
equal
deleted
inserted
replaced
268:4bc02e2254ec | 269:f6fdf5abe751 |
---|---|
60 boost::thread flushThread_; | 60 boost::thread flushThread_; |
61 | 61 |
62 std::auto_ptr<Internals::ServerIndexListener> listener_; | 62 std::auto_ptr<Internals::ServerIndexListener> listener_; |
63 std::auto_ptr<DatabaseWrapper> db_; | 63 std::auto_ptr<DatabaseWrapper> db_; |
64 | 64 |
65 uint64_t maximumStorageSize_; | |
66 unsigned int maximumPatients_; | |
67 | |
65 void MainDicomTagsToJson(Json::Value& result, | 68 void MainDicomTagsToJson(Json::Value& result, |
66 int64_t resourceId); | 69 int64_t resourceId); |
67 | 70 |
68 SeriesStatus GetSeriesStatus(int id); | 71 SeriesStatus GetSeriesStatus(int id); |
69 | 72 |
70 bool IsRecyclingNeeded(uint64_t instanceSize); | 73 bool IsRecyclingNeeded(uint64_t instanceSize); |
71 | 74 |
72 void Recycle(uint64_t instanceSize, | 75 void Recycle(uint64_t instanceSize, |
73 const std::string& newPatientId); | 76 const std::string& newPatientId); |
74 | 77 |
78 void StandaloneRecycling(); | |
79 | |
75 public: | 80 public: |
76 typedef std::list<FileInfo> Attachments; | 81 typedef std::list<FileInfo> Attachments; |
77 | 82 |
78 ServerIndex(ServerContext& context, | 83 ServerIndex(ServerContext& context, |
79 const std::string& dbPath); | 84 const std::string& dbPath); |
80 | 85 |
81 ~ServerIndex(); | 86 ~ServerIndex(); |
87 | |
88 uint64_t GetMaximumStorageSize() const | |
89 { | |
90 return maximumStorageSize_; | |
91 } | |
92 | |
93 uint64_t GetMaximumPatientCount() const | |
94 { | |
95 return maximumPatients_; | |
96 } | |
97 | |
98 // "size == 0" means no limit on the storage size | |
99 void SetMaximumStorageSize(uint64_t size); | |
100 | |
101 // "count == 0" means no limit on the number of patients | |
102 void SetMaximumPatientCount(unsigned int count); | |
82 | 103 |
83 StoreStatus Store(const DicomMap& dicomSummary, | 104 StoreStatus Store(const DicomMap& dicomSummary, |
84 const Attachments& attachments, | 105 const Attachments& attachments, |
85 const std::string& remoteAet); | 106 const std::string& remoteAet); |
86 | 107 |