comparison Plugin/Cache/CacheScheduler.cpp @ 96:a6ba21a083e5 refactoring

major refactoring
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 27 Nov 2015 18:26:55 +0100
parents abdde1dfb3eb
children c8ca47a67bf3
comparison
equal deleted inserted replaced
95:dbe7c97b6b4a 96:a6ba21a083e5
252 const std::string& item) 252 const std::string& item)
253 { 253 {
254 content.clear(); 254 content.clear();
255 return factory_->Create(content, item); 255 return factory_->Create(content, item);
256 } 256 }
257
258 ICacheFactory& GetFactory()
259 {
260 return *factory_;
261 }
257 }; 262 };
258 263
259 264
260 265
261 CacheScheduler::BundleScheduler& CacheScheduler::GetBundleScheduler(unsigned int bundleIndex) 266 CacheScheduler::BundleScheduler& CacheScheduler::GetBundleScheduler(unsigned int bundleIndex)
399 { 404 {
400 boost::recursive_mutex::scoped_lock lock(policyMutex_); 405 boost::recursive_mutex::scoped_lock lock(policyMutex_);
401 policy_.reset(policy); 406 policy_.reset(policy);
402 } 407 }
403 408
409
410 ICacheFactory& CacheScheduler::GetFactory(int bundle)
411 {
412 return GetBundleScheduler(bundle).GetFactory();
413 }
404 } 414 }