DiskDaemonDiskIOModule.cc
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2023 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 
39  initialised = true;
40 
42 }
43 
44 void
46 {
47  Mgr::RegisterAction("diskd", "DISKD Stats", &DiskdAction::Create, 0, 1);
48 }
49 
50 void
52 {
53  initialised = false;
54 }
55 
58 {
59  return new DiskdIOStrategy();
60 }
61 
63 
64 char const *
66 {
67  return "DiskDaemon";
68 }
69 
#define assert(EX)
Definition: assert.h:17
diskd_stats_t diskd_stats
DiskIOStrategy * createStrategy() override
void RegisterAction(char const *action, char const *desc, OBJH *handler, Protected, Atomic, Format)
Definition: Registration.cc:54
const char * type() const override
static void ModuleAdd(DiskIOModule &)
Definition: DiskIOModule.cc:72
static DiskDaemonDiskIOModule Instance
static Pointer Create(const Mgr::CommandPointer &aCmd)
Definition: DiskdAction.cc:60
static DiskDaemonDiskIOModule & GetInstance()

 

Introduction

Documentation

Support

Miscellaneous