1 /*
2  * Copyright (C) 1996-2021 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 
12 uint64_t
maxSize() const13 TestSwapDir::maxSize() const
14 {
15     return 3;
16 }
17 
18 uint64_t
currentSize() const19 TestSwapDir::currentSize() const
20 {
21     return 2;
22 }
23 
24 uint64_t
currentCount() const25 TestSwapDir::currentCount() const
26 {
27     return 2;
28 }
29 
30 void
stat(StoreEntry &) const31 TestSwapDir::stat(StoreEntry &) const
32 {
33     const_cast<TestSwapDir *>(this)->statsCalled = true;
34 }
35 
36 void
reconfigure()37 TestSwapDir::reconfigure()
38 {}
39 
40 void
init()41 TestSwapDir::init()
42 {}
43 
44 bool
unlinkdUseful() const45 TestSwapDir::unlinkdUseful() const
46 {
47     return false;
48 }
49 
50 bool
canStore(const StoreEntry &,int64_t,int & load) const51 TestSwapDir::canStore(const StoreEntry &, int64_t, int &load) const
52 {
53     load = 0;
54     return true;
55 }
56 
57 StoreIOState::Pointer
createStoreIO(StoreEntry &,StoreIOState::STFNCB *,StoreIOState::STIOCB *,void *)58 TestSwapDir::createStoreIO(StoreEntry &, StoreIOState::STFNCB *, StoreIOState::STIOCB *, void *)
59 {
60     return NULL;
61 }
62 
63 StoreIOState::Pointer
openStoreIO(StoreEntry &,StoreIOState::STFNCB *,StoreIOState::STIOCB *,void *)64 TestSwapDir::openStoreIO(StoreEntry &, StoreIOState::STFNCB *, StoreIOState::STIOCB *, void *)
65 {
66     return NULL;
67 }
68 
69 void
parse(int,char *)70 TestSwapDir::parse(int, char*)
71 {}
72 
73