stub_libstore.cc
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2020 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 
11 #define STUB_API "store/libstore.la"
12 #include "tests/STUB.h"
13 
14 #include "store/Controller.h"
15 namespace Store
16 {
20 void Controller::init() STUB
21 uint64_t Controller::maxSize() const STUB_RETVAL(0)
22 uint64_t Controller::minSize() const STUB_RETVAL(0)
23 uint64_t Controller::currentSize() const STUB_RETVAL(0)
24 uint64_t Controller::currentCount() const STUB_RETVAL(0)
25 int64_t Controller::maxObjectSize() const STUB_RETVAL(0)
26 void Controller::getStats(StoreInfoStats &) const STUB
27 void Controller::stat(StoreEntry &) const STUB
28 void Controller::sync() STUB
29 void Controller::maintain() STUB
30 void Controller::evictCached(StoreEntry &) STUB
31 void Controller::evictIfFound(const cache_key *) STUB
33 StoreEntry *Controller::find(const cache_key *) STUB_RETVAL(nullptr)
34 StoreEntry *Controller::peek(const cache_key *) STUB_RETVAL(nullptr)
35 StoreEntry *Controller::findCallbackXXX(const cache_key *) STUB_RETVAL(nullptr)
36 bool Controller::markedForDeletion(const cache_key *) const STUB_RETVAL(false)
37 bool Controller::markedForDeletionAndAbandoned(const StoreEntry &) const STUB_RETVAL(false)
38 bool Controller::hasReadableDiskEntry(const StoreEntry &) const STUB_RETVAL(false)
39 int64_t Controller::accumulateMore(StoreEntry &) const STUB_RETVAL(0)
40 void Controller::configure() STUB
41 void Controller::handleIdleEntry(StoreEntry &) STUB
42 void Controller::freeMemorySpace(const int) STUB
43 void Controller::memoryOut(StoreEntry &, const bool) STUB
44 void Controller::updateOnNotModified(StoreEntry *, StoreEntry &) STUB
45 bool Controller::allowCollapsing(StoreEntry *, const RequestFlags &, const HttpRequestMethod &) STUB_RETVAL(false)
46 void Controller::addReading(StoreEntry *, const cache_key *) STUB
47 void Controller::addWriting(StoreEntry *, const cache_key *) STUB
48 bool Controller::transientsReader(const StoreEntry &) const STUB_RETVAL(false)
49 bool Controller::transientsWriter(const StoreEntry &) const STUB_RETVAL(false)
50 void Controller::transientsCompleteWriting(StoreEntry &) STUB
51 void Controller::syncCollapsed(const sfileno) STUB
52 void Controller::stopSharing(StoreEntry &) STUB
53 int Controller::transientReaders(const StoreEntry &) const STUB_RETVAL(0)
54 void Controller::transientsDisconnect(StoreEntry &) STUB
55 void Controller::transientsClearCollapsingRequirement(StoreEntry &) STUB
56 void Controller::memoryDisconnect(StoreEntry &) STUB
57 StoreSearch *Controller::search() STUB_RETVAL(nullptr)
58 bool Controller::SmpAware() STUB_RETVAL(false)
59 int Controller::store_dirs_rebuilding = 0;
62 void Init(Controller *) STUB
63 void FreeMemory() STUB
64 }
65 
66 #include "store/Disk.h"
67 namespace Store
68 {
69 Disk::Disk(char const *) {STUB}
70 Disk::~Disk() {STUB}
71 char const *Disk::type() const STUB_RETVAL(nullptr)
72 bool Disk::needsDiskStrand() const STUB_RETVAL(false)
73 bool Disk::active() const STUB_RETVAL(false)
74 void Disk::diskFull() STUB
75 void Disk::create() STUB
76 StoreEntry *Disk::get(const cache_key *) STUB_RETVAL(nullptr)
77 uint64_t Disk::minSize() const STUB_RETVAL(0)
78 int64_t Disk::maxObjectSize() const STUB_RETVAL(0)
80 void Disk::stat(StoreEntry &) const STUB
83 void Disk::maintain() STUB
84 int64_t Disk::minObjectSize() const STUB_RETVAL(0)
85 void Disk::maxObjectSize(int64_t) STUB
86 bool Disk::objectSizeIsAcceptable(int64_t) const STUB_RETVAL(false)
87 void Disk::parseOptions(int) STUB
88 void Disk::dumpOptions(StoreEntry *) const STUB
90 void Disk::dump(StoreEntry &) const STUB
92 void Disk::statfs(StoreEntry &) const STUB
93 bool Disk::canLog(StoreEntry const &) const STUB_RETVAL(false)
94 void Disk::openLog() STUB
95 void Disk::closeLog() STUB
96 void Disk::logEntry(const StoreEntry &, int) const STUB
99 }
100 
101 #include "store/Disks.h"
102 namespace Store
103 {
104 Disks::Disks() {STUB}
105 void Disks::create() STUB
106 void Disks::init() STUB
107 StoreEntry *Disks::get(const cache_key *) STUB_RETVAL(nullptr)
108 uint64_t Disks::maxSize() const STUB_RETVAL(0)
109 uint64_t Disks::minSize() const STUB_RETVAL(0)
110 uint64_t Disks::currentSize() const STUB_RETVAL(0)
111 uint64_t Disks::currentCount() const STUB_RETVAL(0)
112 int64_t Disks::maxObjectSize() const STUB_RETVAL(0)
113 void Disks::getStats(StoreInfoStats &) const STUB
114 void Disks::stat(StoreEntry &) const STUB
115 void Disks::sync() STUB
116 void Disks::reference(StoreEntry &) STUB
117 bool Disks::dereference(StoreEntry &) STUB_RETVAL(false)
118 void Disks::updateHeaders(StoreEntry *) STUB
119 void Disks::maintain() STUB
120 bool Disks::anchorToCache(StoreEntry &, bool &) STUB_RETVAL(false)
121 bool Disks::updateAnchored(StoreEntry &) STUB_RETVAL(false)
122 void Disks::evictCached(StoreEntry &) STUB
123 void Disks::evictIfFound(const cache_key *) STUB
124 int Disks::callback() STUB_RETVAL(0)
125 void Disks::configure() STUB
126 int64_t Disks::accumulateMore(const StoreEntry&) const STUB_RETVAL(0)
127 bool Disks::SmpAware() STUB_RETVAL(false)
128 bool Disks::hasReadableEntry(const StoreEntry &) const STUB_RETVAL(false)
129 void Disks::Parse(DiskConfig &) STUB
130 void Disks::Dump(const DiskConfig &, StoreEntry &, const char *name) STUB
131 SwapDir *Disks::SelectSwapDir(const StoreEntry *) STUB_RETVAL(nullptr)
132 }
133 void storeDirOpenSwapLogs(void) STUB
135 void storeDirCloseSwapLogs(void) STUB
136 void allocate_new_swapdir(Store::DiskConfig &) STUB
137 void free_cachedir(Store::DiskConfig *) STUB;
138 void storeDirSwapLog(const StoreEntry *, int) STUB
139 
140 #include "store/LocalSearch.h"
141 namespace Store
142 {
144 }
145 
virtual void dump(StoreEntry &) const
Definition: Disk.cc:43
virtual bool doubleCheck(StoreEntry &)
Definition: Disk.cc:46
virtual bool active() const
Definition: Disk.cc:236
virtual void stat(StoreEntry &) const override
Definition: Disk.cc:63
virtual void reference(StoreEntry &e) override
somebody needs this entry (many cache replacement policies need to know)
Definition: Disk.cc:136
virtual void logEntry(const StoreEntry &e, int op) const
Definition: Disk.cc:227
virtual void create() override
create system resources needed for this store to operate in the future
Definition: Controller.cc:79
manages a single cache_dir
Definition: Disk.h:21
unsigned char cache_key
Store key.
Definition: forward.h:29
#define STUB_RETVAL(x)
Definition: STUB.h:41
void FreeMemory()
undo Init()
Definition: Controller.cc:951
virtual StoreEntry * get(const cache_key *) override
Definition: Disk.cc:393
virtual void closeLog()
Definition: Disk.cc:215
virtual int64_t maxObjectSize() const override
the maximum size of a storable object; -1 if unlimited
Definition: Disk.cc:103
void storeDirOpenSwapLogs(void) STUB int storeDirWriteCleanLogs(int) STUB_RETVAL(0) void storeDirCloseSwapLogs(void) STUB void allocate_new_swapdir(Store void storeDirSwapLog(const StoreEntry *, int) STUB namespace Store
virtual void statfs(StoreEntry &) const
Definition: Disk.cc:83
virtual void create() override
create system resources needed for this store to operate in the future
Definition: Disks.cc:221
int64_t minObjectSize() const
the size of the smallest entry this cache_dir can store
Definition: Disk.cc:96
virtual ~Disk()
Definition: Disk.cc:33
virtual void openLog()
Definition: Disk.cc:212
virtual bool dereference(StoreEntry &e) override
Definition: Disk.cc:139
const char * type() const
Definition: Disk.cc:230
virtual void diskFull()
Definition: Disk.cc:145
virtual bool needsDiskStrand() const
needs a dedicated kid process
Definition: Disk.cc:249
void free_cachedir(Store::DiskConfig *swap)
Definition: Disks.cc:803
Disk(char const *aType)
Definition: Disk.cc:24
StoreSearch * NewLocalSearch()
Definition: LocalSearch.cc:44
bool objectSizeIsAcceptable(int64_t objSize) const
Definition: Disk.cc:156
bool canLog(StoreEntry const &e) const
Definition: Disk.cc:188
void allocate_new_swapdir(Store::DiskConfig &swap)
Definition: Disks.cc:784
#define STUB
macro to stub a void function.
Definition: STUB.h:33
virtual ConfigOption * getOptionTree() const
Definition: Disk.cc:258
void parseOptions(int reconfiguring)
Definition: Disk.cc:267
signed_int32_t sfileno
Definition: forward.h:22
void storeDirCloseSwapLogs()
Definition: Disks.cc:681
void Init(Controller *root=nullptr)
initialize the storage module; a custom root is used by unit tests only
Definition: Controller.cc:945
void dumpOptions(StoreEntry *e) const
Definition: Disk.cc:307
virtual int writeCleanStart()
Definition: Disk.cc:218
virtual void maintain() override
perform regular periodic maintenance; TODO: move to UFSSwapDir::Maintain
Definition: Disk.cc:86
int storeDirWriteCleanLogs(int reopen)
Definition: Disks.cc:697
virtual void writeCleanDone()
Definition: Disk.cc:224
#define STUB_NOP
Definition: STUB.h:37
virtual uint64_t minSize() const override
the minimum size the store will shrink to via normal housekeeping
Definition: Disk.cc:89
void const char HLPCB * callback
Definition: stub_helper.cc:16
void Controller::create() STUB void Controller Controller nil
void storeDirOpenSwapLogs()
Definition: Disks.cc:674
virtual void getStats(StoreInfoStats &stats) const override
collect statistics
Definition: Disk.cc:52
#define false
Definition: GnuRegex.c:233
static Parsed Parse(const SBuf &buf)
extracts PROXY protocol v1 header from the given buffer
Definition: Parser.cc:112
virtual void create() override
create system resources needed for this store to operate in the future
Definition: Disk.cc:40
High-level store statistics used by mgr:info action. Used inside PODs!
Definition: StoreStats.h:13
virtual ~Controller() override
Definition: Controller.cc:45
Controller & Root()
safely access controller singleton
Definition: Controller.cc:938

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors