DiskIOModule.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2017 The Squid Software Foundation and contributors
3  *
4  * Squid software is distributed under GPLv2+ license and includes
5  * contributions from numerous individuals and organizations.
6  * Please see the COPYING and CONTRIBUTORS files for details.
7  */
8 
9 #ifndef SQUID_DISKIOMODULE_H
10 #define SQUID_DISKIOMODULE_H
11 
12 #include <vector>
13 
14 /* forward decls */
15 
16 class CacheManager;
17 
18 class DiskIOStrategy;
19 
21 {
22 
23 public:
25  static void SetupAllModules();
26  static void ModuleAdd(DiskIOModule &);
27  static void FreeAllModules();
28 
29  static DiskIOModule *Find(char const *type);
30 
34  static DiskIOModule *FindDefault();
35  static std::vector<DiskIOModule*> const &Modules();
36  typedef std::vector<DiskIOModule*>::iterator iterator;
37  typedef std::vector<DiskIOModule*>::const_iterator const_iterator;
38  DiskIOModule();
39  virtual ~DiskIOModule() {}
40 
41  virtual void init() = 0;
42  //virtual void registerWithCacheManager(void);
43  virtual void gracefulShutdown() = 0;
44  virtual DiskIOStrategy *createStrategy() = 0;
45 
46  virtual char const *type () const = 0;
47  // Not implemented
48  DiskIOModule(DiskIOModule const &);
50 
51 protected:
52  //bool initialised;
53  static void RegisterAllModulesWithCacheManager(void);
54 
55 private:
56  static std::vector<DiskIOModule*> &GetModules();
57  static std::vector<DiskIOModule*> *_Modules;
58 };
59 
60 #endif /* SQUID_DISKIOMODULE_H */
61 
virtual char const * type() const =0
virtual DiskIOStrategy * createStrategy()=0
static std::vector< DiskIOModule * > * _Modules
Definition: DiskIOModule.h:57
virtual ~DiskIOModule()
Definition: DiskIOModule.h:39
static DiskIOModule * Find(char const *type)
static DiskIOModule * FindDefault()
virtual void init()=0
static void ModuleAdd(DiskIOModule &)
Definition: DiskIOModule.cc:72
static void RegisterAllModulesWithCacheManager(void)
std::vector< DiskIOModule * >::iterator iterator
Definition: DiskIOModule.h:36
static std::vector< DiskIOModule * > const & Modules()
Definition: DiskIOModule.cc:85
static std::vector< DiskIOModule * > & GetModules()
Definition: DiskIOModule.cc:91
DiskIOModule & operator=(DiskIOModule const &)
static void FreeAllModules()
std::vector< DiskIOModule * >::const_iterator const_iterator
Definition: DiskIOModule.h:37
virtual void gracefulShutdown()=0
static void SetupAllModules()
Definition: DiskIOModule.cc:45

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors