600
|
1 |
/**
|
|
2 |
* @file cachegenerator.hpp
|
|
3 |
*/
|
|
4 |
|
|
5 |
|
|
6 |
#ifndef ROM_TOOLS_ROFSBUILD_CACHE_CACHEGENERATOR_H_
|
|
7 |
#define ROM_TOOLS_ROFSBUILD_CACHE_CACHEGENERATOR_H_
|
|
8 |
|
|
9 |
|
|
10 |
/**
|
|
11 |
* @class CacheGenerator
|
|
12 |
* @brief Cache Generator will be running in a separated thread, its job is to pick up an invalidated entry from the CacheableList and then write the content into the cache.
|
|
13 |
*/
|
|
14 |
class CacheGenerator : public boost::thread
|
|
15 |
{
|
|
16 |
public:
|
|
17 |
/**
|
|
18 |
* @fn static CacheGenerator* CacheGenerator::GetInstance(void)
|
|
19 |
* @brief Get singleton instance.
|
|
20 |
* @return The singleton instance.
|
|
21 |
* @exception CacheException Catch resource allocation failures.
|
|
22 |
*/
|
|
23 |
static CacheGenerator* GetInstance(void) throw (CacheException);
|
|
24 |
|
|
25 |
/**
|
|
26 |
* @fn void CacheGenerator::ProcessFiles(void)
|
|
27 |
* @brief Pick up an invalidated entry from the cacheable list and write the content into the cache (i.e. under cache root directory).
|
|
28 |
*/
|
|
29 |
static void ProcessFiles(void) throw (CacheException);
|
|
30 |
protected:
|
|
31 |
static CacheGenerator* Only;
|
|
32 |
private:
|
|
33 |
CacheGenerator(void);
|
|
34 |
|
|
35 |
CacheGenerator(const CacheGenerator&);
|
|
36 |
|
|
37 |
CacheGenerator& operator = (const CacheGenerator&);
|
|
38 |
};
|
|
39 |
|
|
40 |
|
|
41 |
#endif /* defined ROM_TOOLS_ROFSBUILD_CACHE_CACHEGENERATOR_H_ */
|