diff options
| author | Stefan Boberg <[email protected]> | 2021-10-18 09:10:07 +0200 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2021-10-18 09:10:07 +0200 |
| commit | 94efab8e5c00f4b552946d8c1bdc69453020f888 (patch) | |
| tree | df312c80719590c847253e952ea27322187b2d88 /zenstore/include | |
| parent | structured cache: Implemented GarbageCollect() for disk and memory buckets (diff) | |
| download | zen-94efab8e5c00f4b552946d8c1bdc69453020f888.tar.xz zen-94efab8e5c00f4b552946d8c1bdc69453020f888.zip | |
gc: moved GcContect from CAS into gc files
Diffstat (limited to 'zenstore/include')
| -rw-r--r-- | zenstore/include/zenstore/CAS.h | 20 | ||||
| -rw-r--r-- | zenstore/include/zenstore/gc.h | 21 |
2 files changed, 23 insertions, 18 deletions
diff --git a/zenstore/include/zenstore/CAS.h b/zenstore/include/zenstore/CAS.h index 86e7e78d9..dc7e260ab 100644 --- a/zenstore/include/zenstore/CAS.h +++ b/zenstore/include/zenstore/CAS.h @@ -19,6 +19,8 @@ namespace zen { +class GcContext; + struct CasStoreConfiguration { // Root directory for CAS store @@ -50,24 +52,6 @@ private: std::unordered_set<IoHash> m_ChunkSet; }; -/** Garbage Collection context object - */ - -class GcContext -{ -public: - GcContext(); - ~GcContext(); - - void ContributeCids(std::span<const IoHash> Cid); - void ContributeCas(std::span<const IoHash> Hash); - -private: - struct GcState; - - std::unique_ptr<GcState> m_State; -}; - /** Context object for data scrubbing * * Data scrubbing is when we traverse stored data to validate it and diff --git a/zenstore/include/zenstore/gc.h b/zenstore/include/zenstore/gc.h index 055843547..33a43f4d2 100644 --- a/zenstore/include/zenstore/gc.h +++ b/zenstore/include/zenstore/gc.h @@ -11,6 +11,27 @@ namespace zen { class CasStore; struct IoHash; +/** Garbage Collection context object + */ + +class GcContext +{ +public: + GcContext(); + ~GcContext(); + + void ContributeCids(std::span<const IoHash> Cid); + void ContributeCas(std::span<const IoHash> Hash); + +private: + struct GcState; + + std::unique_ptr<GcState> m_State; +}; + +/** GC + */ + class CasGc { public: |