stub_libstore.cc
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2019 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)
27 void Controller::stat(StoreEntry &) const STUB
28 void Controller::sync() STUB
29 void Controller::maintain() STUB
30 void Controller::evictCached(StoreEntry &) 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)
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)
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 *, const 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
52 void Controller::stopSharing(StoreEntry &) STUB
53 int Controller::transientReaders(const StoreEntry &) const STUB_RETVAL(0)
54 void Controller::transientsDisconnect(StoreEntry &) STUB
56 void Controller::memoryDisconnect(StoreEntry &) STUB
59 int Controller::store_dirs_rebuilding = 0;
60 Controller nil;
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
81 void Disk::reference(StoreEntry &) STUB
82 bool Disk::dereference(StoreEntry &) STUB_RETVAL(false)
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
91 bool Disk::doubleCheck(StoreEntry &) STUB_RETVAL(false)
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
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 }
130 void storeDirOpenSwapLogs(void) STUB
132 void storeDirCloseSwapLogs(void) STUB
135 STDIRSELECT *storeDirSelectSwapDir = nullptr;
136 void storeDirSwapLog(const StoreEntry *, int) STUB
137 
138 #include "store/LocalSearch.h"
139 namespace Store
140 {
142 }
143 
virtual void stat(StoreEntry &) const override
Definition: Disks.cc:435
void Init(Controller *root=nullptr)
initialize the storage module; a custom root is used by unit tests only
Definition: Controller.cc:884
virtual void getStats(StoreInfoStats &stats) const override
collect statistics
Definition: Disk.cc:52
StoreSearch * search()
Definition: Controller.cc:215
virtual int64_t maxObjectSize() const override
the maximum size of a storable object; -1 if unlimited
Definition: Disk.cc:103
virtual void evictIfFound(const cache_key *) override
Definition: Disks.cc:506
virtual void sync() override
prepare for shutdown
Definition: Disks.cc:482
virtual void closeLog()
Definition: Disk.cc:215
virtual bool dereference(StoreEntry &e) override
Definition: Disks.cc:454
int64_t minObjectSize() const
the size of the smallest entry this cache_dir can store
Definition: Disk.cc:96
void updateLimits()
slowly calculate (and cache) hi/lo watermarks and similar limits
Definition: Disks.cc:358
bool transientsWriter(const StoreEntry &) const
whether the entry is in "writing to Transients" I/O state
Definition: Controller.cc:441
virtual void statfs(StoreEntry &) const
Definition: Disk.cc:83
StoreEntry * find(const cache_key *)
Definition: Controller.cc:325
virtual uint64_t currentCount() const override
the total number of objects stored right now
Definition: Disks.cc:339
virtual uint64_t minSize() const override
the minimum size the store will shrink to via normal housekeeping
Definition: Disks.cc:313
unsigned char cache_key
Store key.
Definition: forward.h:29
bool markedForDeletionAndAbandoned(const StoreEntry &) const
Definition: Controller.cc:310
char const * type() const
Definition: Disk.cc:230
virtual void openLog()
Definition: Disk.cc:212
virtual void sync() override
prepare for shutdown
Definition: Controller.cc:222
virtual bool updateAnchored(StoreEntry &) override
Definition: Disks.cc:541
void stopSharing(StoreEntry &)
stop any current (and prevent any future) SMP sharing of the given entry
Definition: Controller.cc:592
virtual bool anchorToCache(StoreEntry &e, bool &inSync) override
Definition: Disks.cc:515
bool hasReadableEntry(const StoreEntry &) const
whether any of disk caches has entry with e.key
Definition: Disks.cc:561
void freeMemorySpace(const int spaceRequired)
Definition: Controller.cc:497
virtual void reference(StoreEntry &) override
somebody needs this entry (many cache replacement policies need to know)
Definition: Disks.cc:448
bool transientsReader(const StoreEntry &) const
whether the entry is in "reading from Transients" I/O state
Definition: Controller.cc:435
virtual void stat(StoreEntry &) const override
Definition: Disk.cc:63
Controller & Root()
safely access controller singleton
Definition: Controller.cc:877
High-level store statistics used by mgr:info action. Used inside PODs!
Definition: StoreStats.h:13
virtual bool dereference(StoreEntry &e) override
Definition: Disk.cc:139
void storeDirOpenSwapLogs()
Definition: Disks.cc:570
virtual void reference(StoreEntry &e) override
somebody needs this entry (many cache replacement policies need to know)
Definition: Disk.cc:136
void updateLimits()
slowly calculate (and cache) hi/lo watermarks and similar limits
Definition: Controller.cc:198
void transientsDisconnect(StoreEntry &)
disassociates the entry from the intransit table
Definition: Controller.cc:620
virtual uint64_t maxSize() const override
Definition: Controller.cc:163
int64_t accumulateMore(StoreEntry &) const
Definition: Controller.cc:447
virtual void getStats(StoreInfoStats &stats) const override
collect statistics
Definition: Disks.cc:419
virtual uint64_t maxSize() const override
Definition: Disks.cc:300
bool hasReadableDiskEntry(const StoreEntry &) const
whether there is a disk entry with e.key
Definition: Controller.cc:319
virtual void maintain() override
perform regular periodic maintenance; TODO: move to UFSSwapDir::Maintain
Definition: Controller.cc:93
virtual ~Controller() override
Definition: Controller.cc:45
#define STUB_RETVAL(x)
Definition: STUB.h:41
int transientReaders(const StoreEntry &) const
number of the transient entry readers some time ago
Definition: Controller.cc:613
void parseOptions(int reconfiguring)
Definition: Disk.cc:267
bool objectSizeIsAcceptable(int64_t objSize) const
Definition: Disk.cc:156
void dumpOptions(StoreEntry *e) const
Definition: Disk.cc:307
virtual ConfigOption * getOptionTree() const
Definition: Disk.cc:258
void handleIdleEntry(StoreEntry &)
called when the entry is no longer needed by any transaction
Definition: Controller.cc:634
bool markedForDeletion(const cache_key *key) const
Definition: Controller.cc:303
virtual void maintain() override
perform regular periodic maintenance; TODO: move to UFSSwapDir::Maintain
Definition: Disks.cc:467
#define STUB
macro to stub a void function.
Definition: STUB.h:33
static bool SmpAware()
whether there are any SMP-aware storages
Definition: Controller.cc:859
virtual ~Disk()
Definition: Disk.cc:33
virtual void getStats(StoreInfoStats &stats) const override
collect statistics
Definition: Controller.cc:115
int storeDirWriteCleanLogs(int reopen)
Definition: Disks.cc:593
signed_int32_t sfileno
Definition: forward.h:22
void free_cachedir(Store::DiskConfig *swap)
Definition: Disks.cc:700
void addReading(StoreEntry *, const cache_key *)
Definition: Controller.cc:714
void allocate_new_swapdir(Store::DiskConfig *swap)
Definition: Disks.cc:681
virtual int callback() override
called once every main loop iteration; TODO: Move to UFS code.
Definition: Controller.cc:233
int STDIRSELECT(const StoreEntry *e)
Definition: Disks.h:78
static bool SmpAware()
whether any disk cache is SMP-aware
Definition: Disks.cc:548
virtual uint64_t minSize() const override
the minimum size the store will shrink to via normal housekeeping
Definition: Disk.cc:89
virtual void diskFull()
Definition: Disk.cc:145
void memoryDisconnect(StoreEntry &)
disassociates the entry from the memory cache, preserving cached data
Definition: Controller.cc:584
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
void transientsCompleteWriting(StoreEntry &)
marks the entry completed for collapsed requests
Definition: Controller.cc:602
StoreEntry * findCallbackXXX(const cache_key *)
Definition: Controller.cc:362
virtual void create() override
create system resources needed for this store to operate in the future
Definition: Controller.cc:79
Disk(char const *aType)
Definition: Disk.cc:24
virtual void evictCached(StoreEntry &) override
Definition: Disks.cc:489
virtual bool needsDiskStrand() const
needs a dedicated kid process
Definition: Disk.cc:249
void addWriting(StoreEntry *, const cache_key *)
Definition: Controller.cc:722
virtual void init() override
Definition: Disks.cc:244
void FreeMemory()
undo Init()
Definition: Controller.cc:890
virtual void evictCached(StoreEntry &) override
Definition: Controller.cc:457
virtual void evictIfFound(const cache_key *) override
Definition: Controller.cc:468
bool canLog(StoreEntry const &e) const
Definition: Disk.cc:188
virtual uint64_t currentSize() const override
current size
Definition: Disks.cc:326
virtual void create() override
create system resources needed for this store to operate in the future
Definition: Disk.cc:40
virtual void dump(StoreEntry &) const
Definition: Disk.cc:43
virtual uint64_t minSize() const override
the minimum size the store will shrink to via normal housekeeping
Definition: Controller.cc:170
virtual int writeCleanStart()
Definition: Disk.cc:218
virtual void maintain() override
perform regular periodic maintenance; TODO: move to UFSSwapDir::Maintain
Definition: Disk.cc:86
virtual void init() override
Definition: Controller.cc:59
virtual void create() override
create system resources needed for this store to operate in the future
Definition: Disks.cc:205
#define STUB_NOP
Definition: STUB.h:37
void memoryOut(StoreEntry &, const bool preserveSwappable)
called to get rid of no longer needed entry data in RAM, if any
Definition: Controller.cc:556
StoreEntry * peek(const cache_key *)
Definition: Controller.cc:394
virtual uint64_t currentCount() const override
the total number of objects stored right now
Definition: Controller.cc:184
virtual int callback() override
called once every main loop iteration; TODO: Move to UFS code.
Definition: Disks.cc:173
virtual void writeCleanDone()
Definition: Disk.cc:224
virtual bool active() const
Definition: Disk.cc:236
virtual bool doubleCheck(StoreEntry &)
Definition: Disk.cc:46
void updateOnNotModified(StoreEntry *old, const StoreEntry &newer)
update old entry metadata and HTTP headers using a newer entry
Definition: Controller.cc:680
int64_t accumulateMore(const StoreEntry &) const
Definition: Disks.cc:382
void transientsClearCollapsingRequirement(StoreEntry &e)
removes collapsing requirement (for future hits)
Definition: Controller.cc:627
virtual int64_t maxObjectSize() const override
the maximum size of a storable object; -1 if unlimited
Definition: Disks.cc:352
virtual void stat(StoreEntry &) const override
Definition: Controller.cc:141
virtual uint64_t currentSize() const override
current size
Definition: Controller.cc:177
virtual StoreEntry * get(const cache_key *) override
Definition: Disks.cc:218
virtual void logEntry(const StoreEntry &e, int op) const
Definition: Disk.cc:227
virtual int64_t maxObjectSize() const override
the maximum size of a storable object; -1 if unlimited
Definition: Controller.cc:191
bool allowCollapsing(StoreEntry *, const RequestFlags &, const HttpRequestMethod &)
tries to make the entry available for collapsing future requests
Definition: Controller.cc:697
void syncCollapsed(const sfileno)
Update local intransit entry after changes made by appending worker.
Definition: Controller.cc:734
#define false
Definition: GnuRegex.c:233
virtual StoreEntry * get(const cache_key *) override
Definition: Disk.cc:393
virtual void updateHeaders(StoreEntry *) override
make stored metadata and HTTP headers the same as in the given entry
Definition: Disks.cc:460
StoreSearch * NewLocalSearch()
Definition: LocalSearch.cc:44
void storeDirCloseSwapLogs()
Definition: Disks.cc:577

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors