Squid Web Cache master
Loading...
Searching...
No Matches
stub_libstore.cc
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2025 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"
15namespace Store
16{
21uint64_t Controller::maxSize() const STUB_RETVAL(0)
22uint64_t Controller::minSize() const STUB_RETVAL(0)
23uint64_t Controller::currentSize() const STUB_RETVAL(0)
24uint64_t Controller::currentCount() const STUB_RETVAL(0)
43void Controller::memoryOut(StoreEntry &, const bool) STUB
58Controller &Root() STUB_RETREF(Controller)
59}
60
61#include "store/Disk.h"
62namespace Store
63{
64Disk::Disk(char const *) {STUB}
66char const *Disk::type() const STUB_RETVAL(nullptr)
67bool Disk::needsDiskStrand() const STUB_RETVAL(false)
68bool Disk::active() const STUB_RETVAL(false)
69void Disk::diskFull() STUB
70void Disk::create() STUB
71StoreEntry *Disk::get(const cache_key *) STUB_RETVAL(nullptr)
72uint64_t Disk::minSize() const STUB_RETVAL(0)
73int64_t Disk::maxObjectSize() const STUB_RETVAL(0)
74void Disk::getStats(StoreInfoStats &) const STUB
75void Disk::stat(StoreEntry &) const STUB
76void Disk::reference(StoreEntry &) STUB
77bool Disk::dereference(StoreEntry &) STUB_RETVAL(false)
78void Disk::maintain() STUB
79int64_t Disk::minObjectSize() const STUB_RETVAL(0)
80void Disk::maxObjectSize(int64_t) STUB
81bool Disk::objectSizeIsAcceptable(int64_t) const STUB_RETVAL(false)
82void Disk::parseOptions(int) STUB
83void Disk::dumpOptions(StoreEntry *) const STUB
84ConfigOption *Disk::getOptionTree() const STUB_RETVAL(nullptr)
85void Disk::dump(StoreEntry &) const STUB
86bool Disk::doubleCheck(StoreEntry &) STUB_RETVAL(false)
87void Disk::statfs(StoreEntry &) const STUB
88bool Disk::canLog(StoreEntry const &) const STUB_RETVAL(false)
89void Disk::openLog() STUB
90void Disk::closeLog() STUB
91void Disk::logEntry(const StoreEntry &, int) const STUB
92int Disk::writeCleanStart() STUB_RETVAL(0)
93void Disk::writeCleanDone() STUB
94}
95
96#include "store/Disks.h"
97namespace Store
98{
100void Disks::create() STUB
101void Disks::init() STUB
102StoreEntry *Disks::get(const cache_key *) STUB_RETVAL(nullptr)
103uint64_t Disks::maxSize() const STUB_RETVAL(0)
104uint64_t Disks::minSize() const STUB_RETVAL(0)
105uint64_t Disks::currentSize() const STUB_RETVAL(0)
106uint64_t Disks::currentCount() const STUB_RETVAL(0)
107int64_t Disks::maxObjectSize() const STUB_RETVAL(0)
108void Disks::getStats(StoreInfoStats &) const STUB
109void Disks::stat(StoreEntry &) const STUB
110void Disks::sync() STUB
111void Disks::reference(StoreEntry &) STUB
112bool Disks::dereference(StoreEntry &) STUB_RETVAL(false)
113void Disks::updateHeaders(StoreEntry *) STUB
114void Disks::maintain() STUB
115bool Disks::anchorToCache(StoreEntry &) STUB_RETVAL(false)
116bool Disks::updateAnchored(StoreEntry &) STUB_RETVAL(false)
117void Disks::evictCached(StoreEntry &) STUB
118void Disks::evictIfFound(const cache_key *) STUB
119int Disks::callback() STUB_RETVAL(0)
120void Disks::configure() STUB
121int64_t Disks::accumulateMore(const StoreEntry&) const STUB_RETVAL(0)
122bool Disks::SmpAware() STUB_RETVAL(false)
123bool Disks::hasReadableEntry(const StoreEntry &) const STUB_RETVAL(false)
124void Disks::Parse(DiskConfig &) STUB
125void Disks::Dump(const DiskConfig &, StoreEntry &, const char *) STUB
126SwapDir *Disks::SelectSwapDir(const StoreEntry *) STUB_RETVAL(nullptr)
127}
128void storeDirOpenSwapLogs(void) STUB
131void allocate_new_swapdir(Store::DiskConfig &) STUB
132void free_cachedir(Store::DiskConfig *) STUB;
134
135#include "store/LocalSearch.h"
136namespace Store
137{
139}
140
141#include "store/SwapMetaIn.h"
144void Store::UnpackHitSwapMeta(char const *, ssize_t, StoreEntry &) STUB
145
146#include "store/SwapMetaOut.h"
147AllocedBuf Store::PackSwapMeta(const StoreEntry &, size_t &) STUB_RETVAL(nullptr)
148
void free_cachedir(Store::DiskConfig *swap)
Definition Disks.cc:800
void storeDirSwapLog(const StoreEntry *e, int op)
Definition Disks.cc:833
void allocate_new_swapdir(Store::DiskConfig &swap)
Definition Disks.cc:781
void storeDirOpenSwapLogs()
Definition Disks.cc:672
int storeDirWriteCleanLogs(int reopen)
Definition Disks.cc:695
void storeDirCloseSwapLogs()
Definition Disks.cc:679
#define STUB
macro to stub a void function.
Definition STUB.h:34
#define STUB_NOP
Definition STUB.h:38
#define STUB_RETREF(x)
Definition STUB.h:52
#define STUB_RETVAL(x)
Definition STUB.h:42
Definition SBuf.h:94
High-level store statistics used by mgr:info action. Used inside PODs!
Definition StoreStats.h:14
void memoryOut(StoreEntry &, const bool preserveSwappable)
called to get rid of no longer needed entry data in RAM, if any
void configure()
update configuration, including limits (re)calculation
~Controller() override
this destructor is never called because Controller singleton is immortal
Definition Controller.cc:46
StoreEntry * findCallbackXXX(const cache_key *)
bool markedForDeletionAndAbandoned(const StoreEntry &) const
int transientReaders(const StoreEntry &) const
number of the transient entry readers some time ago
void noteStoppedSharedWriting(StoreEntry &)
adjust shared state after this worker stopped changing the entry
void addReading(StoreEntry *, const cache_key *)
void addWriting(StoreEntry *, const cache_key *)
uint64_t maxSize() const override
void handleIdleEntry(StoreEntry &)
called when the entry is no longer needed by any transaction
bool allowCollapsing(StoreEntry *, const RequestFlags &, const HttpRequestMethod &)
tries to make the entry available for collapsing future requests
void sync() override
prepare for shutdown
void stat(StoreEntry &) const override
bool transientsReader(const StoreEntry &) const
whether the entry is in "reading from Transients" I/O state
void freeMemorySpace(const int spaceRequired)
void maintain() override
perform regular periodic maintenance; TODO: move to UFSSwapDir::Maintain
Definition Controller.cc:87
void syncCollapsed(const sfileno)
Update local intransit entry after changes made by appending worker.
void getStats(StoreInfoStats &stats) const override
collect statistics
uint64_t minSize() const override
the minimum size the store will shrink to via normal housekeeping
void memoryDisconnect(StoreEntry &)
disassociates the entry from the memory cache, preserving cached data
bool hasReadableDiskEntry(const StoreEntry &) const
whether there is a disk entry with e.key
bool markedForDeletion(const cache_key *key) const
bool updateOnNotModified(StoreEntry *old, StoreEntry &e304)
void transientsDisconnect(StoreEntry &)
disassociates the entry from the intransit table
int64_t accumulateMore(StoreEntry &) const
static int store_dirs_rebuilding
the number of cache_dirs being rebuilt; TODO: move to Disks::Rebuilding
Definition Controller.h:133
StoreSearch * search()
int64_t maxObjectSize() const override
the maximum size of a storable object; -1 if unlimited
void init() override
Definition Controller.cc:53
static bool SmpAware()
whether there are any SMP-aware storages
bool transientsWriter(const StoreEntry &) const
whether the entry is in "writing to Transients" I/O state
void create() override
create system resources needed for this store to operate in the future
Definition Controller.cc:73
uint64_t currentSize() const override
current size
void evictCached(StoreEntry &) override
void evictIfFound(const cache_key *) override
StoreEntry * find(const cache_key *)
uint64_t currentCount() const override
the total number of objects stored right now
int callback() override
called once every main loop iteration; TODO: Move to UFS code.
StoreEntry * peek(const cache_key *)
manages a single cache_dir
Definition Disk.h:22
~Disk() override
Definition Disk.cc:33
char const * type() const
Definition Disk.cc:230
Disk(char const *aType)
Definition Disk.cc:24
void create() override
create system resources needed for this store to operate in the future
Definition Disks.cc:219
Controller & Root()
safely access controller singleton
size_t UnpackSwapMetaSize(const SBuf &)
void UnpackHitSwapMeta(char const *, ssize_t, StoreEntry &)
deserializes entry metadata from the given buffer into the cache hit entry
size_t UnpackIndexSwapMeta(const MemBuf &, StoreEntry &, cache_key *)
StoreSearch * NewLocalSearch()
AllocedBuf PackSwapMeta(const StoreEntry &, size_t &size)
unsigned char cache_key
Store key.
Definition forward.h:29
signed_int32_t sfileno
Definition forward.h:22
int const char size_t