Squid Web Cache master
Loading...
Searching...
No Matches
TestSwapDir.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#include "TestSwapDir.h"
11
12uint64_t
14{
15 return 3;
16}
17
18uint64_t
20{
21 return 2;
22}
23
24uint64_t
26{
27 return 2;
28}
29
30void
32{
33 const_cast<TestSwapDir *>(this)->statsCalled = true;
34}
35
36void
39
40void
43
44bool
46{
47 return false;
48}
49
50bool
51TestSwapDir::canStore(const StoreEntry &, int64_t, int &load) const
52{
53 load = 0;
54 return true;
55}
56
59{
60 return nullptr;
61}
62
65{
66 return nullptr;
67}
68
69void
71{}
72
void STIOCB(void *their_data, int errflag, StoreIOState::Pointer self)
uint64_t currentCount() const override
the total number of objects stored right now
uint64_t currentSize() const override
current size
StoreIOState::Pointer createStoreIO(StoreEntry &, StoreIOState::STIOCB *, void *) override
void parse(int, char *) override
void reconfigure() override
void init() override
void stat(StoreEntry &) const override
bool canStore(const StoreEntry &e, int64_t diskSpaceNeeded, int &load) const override
check whether we can store the entry; if we can, report current load
StoreIOState::Pointer openStoreIO(StoreEntry &, StoreIOState::STIOCB *, void *) override
bool unlinkdUseful() const override
whether SwapDir may benefit from unlinkd
uint64_t maxSize() const override
bool statsCalled
Definition TestSwapDir.h:20