#include <DiskIOModule.h>
Public Types | |
typedef std::vector< DiskIOModule * >::iterator | iterator |
typedef std::vector< DiskIOModule * >::const_iterator | const_iterator |
Public Member Functions | |
DiskIOModule () | |
virtual | ~DiskIOModule () |
virtual void | init ()=0 |
virtual void | gracefulShutdown ()=0 |
virtual DiskIOStrategy * | createStrategy ()=0 |
virtual char const * | type () const =0 |
DiskIOModule (DiskIOModule const &) | |
DiskIOModule & | operator= (DiskIOModule const &) |
Static Public Member Functions | |
static void | SetupAllModules () |
static void | ModuleAdd (DiskIOModule &) |
static void | FreeAllModules () |
static DiskIOModule * | Find (char const *type) |
static DiskIOModule * | FindDefault () |
static std::vector< DiskIOModule * > const & | Modules () |
Static Protected Member Functions | |
static void | RegisterAllModulesWithCacheManager (void) |
Static Private Member Functions | |
static std::vector< DiskIOModule * > & | GetModules () |
Static Private Attributes | |
static std::vector< DiskIOModule * > * | _Modules = nullptr |
Detailed Description
Definition at line 20 of file DiskIOModule.h.
Member Typedef Documentation
◆ const_iterator
typedef std::vector<DiskIOModule*>::const_iterator DiskIOModule::const_iterator |
Definition at line 37 of file DiskIOModule.h.
◆ iterator
typedef std::vector<DiskIOModule*>::iterator DiskIOModule::iterator |
Definition at line 36 of file DiskIOModule.h.
Constructor & Destructor Documentation
◆ DiskIOModule() [1/2]
DiskIOModule::DiskIOModule | ( | ) |
We cannot call ModuleAdd(*this) here as the virtual methods are not yet available. We leave that to SetupAllModules() later.
Definition at line 36 of file DiskIOModule.cc.
◆ ~DiskIOModule()
|
inlinevirtual |
Definition at line 39 of file DiskIOModule.h.
◆ DiskIOModule() [2/2]
DiskIOModule::DiskIOModule | ( | DiskIOModule const & | ) |
Definition at line 25 of file stub_libdiskio.cc.
References STUB.
Member Function Documentation
◆ createStrategy()
|
pure virtual |
Implemented in BlockingDiskIOModule, DiskDaemonDiskIOModule, DiskThreadsDiskIOModule, IpcIoDiskIOModule, and MmappedDiskIOModule.
Referenced by Fs::Ufs::UFSSwapDir::changeIO().
◆ Find()
|
static |
Definition at line 114 of file DiskIOModule.cc.
References GetModules(), and type().
Referenced by Fs::Ufs::UFSSwapDir::UFSSwapDir(), FindDefault(), Rock::SwapDir::init(), Rock::SwapDir::needsDiskStrand(), Fs::Ufs::UFSSwapDir::optionIOParse(), and TestUfs::testUfsSearch().
◆ FindDefault()
|
static |
Find any usable disk module. This will look for the 'best' available module for this system.
Best IO options are in order:
Definition at line 124 of file DiskIOModule.cc.
References Find().
Referenced by TestDiskIO::testFindDefault().
◆ FreeAllModules()
|
static |
Called when a graceful shutdown is to occur of each fs module.
Definition at line 104 of file DiskIOModule.cc.
References GetModules(), and gracefulShutdown().
Referenced by SquidShutdown().
◆ GetModules()
|
staticprivate |
Definition at line 91 of file DiskIOModule.cc.
References _Modules.
Referenced by Find(), FreeAllModules(), ModuleAdd(), Modules(), and SetupAllModules().
◆ gracefulShutdown()
|
pure virtual |
Implemented in BlockingDiskIOModule, DiskDaemonDiskIOModule, DiskThreadsDiskIOModule, IpcIoDiskIOModule, and MmappedDiskIOModule.
Referenced by FreeAllModules().
◆ init()
|
pure virtual |
Implemented in BlockingDiskIOModule, DiskDaemonDiskIOModule, DiskThreadsDiskIOModule, IpcIoDiskIOModule, and MmappedDiskIOModule.
◆ ModuleAdd()
|
static |
Definition at line 72 of file DiskIOModule.cc.
References assert, GetModules(), and instance.
Referenced by BlockingDiskIOModule::BlockingDiskIOModule(), DiskDaemonDiskIOModule::DiskDaemonDiskIOModule(), DiskThreadsDiskIOModule::DiskThreadsDiskIOModule(), IpcIoDiskIOModule::IpcIoDiskIOModule(), and MmappedDiskIOModule::MmappedDiskIOModule().
◆ Modules()
|
static |
Definition at line 85 of file DiskIOModule.cc.
References GetModules().
◆ operator=()
DiskIOModule & DiskIOModule::operator= | ( | DiskIOModule const & | ) |
Definition at line 26 of file stub_libdiskio.cc.
References STUB.
◆ RegisterAllModulesWithCacheManager()
|
staticprotected |
◆ SetupAllModules()
|
static |
Poke all compiled modules for self-setup
Definition at line 45 of file DiskIOModule.cc.
References BlockingDiskIOModule::GetInstance(), DiskDaemonDiskIOModule::GetInstance(), DiskThreadsDiskIOModule::GetInstance(), IpcIoDiskIOModule::GetInstance(), MmappedDiskIOModule::GetInstance(), and GetModules().
Referenced by SquidMain().
◆ type()
|
pure virtual |
Implemented in BlockingDiskIOModule, DiskDaemonDiskIOModule, DiskThreadsDiskIOModule, IpcIoDiskIOModule, and MmappedDiskIOModule.
Referenced by Fs::Ufs::UFSSwapDir::changeIO(), and Find().
Member Data Documentation
◆ _Modules
|
staticprivate |
Definition at line 57 of file DiskIOModule.h.
Referenced by GetModules().
The documentation for this class was generated from the following files:
- src/DiskIO/DiskIOModule.h
- src/DiskIO/DiskIOModule.cc
- src/tests/stub_libdiskio.cc