stub_store.cc
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2018 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 fd) const STUB_RETVAL(false)
26 const char *StoreEntry::getMD5Text() const STUB_RETVAL(NULL)
32 size_t StoreEntry::bytesWanted(Range<size_t> const, bool) const STUB_RETVAL(0)
33 void StoreEntry::complete() STUB
36 void StoreEntry::replaceHttpReply(HttpReply *, bool andStartWriting) STUB
38 void StoreEntry::trimMemory(const bool preserveSwappable) STUB
39 void StoreEntry::abort() STUB
40 bool StoreEntry::makePublic(const KeyScope scope) STUB
41 void StoreEntry::makePrivate(const bool shareable) STUB
42 bool StoreEntry::setPublicKey(const KeyScope scope) STUB
43 void StoreEntry::setPrivateKey(const bool, const bool) STUB
45 void StoreEntry::releaseRequest(const bool shareable) STUB
48 void StoreEntry::swapOut() STUB
49 void StoreEntry::swapOutFileClose(int how) STUB
50 const char *StoreEntry::url() const STUB_RETVAL(NULL)
53 int StoreEntry::locked() const STUB_RETVAL(0)
54 int StoreEntry::validToSend() const STUB_RETVAL(0)
57 void StoreEntry::createMemObject(const char *, const char *, const HttpRequestMethod &aMethod) STUB
58 void StoreEntry::ensureMemObject(const char *, const char *, const HttpRequestMethod &) STUB
59 void StoreEntry::dump(int debug_lvl) const STUB
61 void StoreEntry::hashInsert(const cache_key *) STUB
62 void StoreEntry::registerAbort(STABH * cb, void *) STUB
63 void StoreEntry::reset() STUB
69 void StoreEntry::delayAwareRead(const Comm::ConnectionPointer&, char *buf, int len, AsyncCall::Pointer callback) STUB
70 void StoreEntry::setNoDelay (bool const) STUB
71 bool StoreEntry::modifiedSince(const time_t, const int) const STUB_RETVAL(false)
74 Store::Disk &StoreEntry::disk() const STUB_RETREF(Store::Disk)
77 void StoreEntry::getPublicByRequest(StoreClient * aClient, HttpRequest * request) STUB
78 void StoreEntry::getPublic(StoreClient * aClient, const char *uri, const HttpRequestMethod& method) STUB
79 void *StoreEntry::operator new(size_t byteCount)
80 {
81  STUB
82  return new StoreEntry();
83 }
84 void StoreEntry::operator delete(void *address) STUB
85 //#if USE_SQUID_ESI
86 //ESIElement::Pointer StoreEntry::cachedESITree STUB_RETVAL(NULL)
87 //#endif
89 void StoreEntry::flush() STUB
90 int StoreEntry::unlock(const char *) STUB_RETVAL(0)
91 int64_t StoreEntry::objectLen() const STUB_RETVAL(0)
92 int64_t StoreEntry::contentLen() const STUB_RETVAL(0)
93 void StoreEntry::lock(const char *) STUB
94 void StoreEntry::touch() STUB
95 void StoreEntry::release(const bool shareable) STUB
96 void StoreEntry::append(char const *, int) STUB
97 void StoreEntry::vappendf(const char *, va_list) STUB
98 void StoreEntry::setCollapsingRequirement(const bool required) STUB
99 
100 Store::Controller &Store::Root() STUB_RETREF(Store::Controller)
101 void Store::Init(Store::Controller *root) STUB
102 void Store::FreeMemory() STUB
103 void Store::Stats(StoreEntry * output) STUB
104 void Store::Maintain(void *unused) STUB
105 int Store::Controller::store_dirs_rebuilding = 0;
106 StoreSearch *Store::Controller::search() STUB_RETVAL(NULL)
107 void Store::Controller::maintain() STUB
108 bool Store::Controller::markedForDeletion(const cache_key *) const STUB_RETVAL(false)
109 void Store::Controller::freeMemorySpace(const int) STUB
110 bool Store::Controller::SmpAware() STUB_RETVAL(false)
111 
112 std::ostream &operator <<(std::ostream &os, const StoreEntry &)
113 {
114  STUB
115  return os;
116 }
117 
118 size_t storeEntryInUse() STUB_RETVAL(0)
120 StoreEntry *storeGetPublic(const char *uri, const HttpRequestMethod& method) STUB_RETVAL(NULL)
123 StoreEntry *storeCreateEntry(const char *, const char *, const RequestFlags &, const HttpRequestMethod&) STUB_RETVAL(NULL)
124 StoreEntry *storeCreatePureEntry(const char *storeId, const char *logUrl, const HttpRequestMethod&) STUB_RETVAL(nullptr)
125 void storeConfigure(void) STUB
126 int expiresMoreThan(time_t, time_t) STUB_RETVAL(0)
127 void storeAppendPrintf(StoreEntry *, const char *,...) STUB
128 void storeAppendVPrintf(StoreEntry *, const char *, va_list ap) STUB
130 void storeHeapPositionUpdate(StoreEntry *, SwapDir *) STUB
131 void storeSwapFileNumberSet(StoreEntry * e, sfileno filn) STUB
132 void storeFsInit(void) STUB
133 void storeFsDone(void) STUB
134 void storeReplAdd(const char *, REMOVALPOLICYCREATE *) STUB
135 void destroyStoreEntry(void *) STUB
136 void storeGetMemSpace(int size) STUB
137 
RemovalPolicy * createRemovalPolicy(RemovalPolicySettings *settings)
Definition: store.cc:1727
void storeReplAdd(const char *type, REMOVALPOLICYCREATE *create)
Definition: store.cc:1701
bool isAccepting() const
Definition: store.cc:2047
void makePrivate(const bool shareable)
Definition: store.cc:151
void const char HLPCB * callback
Definition: stub_helper.cc:16
void touch()
update last reference timestamp and related Store metadata
Definition: store.cc:440
static void getPublicByRequestMethod(StoreClient *aClient, HttpRequest *request, const HttpRequestMethod &method)
Definition: store.cc:495
void Stats(StoreEntry *)
Definition: old_api.cc:166
int validToSend() const
Definition: store.cc:1414
void release(const bool shareable=false)
Definition: store.cc:1189
int unlock(const char *context)
Definition: store.cc:457
void storeAppendVPrintf(StoreEntry *e, const char *fmt, va_list vargs)
Definition: store.cc:885
int64_t contentLen() const
Definition: store.cc:1662
void storeEntryReplaceObject(StoreEntry *, HttpReply *)
bool timestampsSet()
Definition: store.cc:1454
virtual void append(char const *, int)
Appends a c-string to existing packed data.
Definition: store.cc:823
unsigned char cache_key
Store key.
Definition: forward.h:29
struct _request * request(char *urlin)
Definition: tcp-banger2.c:291
virtual void buffer()
Definition: store.cc:1635
void expireNow()
Definition: store.cc:790
static size_t inUseCount()
Definition: store.cc:176
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:1623
Definition: Range.h:18
virtual void flush()
Definition: store.cc:1646
StoreEntry * storeGetPublicByRequestMethod(HttpRequest *req, const HttpRequestMethod &method, const KeyScope keyScope)
Definition: store.cc:522
void delayAwareRead(const Comm::ConnectionPointer &conn, char *buf, int len, AsyncCall::Pointer callback)
Definition: store.cc:202
void storeFsDone(void)
Controller & Root()
safely access controller singleton
Definition: Controller.cc:877
int storeTooManyDiskFilesOpen(void)
Definition: store.cc:911
void destroyMemObject()
Definition: store.cc:372
StoreEntry * storeGetPublic(const char *uri, const HttpRequestMethod &method)
Definition: store.cc:516
const char * memStatusStr[]
Definition: store.cc:68
void replaceHttpReply(HttpReply *, bool andStartWriting=true)
Definition: store.cc:1782
static void getPublicByRequest(StoreClient *aClient, HttpRequest *request)
Definition: store.cc:502
RemovalPolicy * REMOVALPOLICYCREATE(wordlist *args)
Definition: RemovalPolicy.h:80
const char * storeStatusStr[]
Definition: store.cc:79
bool hasIfMatchEtag(const HttpRequest &request) const
has ETag matching at least one of the If-Match etags
Definition: store.cc:1941
void complete()
Definition: store.cc:1058
static void getPublic(StoreClient *aClient, const char *uri, const HttpRequestMethod &method)
Definition: store.cc:509
char const * getSerialisedMetaData()
Definition: store.cc:1825
void hashDelete()
Definition: store.cc:421
int locked() const
Definition: store.cc:1249
void storeSwapFileNumberSet(StoreEntry *e, sfileno filn)
void hashInsert(const cache_key *)
Definition: store.cc:412
bool checkDeferRead(int fd) const
Definition: store.cc:246
store_client_t
Definition: enums.h:63
StoreEntry()
Definition: store.cc:324
#define STUB_RETVAL(x)
Definition: STUB.h:41
int64_t objectLen() const
Definition: store.cc:1655
StoreEntry * storeCreateEntry(const char *url, const char *logUrl, const RequestFlags &flags, const HttpRequestMethod &method)
Definition: store.cc:776
void abort()
Definition: store.cc:1107
size_t storeEntryInUse()
bool checkCachable()
Definition: store.cc:952
HttpReply const * getReply() const
Definition: store.cc:1670
#define STUB
macro to stub a void function.
Definition: STUB.h:33
bool modifiedSince(const time_t ims, const int imslen=-1) const
Definition: store.cc:1893
bool setPublicKey(const KeyScope keyScope=ksDefault)
Definition: store.cc:587
void Init(void)
prepares to parse ACLs configuration
Definition: AclRegs.cc:114
void dump(int debug_lvl) const
Definition: store.cc:1533
int checkNegativeHit() const
Definition: store.cc:1360
Store statistics related to low-level I/O.
Definition: StoreStats.h:58
void releaseRequest(const bool shareable=false)
Definition: store.cc:446
virtual void vappendf(const char *, va_list)
Definition: store.cc:841
RefCount< Comm::Connection > ConnectionPointer
Definition: forward.h:25
void setNoDelay(bool const)
Definition: store.cc:252
signed_int32_t sfileno
Definition: forward.h:22
int checkTooSmall()
Definition: store.cc:923
int unsigned int const char *desc STUB void int len
Definition: stub_fd.cc:20
const char * url() const
Definition: store.cc:1600
void STABH(void *)
Definition: MemObject.h:28
void const char * buf
Definition: stub_helper.cc:16
void Maintain(void *unused)
Definition: store.cc:1175
void storeGetMemSpace(int size)
Definition: store.cc:1161
size_t HttpReply *STUB StoreEntry const KeyScope scope const HttpRequestMethod const KeyScope scope const char const RequestFlags const HttpRequestMethod const char * logUrl
Definition: stub_store.cc:124
void setCollapsingRequirement(const bool required)
allow or forbid collapsed requests feeding
Definition: store.cc:2071
bool makePublic(const KeyScope keyScope=ksDefault)
Definition: store.cc:144
void storeFsInit(void)
Definition: store.cc:1692
const char * getMD5Text() const
Definition: store.cc:184
static const char * storeId(const int i)
Definition: testRock.cc:177
const char * pingStatusStr[]
Definition: store.cc:73
void swapOutFileClose(int how)
bool cacheNegatively()
Definition: store.cc:165
void write(StoreIOBuffer)
Definition: store.cc:797
Store::Disk & disk() const
the disk this entry is [being] cached on; asserts for entries w/o a disk
Definition: store.cc:1988
void FreeMemory()
undo Init()
Definition: Controller.cc:890
bool memoryCachable()
checkCachable() and can be cached in memory
Definition: store.cc:1339
bool mayStartSwapOut()
whether we may start writing to disk (now or in the future)
void storeConfigure(void)
Definition: store.cc:1333
KeyScope
Definition: store_key_md5.h:18
StoreEntry * storeCreatePureEntry(const char *url, const char *log_url, const HttpRequestMethod &method)
Definition: store.cc:758
StoreIoStats store_io_stats
Definition: store_io.cc:16
size_t HttpReply *STUB StoreEntry const KeyScope scope const HttpRequestMethod & method
Definition: stub_store.cc:122
void registerAbort(STABH *cb, void *)
Definition: store.cc:1514
size_t bytesWanted(Range< size_t > const aRange, bool ignoreDelayPool=false) const
Definition: store.cc:228
#define STUB_RETREF(x)
Definition: STUB.h:51
bool hasIfNoneMatchEtag(const HttpRequest &request) const
has ETag matching at least one of the If-None-Match etags
Definition: store.cc:1948
void unregisterAbort()
Definition: store.cc:1523
enum _mem_status_t mem_status_t
StoreEntry * storeGetPublicByRequest(HttpRequest *req, const KeyScope keyScope)
Definition: store.cc:528
store_client_t storeClientType() const
Definition: store.cc:264
void storeHeapPositionUpdate(StoreEntry *, SwapDir *)
int expiresMoreThan(time_t expires, time_t when)
Definition: store.cc:1405
void swapOut()
void reset()
Definition: store.cc:1676
void setPrivateKey(const bool shareable, const bool permanent)
Definition: store.cc:560
const char * swapStatusStr[]
Definition: store.cc:84
FREE destroyStoreEntry
void storeAppendPrintf(StoreEntry *e, const char *fmt,...)
Definition: store.cc:875
void negativeCache()
Definition: store.cc:1381
#define NULL
Definition: types.h:166
A StoreEntry::getPublic*() caller.
Definition: StoreClient.h:23
int size
Definition: ModDevPoll.cc:77
void trimMemory(const bool preserveSwappable)
Definition: store.cc:1871
#define false
Definition: GnuRegex.c:233
manages a single cache_dir
Definition: Disk.h:21
void setMemStatus(mem_status_t)
Definition: store.cc:1558
void lock(const char *context)
Definition: store.cc:433
void createMemObject()
Definition: store.cc:1609

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors