]>
Commit | Line | Data |
---|---|---|
4e0938ef | 1 | /* |
bde978a6 | 2 | * Copyright (C) 1996-2015 The Squid Software Foundation and contributors |
4e0938ef AJ |
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 | ||
c8f4eac4 | 9 | #ifndef TEST_TESTSWAPDIR |
10 | #define TEST_TESTSWAPDIR | |
11 | ||
c8f4eac4 | 12 | #include "SwapDir.h" |
13 | ||
14 | class TestSwapDir : public SwapDir | |
15 | { | |
16 | ||
17 | public: | |
18 | TestSwapDir() : SwapDir("test"), statsCalled (false) {} | |
19 | ||
20 | bool statsCalled; | |
21 | ||
12e11a5c | 22 | virtual uint64_t maxSize() const; |
d5d5493b DK |
23 | virtual uint64_t currentSize() const; |
24 | virtual uint64_t currentCount() const; | |
c8f4eac4 | 25 | virtual void stat(StoreEntry &) const; /* output stats to the provided store entry */ |
d5d5493b | 26 | virtual void swappedOut(const StoreEntry &e) {} |
c8f4eac4 | 27 | |
c6059970 | 28 | virtual void reconfigure(); |
c8f4eac4 | 29 | virtual void init(); |
c521ad17 | 30 | virtual bool unlinkdUseful() const; |
aa1a691e | 31 | virtual bool canStore(const StoreEntry &e, int64_t diskSpaceNeeded, int &load) const; |
5add4d5c | 32 | virtual StoreIOState::Pointer createStoreIO(StoreEntry &, StoreIOState::STFNCB *, StoreIOState::STIOCB *, void *); |
33 | virtual StoreIOState::Pointer openStoreIO(StoreEntry &, StoreIOState::STFNCB *, StoreIOState::STIOCB *, void *); | |
c8f4eac4 | 34 | virtual void parse(int, char*); |
30abd221 | 35 | virtual StoreSearch *search(String, HttpRequest *); |
c8f4eac4 | 36 | }; |
37 | ||
38 | typedef RefCount<TestSwapDir> TestSwapDirPointer; | |
39 | ||
40 | #endif /* TEST_TESTSWAPDIR */ | |
f53969cc | 41 |