TestSwapDir.cc
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2022 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
38{}
39
40void
42{}
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 STFNCB(void *their_data, int errflag, StoreIOState::Pointer self)
Definition: StoreIOState.h:41
void STIOCB(void *their_data, int errflag, StoreIOState::Pointer self)
Definition: StoreIOState.h:51
virtual uint64_t currentCount() const override
the total number of objects stored right now
Definition: TestSwapDir.cc:25
virtual StoreIOState::Pointer createStoreIO(StoreEntry &, StoreIOState::STFNCB *, StoreIOState::STIOCB *, void *) override
Definition: TestSwapDir.cc:58
virtual uint64_t currentSize() const override
current size
Definition: TestSwapDir.cc:19
virtual void parse(int, char *) override
Definition: TestSwapDir.cc:70
virtual void reconfigure() override
Definition: TestSwapDir.cc:37
virtual void init() override
Definition: TestSwapDir.cc:41
virtual void stat(StoreEntry &) const override
Definition: TestSwapDir.cc:31
virtual 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
Definition: TestSwapDir.cc:51
virtual bool unlinkdUseful() const override
whether SwapDir may benefit from unlinkd
Definition: TestSwapDir.cc:45
virtual StoreIOState::Pointer openStoreIO(StoreEntry &, StoreIOState::STFNCB *, StoreIOState::STIOCB *, void *) override
Definition: TestSwapDir.cc:64
virtual uint64_t maxSize() const override
Definition: TestSwapDir.cc:13
bool statsCalled
Definition: TestSwapDir.h:20

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors