DiskDaemonDiskIOModule.cc
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 #include "squid.h"
10 #include "DiskDaemonDiskIOModule.h"
11 #include "DiskdIOStrategy.h"
13 #include "mgr/Registration.h"
14 #include "Store.h"
15 
17 {
18  ModuleAdd(*this);
19 }
20 
23 {
24  return Instance;
25 }
26 
27 void
29 {
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.
34  * RBC - 20030718.
35  */
37  memset(&diskd_stats, '\0', sizeof(diskd_stats));
38 #if 0
39  /*
40  * DPW 2007-04-12
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'
44  */
45  debugs(47, DBG_IMPORTANT, "diskd started");
46 #endif
47  initialised = true;
48 
50 }
51 
52 void
54 {
55  Mgr::RegisterAction("diskd", "DISKD Stats", &DiskdAction::Create, 0, 1);
56 }
57 
58 void
60 {
61  initialised = false;
62 }
63 
66 {
67  return new DiskdIOStrategy();
68 }
69 
71 
72 char const *
74 {
75  return "DiskDaemon";
76 }
77 
#define assert(EX)
Definition: assert.h:17
virtual char const * type() const
#define debugs(SECTION, LEVEL, CONTENT)
Definition: Debug.h:123
#define DBG_IMPORTANT
Definition: Debug.h:45
void RegisterAction(char const *action, char const *desc, OBJH *handler, int pw_req_flag, int atomic)
Definition: Registration.cc:16
static void ModuleAdd(DiskIOModule &)
Definition: DiskIOModule.cc:72
virtual DiskIOStrategy * createStrategy()
static DiskDaemonDiskIOModule & GetInstance()
static DiskDaemonDiskIOModule Instance
diskd_stats_t diskd_stats
static Pointer Create(const Mgr::CommandPointer &aCmd)
Definition: DiskdAction.cc:60
#define false
Definition: GnuRegex.c:233

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors