TestSwapDir.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2017 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 #ifndef TEST_TESTSWAPDIR
10 #define TEST_TESTSWAPDIR
11 
12 #include "store/Disk.h"
13 
14 class TestSwapDir : public SwapDir
15 {
16 
17 public:
19 
21 
22  /* Store::Disk API */
23  virtual uint64_t maxSize() const override;
24  virtual uint64_t currentSize() const override;
25  virtual uint64_t currentCount() const override;
26  virtual void stat(StoreEntry &) const override;
27  virtual void swappedOut(const StoreEntry &e) override {}
28  virtual void reconfigure() override;
29  virtual void init() override;
30  virtual bool unlinkdUseful() const override;
31  virtual bool canStore(const StoreEntry &e, int64_t diskSpaceNeeded, int &load) const override;
34  virtual void parse(int, char*) override;
35  virtual void markForUnlink(StoreEntry &) override {}
36  virtual void unlink(StoreEntry &) override {}
37 };
38 
40 
41 #endif /* TEST_TESTSWAPDIR */
42 
virtual bool unlinkdUseful() const override
whether SwapDir may benefit from unlinkd
Definition: TestSwapDir.cc:45
virtual void init() override
Definition: TestSwapDir.cc:41
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
RefCount< TestSwapDir > TestSwapDirPointer
Definition: TestSwapDir.h:39
virtual uint64_t currentCount() const override
the total number of objects stored right now
Definition: TestSwapDir.cc:25
virtual uint64_t currentSize() const override
current size
Definition: TestSwapDir.cc:19
virtual void markForUnlink(StoreEntry &) override
expect an unlink() call after the entry becomes idle
Definition: TestSwapDir.h:35
virtual void reconfigure() override
Definition: TestSwapDir.cc:37
void STFNCB(void *their_data, int errflag, StoreIOState::Pointer self)
Definition: StoreIOState.h:41
virtual void parse(int, char *) override
Definition: TestSwapDir.cc:70
virtual StoreIOState::Pointer createStoreIO(StoreEntry &, StoreIOState::STFNCB *, StoreIOState::STIOCB *, void *) override
Definition: TestSwapDir.cc:58
void STIOCB(void *their_data, int errflag, StoreIOState::Pointer self)
Definition: StoreIOState.h:51
virtual uint64_t maxSize() const override
Definition: TestSwapDir.cc:13
virtual void swappedOut(const StoreEntry &e) override
called when entry swap out is complete
Definition: TestSwapDir.h:27
virtual void stat(StoreEntry &) const override
Definition: TestSwapDir.cc:31
bool statsCalled
Definition: TestSwapDir.h:20
virtual StoreIOState::Pointer openStoreIO(StoreEntry &, StoreIOState::STFNCB *, StoreIOState::STIOCB *, void *) override
Definition: TestSwapDir.cc:64
virtual void unlink(StoreEntry &) override
remove the entry from the store
Definition: TestSwapDir.h:36
#define false
Definition: GnuRegex.c:233
manages a single cache_dir
Definition: Disk.h:21

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors