]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/tests/TestSwapDir.h
Source Format Enforcement (#763)
[thirdparty/squid.git] / src / tests / TestSwapDir.h
index 0908d1d336745e0640ef089471f4c872ff845d93..177218686b3ff343b26e9aa18cf7235f6b250621 100644 (file)
@@ -1,8 +1,15 @@
+/*
+ * Copyright (C) 1996-2021 The Squid Software Foundation and contributors
+ *
+ * Squid software is distributed under GPLv2+ license and includes
+ * contributions from numerous individuals and organizations.
+ * Please see the COPYING and CONTRIBUTORS files for details.
+ */
+
 #ifndef TEST_TESTSWAPDIR
 #define TEST_TESTSWAPDIR
 
-#include "squid.h"
-#include "SwapDir.h"
+#include "store/Disk.h"
 
 class TestSwapDir : public SwapDir
 {
@@ -12,21 +19,27 @@ public:
 
     bool statsCalled;
 
-    virtual uint64_t maxSize() const;
-    virtual uint64_t currentSize() const;
-    virtual uint64_t currentCount() const;
-    virtual void stat(StoreEntry &) const; /* output stats to the provided store entry */
-    virtual void swappedOut(const StoreEntry &e) {}
-
-    virtual void reconfigure(int, char*);
-    virtual void init();
-    virtual bool canStore(const StoreEntry &e, int64_t diskSpaceNeeded, int &load) const;
-    virtual StoreIOState::Pointer createStoreIO(StoreEntry &, StoreIOState::STFNCB *, StoreIOState::STIOCB *, void *);
-    virtual StoreIOState::Pointer openStoreIO(StoreEntry &, StoreIOState::STFNCB *, StoreIOState::STIOCB *, void *);
-    virtual void parse(int, char*);
-    virtual StoreSearch *search(String, HttpRequest *);
+    /* Store::Disk API */
+    virtual uint64_t maxSize() const override;
+    virtual uint64_t currentSize() const override;
+    virtual uint64_t currentCount() const override;
+    virtual void stat(StoreEntry &) const override;
+    virtual void finalizeSwapoutSuccess(const StoreEntry &) override {}
+    virtual void finalizeSwapoutFailure(StoreEntry &) override {}
+    virtual void reconfigure() override;
+    virtual void init() override;
+    virtual bool unlinkdUseful() const override;
+    virtual bool canStore(const StoreEntry &e, int64_t diskSpaceNeeded, int &load) const override;
+    virtual StoreIOState::Pointer createStoreIO(StoreEntry &, StoreIOState::STFNCB *, StoreIOState::STIOCB *, void *) override;
+    virtual StoreIOState::Pointer openStoreIO(StoreEntry &, StoreIOState::STFNCB *, StoreIOState::STIOCB *, void *) override;
+    virtual void parse(int, char*) override;
+    virtual void evictCached(StoreEntry &) override {}
+    virtual void evictIfFound(const cache_key *) override {}
+    virtual bool hasReadableEntry(const StoreEntry &) const override { return false; }
+    virtual bool smpAware() const override { return false; }
 };
 
 typedef RefCount<TestSwapDir> TestSwapDirPointer;
 
 #endif  /* TEST_TESTSWAPDIR */
+