comparison OrthancServer/ServerIndex.cpp @ 270:e6a4c4329481

parameters for storage capacity
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 07 Dec 2012 15:01:12 +0100
parents f6fdf5abe751
children 337c506461d2
comparison
equal deleted inserted replaced
269:f6fdf5abe751 270:e6a4c4329481
836 836
837 void ServerIndex::SetMaximumPatientCount(unsigned int count) 837 void ServerIndex::SetMaximumPatientCount(unsigned int count)
838 { 838 {
839 boost::mutex::scoped_lock lock(mutex_); 839 boost::mutex::scoped_lock lock(mutex_);
840 maximumPatients_ = count; 840 maximumPatients_ = count;
841
842 if (count == 0)
843 {
844 LOG(WARNING) << "No limit on the number of stored patients";
845 }
846 else
847 {
848 LOG(WARNING) << "At most " << count << " patients will be stored";
849 }
850
841 StandaloneRecycling(); 851 StandaloneRecycling();
842 } 852 }
843 853
844 void ServerIndex::SetMaximumStorageSize(uint64_t size) 854 void ServerIndex::SetMaximumStorageSize(uint64_t size)
845 { 855 {
846 boost::mutex::scoped_lock lock(mutex_); 856 boost::mutex::scoped_lock lock(mutex_);
847 maximumStorageSize_ = size; 857 maximumStorageSize_ = size;
858
859 if (size == 0)
860 {
861 LOG(WARNING) << "No limit on the size of the storage area";
862 }
863 else
864 {
865 LOG(WARNING) << "At most " << (size / (1024 * 1024)) << "MB will be used for the storage area";
866 }
867
848 StandaloneRecycling(); 868 StandaloneRecycling();
849 } 869 }
850 870
851 void ServerIndex::StandaloneRecycling() 871 void ServerIndex::StandaloneRecycling()
852 { 872 {