StoreFSufs.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2022 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_STOREFSUFS_H
10#define SQUID_STOREFSUFS_H
11
17#include "StoreFileSystem.h"
18
19class DiskIOModule;
20
21namespace Fs
22{
23namespace Ufs
24{
33template <class TheSwapDir>
35{
36public:
38 StoreFSufs(char const *DefaultModuleType, char const *label);
39 virtual ~StoreFSufs() {}
40
41 /* StoreFileSystem API */
42 virtual const char *type() const override;
43 virtual SwapDir *createSwapDir() override;
44
45protected:
47 char const *moduleName;
48 char const *label;
49};
50
51template <class C>
52StoreFSufs<C>::StoreFSufs(char const *defaultModuleName, char const *aLabel) : IO(nullptr), moduleName(defaultModuleName), label(aLabel)
53{
54 FsAdd(*this);
55}
56
57template <class C>
58char const *
60{
61 return label;
62}
63
64template <class C>
65SwapDir *
67{
68 C *result = new C(type(), moduleName);
69 return result;
70}
71
72} /* namespace Ufs */
73} /* namespace Fs */
74
75#endif /* SQUID_STOREFSUFS_H */
76
char const * moduleName
Definition: StoreFSufs.h:47
virtual SwapDir * createSwapDir() override
Definition: StoreFSufs.h:66
virtual const char * type() const override
Definition: StoreFSufs.h:59
StoreFSufs(char const *DefaultModuleType, char const *label)
Definition: StoreFSufs.h:52
char const * label
Definition: StoreFSufs.h:48
static StoreFileSystem & GetInstance()
virtual ~StoreFSufs()
Definition: StoreFSufs.h:39
DiskIOModule * IO
Definition: StoreFSufs.h:46
static void FsAdd(StoreFileSystem &)
manages a single cache_dir
Definition: Disk.h:22
int type
Definition: errorpage.cc:152
static uint32 C
Definition: md4.c:43
Definition: Module.h:13

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors