stub_store.cc
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2021 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 "RequestFlags.h"
11 
12 #define STUB_API "store.cc"
13 #include "tests/STUB.h"
14 
15 const char *storeStatusStr[] = { };
16 const char *pingStatusStr[] = { };
17 const char *memStatusStr[] = { };
18 const char *swapStatusStr[] = { };
19 
20 #include "RemovalPolicy.h"
22 
23 #include "Store.h"
25 bool StoreEntry::checkDeferRead(int) const STUB_RETVAL(false)
26 const char *StoreEntry::getMD5Text() const STUB_RETVAL(nullptr)
31 size_t StoreEntry::bytesWanted(Range<size_t> const, bool) const STUB_RETVAL(0)
32 void StoreEntry::complete() STUB
34 char const *StoreEntry::getSerialisedMetaData(size_t &) const STUB_RETVAL(nullptr)
37 void StoreEntry::trimMemory(const bool) STUB
38 void StoreEntry::abort() STUB
40 void StoreEntry::makePrivate(const bool) STUB
42 void StoreEntry::setPrivateKey(const bool, const bool) STUB
44 void StoreEntry::releaseRequest(const bool) STUB
47 void StoreEntry::swapOut() STUB
49 const char *StoreEntry::url() const STUB_RETVAL(nullptr)
52 int StoreEntry::validToSend() const STUB_RETVAL(0)
55 void StoreEntry::createMemObject(const char *, const char *, const HttpRequestMethod &) STUB
56 void StoreEntry::ensureMemObject(const char *, const char *, const HttpRequestMethod &) STUB
57 void StoreEntry::dump(int) const STUB
59 void StoreEntry::hashInsert(const cache_key *) STUB
60 void StoreEntry::registerAbortCallback(const AsyncCall::Pointer &) STUB
61 void StoreEntry::reset() STUB
64 void StoreEntry::unregisterAbortCallback(const char *) STUB
67 void StoreEntry::delayAwareRead(const Comm::ConnectionPointer&, char *, int, AsyncCall::Pointer) STUB
68 void StoreEntry::setNoDelay (bool const) STUB
69 bool StoreEntry::modifiedSince(const time_t, const int) const STUB_RETVAL(false)
72 Store::Disk &StoreEntry::disk() const STUB_RETREF(Store::Disk)
74 void *StoreEntry::operator new(size_t)
75 {
76  STUB
77  return new StoreEntry();
78 }
79 void StoreEntry::operator delete(void *) STUB
80 //#if USE_SQUID_ESI
81 //ESIElement::Pointer StoreEntry::cachedESITree STUB_RETVAL(nullptr)
82 //#endif
84 void StoreEntry::flush() STUB
85 int StoreEntry::unlock(const char *) STUB_RETVAL(0)
86 void StoreEntry::lock(const char *) STUB
87 void StoreEntry::touch() STUB
88 void StoreEntry::release(const bool) STUB
89 void StoreEntry::append(char const *, int) STUB
90 void StoreEntry::vappendf(const char *, va_list) STUB
92 
93 void Store::Maintain(void *) STUB
94 
95 std::ostream &operator <<(std::ostream &os, const StoreEntry &)
96 {
97  STUB
98  return os;
99 }
100 
103 StoreEntry *storeGetPublic(const char *, const HttpRequestMethod&) STUB_RETVAL(nullptr)
106 StoreEntry *storeCreateEntry(const char *, const char *, const RequestFlags &, const HttpRequestMethod&) STUB_RETVAL(nullptr)
107 StoreEntry *storeCreatePureEntry(const char *, const char *, const HttpRequestMethod&) STUB_RETVAL(nullptr)
108 void storeConfigure(void) STUB
109 int expiresMoreThan(time_t, time_t) STUB_RETVAL(0)
110 void storeAppendPrintf(StoreEntry *, const char *,...) STUB
111 void storeAppendVPrintf(StoreEntry *, const char *, va_list) STUB
115 void storeFsInit(void) STUB
116 void storeFsDone(void) STUB
117 void storeReplAdd(const char *, REMOVALPOLICYCREATE *) STUB
118 void destroyStoreEntry(void *) STUB
119 void storeGetMemSpace(int) STUB
120 
void makePrivate(const bool shareable)
Definition: store.cc:172
void Maintain(void *unused)
Definition: store.cc:1147
virtual void buffer()
Definition: store.cc:1618
int checkTooSmall()
Definition: store.cc:915
store_client_t storeClientType() const
Definition: store.cc:287
void storeReplAdd(const char *type, REMOVALPOLICYCREATE *create)
Definition: store.cc:1662
void ensureMemObject(const char *storeId, const char *logUri, const HttpRequestMethod &aMethod)
initialize mem_obj (if needed) and set URIs/method (if missing)
Definition: store.cc:1606
void unregisterAbortCallback(const char *reason)
Definition: store.cc:1506
void releaseRequest(const bool shareable=false)
Definition: store.cc:472
manages a single cache_dir
Definition: Disk.h:22
unsigned char cache_key
Store key.
Definition: forward.h:29
bool makePublic(const KeyScope keyScope=ksDefault)
Definition: store.cc:165
StoreEntry()
Definition: store.cc:350
virtual void flush()
Definition: store.cc:1629
const char * swapStatusStr[]
Definition: stub_store.cc:18
const char * url() const
Definition: store.cc:1583
void createMemObject()
Definition: store.cc:1592
void storeAppendPrintf(StoreEntry *e, const char *fmt,...)
Definition: store.cc:869
void lock(const char *context)
Definition: store.cc:459
void touch()
update last reference timestamp and related Store metadata
Definition: store.cc:466
void setPrivateKey(const bool shareable, const bool permanent)
Definition: store.cc:562
bool setPublicKey(const KeyScope keyScope=ksDefault)
Definition: store.cc:589
const char * memStatusStr[]
Definition: stub_store.cc:17
Abstraction layer for TCP, UDP, TLS, UDS and filedescriptor sockets.
Definition: AcceptLimiter.h:17
void storeGetMemSpace(int size)
Definition: store.cc:1135
bool isAccepting() const
Definition: store.cc:1990
void replaceHttpReply(const HttpReplyPointer &, const bool andStartWriting=true)
Definition: store.cc:1722
const char * storeStatusStr[]
Definition: stub_store.cc:15
void storeFsInit(void)
Definition: store.cc:1653
void reset()
Definition: store.cc:1638
StoreEntry * storeGetPublicByRequest(HttpRequest *req, const KeyScope keyScope)
Definition: store.cc:530
bool mayStartSwapOut()
whether we may start writing to disk (now or in the future)
void destroyMemObject()
Definition: store.cc:398
StoreIoStats store_io_stats
Definition: store_io.cc:16
StoreEntry * storeGetPublicByRequestMethod(HttpRequest *req, const HttpRequestMethod &method, const KeyScope keyScope)
Definition: store.cc:524
Definition: Range.h:19
enum _mem_status_t mem_status_t
int validToSend() const
Definition: store.cc:1370
size_t HttpReply *STUB StoreEntry const KeyScope const HttpRequestMethod const KeyScope const char const RequestFlags const HttpRequestMethod const char const HttpRequestMethod time_t const char STUB void storeAppendVPrintf(StoreEntry *, const char *, va_list) STUB int storeTooManyDiskFilesOpen(void) STUB_RETVAL(0) void storeHeapPositionUpdate(StoreEntry *
Definition: store.cc:879
size_t HttpReply *STUB StoreEntry const KeyScope const HttpRequestMethod const KeyScope const char const RequestFlags const HttpRequestMethod const char const HttpRequestMethod time_t const char STUB void SwapDir *STUB void storeSwapFileNumberSet(StoreEntry *, sfileno) STUB void storeFsInit(void) STUB void storeFsDone(void) STUB void storeReplAdd(const char *
@ STORE_NON_CLIENT
Definition: enums.h:72
bool hasIfNoneMatchEtag(const HttpRequest &request) const
has ETag matching at least one of the If-None-Match etags
Definition: store.cc:1881
void abort()
Definition: store.cc:1091
store_client_t
Definition: enums.h:71
void setCollapsingRequirement(const bool required)
allow or forbid collapsed requests feeding
Definition: store.cc:2014
const char * getSerialisedMetaData(size_t &length) const
Definition: store.cc:1769
int unlock(const char *context)
Definition: store.cc:483
void expireNow()
Definition: store.cc:787
#define STUB_RETREF(x)
Definition: STUB.h:51
static size_t inUseCount()
Definition: store.cc:197
FREE destroyStoreEntry
int checkNegativeHit() const
Definition: store.cc:1313
size_t HttpReply *STUB StoreEntry const KeyScope STUB_RETVAL(nullptr) StoreEntry *storeGetPublicByRequestMethod(HttpRequest *
void write(StoreIOBuffer)
Definition: store.cc:794
bool checkCachable()
Definition: store.cc:943
#define STUB
macro to stub a void function.
Definition: STUB.h:33
bool cacheNegatively()
Definition: store.cc:186
Store statistics related to low-level I/O.
Definition: StoreStats.h:58
void dump(int debug_lvl) const
Definition: store.cc:1516
void storeHeapPositionUpdate(StoreEntry *, SwapDir *)
size_t bytesWanted(Range< size_t > const aRange, bool ignoreDelayPool=false) const
Definition: store.cc:249
StoreEntry * storeCreateEntry(const char *url, const char *logUrl, const RequestFlags &flags, const HttpRequestMethod &method)
Definition: store.cc:773
void swapOut()
signed_int32_t sfileno
Definition: forward.h:22
void storeConfigure(void)
Definition: store.cc:1286
void setMemStatus(mem_status_t)
Definition: store.cc:1541
RefCount< Comm::Connection > ConnectionPointer
Definition: forward.h:26
void negativeCache()
Definition: store.cc:1334
void complete()
Definition: store.cc:1045
KeyScope
Definition: store_key_md5.h:18
RemovalPolicy * createRemovalPolicy(RemovalPolicySettings *) STUB_RETVAL(nullptr) StoreIoStats store_io_stats
Definition: store.cc:1688
bool checkDeferRead(int fd) const
Definition: store.cc:267
void swapOutFileClose(int how)
bool timestampsSet()
Definition: store.cc:1410
int storeTooManyDiskFilesOpen(void)
Definition: store.cc:903
void hashDelete()
Definition: store.cc:447
int expiresMoreThan(time_t expires, time_t when)
Definition: store.cc:1361
void delayAwareRead(const Comm::ConnectionPointer &conn, char *buf, int len, AsyncCall::Pointer callback)
Definition: store.cc:223
void storeEntryReplaceObject(StoreEntry *, HttpReply *)
virtual void vappendf(const char *, va_list)
Definition: store.cc:835
void storeFsDone(void)
void release(const bool shareable=false)
Definition: store.cc:1161
Store::Disk & disk() const
the disk this entry is [being] cached on; asserts for entries w/o a disk
Definition: store.cc:1921
void hashInsert(const cache_key *)
Definition: store.cc:438
bool memoryCachable()
checkCachable() and can be cached in memory
Definition: store.cc:1292
StoreEntry * storeCreatePureEntry(const char *url, const char *log_url, const HttpRequestMethod &method)
Definition: store.cc:755
virtual void append(char const *, int)
Appends a c-string to existing packed data.
Definition: store.cc:817
void trimMemory(const bool preserveSwappable)
Definition: store.cc:1815
void setNoDelay(bool const)
Definition: store.cc:273
RemovalPolicy * REMOVALPOLICYCREATE(wordlist *args)
Definition: RemovalPolicy.h:80
void registerAbortCallback(const AsyncCall::Pointer &)
notify the StoreEntry writer of a 3rd-party initiated StoreEntry abort
Definition: store.cc:1498
bool modifiedSince(const time_t ims, const int imslen=-1) const
Definition: store.cc:1837
#define false
Definition: GnuRegex.c:233
size_t HttpReply *STUB StoreEntry * storeGetPublic(const char *, const HttpRequestMethod &) STUB_RETVAL(nullptr) StoreEntry *storeGetPublicByRequest(HttpRequest *
Definition: store.cc:518
const char * pingStatusStr[]
Definition: stub_store.cc:16
bool hasIfMatchEtag(const HttpRequest &request) const
has ETag matching at least one of the If-Match etags
Definition: store.cc:1874
const char * getMD5Text() const
Definition: store.cc:205
size_t storeEntryInUse() STUB_RETVAL(0) void storeEntryReplaceObject(StoreEntry *

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors