aboutsummaryrefslogtreecommitdiff
path: root/src/zenstore/include
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2023-10-20 11:02:26 +0200
committerGitHub <[email protected]>2023-10-20 11:02:26 +0200
commit57f054be2f4f68d0d52631838655a45855c33655 (patch)
tree4a768d8eee548c1c4c002388e48da3d62850dc02 /src/zenstore/include
parentAdd --skip-delete option to gc command (#484) (diff)
downloadzen-57f054be2f4f68d0d52631838655a45855c33655.tar.xz
zen-57f054be2f4f68d0d52631838655a45855c33655.zip
clean up GcContributor and GcStorage to be pure interfaces (#485)
Diffstat (limited to 'src/zenstore/include')
-rw-r--r--src/zenstore/include/zenstore/gc.h12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/zenstore/include/zenstore/gc.h b/src/zenstore/include/zenstore/gc.h
index 1c455abe5..ffdc8f066 100644
--- a/src/zenstore/include/zenstore/gc.h
+++ b/src/zenstore/include/zenstore/gc.h
@@ -100,13 +100,10 @@ private:
class GcContributor
{
public:
- GcContributor(GcManager& Gc);
- ~GcContributor();
-
virtual void GatherReferences(GcContext& GcCtx) = 0;
protected:
- GcManager& m_Gc;
+ virtual ~GcContributor() {}
};
struct GcStorageSize
@@ -120,15 +117,12 @@ struct GcStorageSize
class GcStorage
{
public:
- GcStorage(GcManager& Gc);
- ~GcStorage();
-
virtual void ScrubStorage(ScrubContext& ScrubCtx) = 0;
virtual void CollectGarbage(GcContext& GcCtx) = 0;
virtual GcStorageSize StorageSize() const = 0;
-private:
- GcManager& m_Gc;
+protected:
+ virtual ~GcStorage() {}
};
/** Interface for querying if we are running low on disk space, used to deny put/writes to disk