]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/tests/TestSwapDir.h
2 * Copyright (C) 1996-2016 The Squid Software Foundation and contributors
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.
9 #ifndef TEST_TESTSWAPDIR
10 #define TEST_TESTSWAPDIR
12 #include "store/Disk.h"
14 class TestSwapDir
: public SwapDir
18 TestSwapDir() : SwapDir("test"), statsCalled (false) {}
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
;
32 virtual StoreIOState::Pointer
createStoreIO(StoreEntry
&, StoreIOState::STFNCB
*, StoreIOState::STIOCB
*, void *) override
;
33 virtual StoreIOState::Pointer
openStoreIO(StoreEntry
&, StoreIOState::STFNCB
*, StoreIOState::STIOCB
*, void *) override
;
34 virtual void parse(int, char*) override
;
35 virtual void markForUnlink(StoreEntry
&) override
{}
36 virtual void unlink(StoreEntry
&) override
{}
39 typedef RefCount
<TestSwapDir
> TestSwapDirPointer
;
41 #endif /* TEST_TESTSWAPDIR */