aboutsummaryrefslogtreecommitdiff
path: root/zenserver/cache/structuredcachestore.h
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2022-05-25 14:08:11 +0200
committerDan Engelbrecht <[email protected]>2022-05-25 14:08:11 +0200
commit5feb2725a3c6461e913a95ea271046855c773ac5 (patch)
treebfb9dd48545abadfbae13302a17b6e8d5a068375 /zenserver/cache/structuredcachestore.h
parentMake sure ZenCacheMemoryLayer handles dropped buckets correctly (just like Ze... (diff)
downloadzen-5feb2725a3c6461e913a95ea271046855c773ac5.tar.xz
zen-5feb2725a3c6461e913a95ea271046855c773ac5.zip
namespace drop
Diffstat (limited to 'zenserver/cache/structuredcachestore.h')
-rw-r--r--zenserver/cache/structuredcachestore.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/zenserver/cache/structuredcachestore.h b/zenserver/cache/structuredcachestore.h
index 4da48d3d9..c07c3e382 100644
--- a/zenserver/cache/structuredcachestore.h
+++ b/zenserver/cache/structuredcachestore.h
@@ -333,6 +333,7 @@ public:
bool Get(std::string_view Bucket, const IoHash& HashKey, ZenCacheValue& OutValue);
void Put(std::string_view Bucket, const IoHash& HashKey, const ZenCacheValue& Value);
+ bool Drop();
bool DropBucket(std::string_view Bucket);
void Flush();
void Scrub(ScrubContext& Ctx);
@@ -375,6 +376,7 @@ public:
bool Get(std::string_view Namespace, std::string_view Bucket, const IoHash& HashKey, ZenCacheValue& OutValue);
void Put(std::string_view Namespace, std::string_view Bucket, const IoHash& HashKey, const ZenCacheValue& Value);
bool DropBucket(std::string_view Namespace, std::string_view Bucket);
+ bool DropNamespace(std::string_view Namespace);
void Flush();
void Scrub(ScrubContext& Ctx);
@@ -388,8 +390,9 @@ private:
typedef std::unordered_map<std::string, std::unique_ptr<ZenCacheNamespace>> NameSpaceMap;
- mutable RwLock m_NamespacesLock;
- NameSpaceMap m_Namespaces;
+ mutable RwLock m_NamespacesLock;
+ NameSpaceMap m_Namespaces;
+ std::vector<std::unique_ptr<ZenCacheNamespace>> m_DroppedNamespaces;
CasGc& m_Gc;
Configuration m_Configuration;