]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/DiskIO/DiskDaemon/DiskDaemonDiskIOModule.cc
2 * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
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.
10 #include "DiskDaemonDiskIOModule.h"
11 #include "DiskdIOStrategy.h"
12 #include "DiskIO/DiskDaemon/DiskdAction.h"
13 #include "mgr/Registration.h"
16 DiskDaemonDiskIOModule::DiskDaemonDiskIOModule() : initialised(false)
21 DiskDaemonDiskIOModule
&
22 DiskDaemonDiskIOModule::GetInstance()
28 DiskDaemonDiskIOModule::init()
30 /* We may be reused - for instance in coss - eventually.
31 * When we do, we either need per-using-module stats (
32 * no singleton pattern), or we need to refcount the
33 * initialisation level and handle multiple clients.
37 memset(&diskd_stats
, '\0', sizeof(diskd_stats
));
41 * No debugging here please because this method is called before
42 * the debug log is configured and we'll get the message on
43 * stderr when doing things like 'squid -k reconfigure'
45 debugs(47, DBG_IMPORTANT
, "diskd started");
49 registerWithCacheManager();
53 DiskDaemonDiskIOModule::registerWithCacheManager(void)
55 Mgr::RegisterAction("diskd", "DISKD Stats", &DiskdAction::Create
, 0, 1);
59 DiskDaemonDiskIOModule::gracefulShutdown()
65 DiskDaemonDiskIOModule::createStrategy()
67 return new DiskdIOStrategy();
70 DiskDaemonDiskIOModule
DiskDaemonDiskIOModule::Instance
;
73 DiskDaemonDiskIOModule::type () const