diff options
Diffstat (limited to 'zenserver/cache/namespacecachestore.h')
| -rw-r--r-- | zenserver/cache/namespacecachestore.h | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/zenserver/cache/namespacecachestore.h b/zenserver/cache/namespacecachestore.h deleted file mode 100644 index 85f4150bf..000000000 --- a/zenserver/cache/namespacecachestore.h +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright Epic Games, Inc. All Rights Reserved. - -#pragma once - -#include <zencore/logging.h> -#include <zencore/refcount.h> - -#include <zenstore/gc.h> - -#include <string> - -namespace zen { - -class ScrubContext; -class ZenCacheStore; -struct ZenCacheValue; - -/** NamespaceCache Store - */ -class NamespaceCacheStore : public RefCounted, public GcStorage, public GcContributor -{ -public: - NamespaceCacheStore(std::filesystem::path BasePath, CasGc& Gc); - ~NamespaceCacheStore(); - - bool Get(const std::string& Namespace, std::string_view Bucket, const IoHash& HashKey, ZenCacheValue& OutValue); - void Put(const std::string& Namespace, std::string_view Bucket, const IoHash& HashKey, const ZenCacheValue& Value); - bool DropBucket(const std::string& Namespace, std::string_view Bucket); - void Flush(); - void Scrub(ScrubContext& Ctx); - - spdlog::logger& Log() { return m_Log; } - const std::filesystem::path& BasePath() const { return m_BasePath; } - - virtual void GatherReferences(GcContext& GcCtx) override; - virtual void CollectGarbage(GcContext& GcCtx) override; - virtual GcStorageSize StorageSize() const override; - -private: - std::vector<std::string> FindExistingFolders() const; - ZenCacheStore* GetStore(const std::string& Namespace); - std::vector<ZenCacheStore*> GetAllStores() const; - spdlog::logger& m_Log; - std::filesystem::path m_BasePath; - mutable RwLock m_NamespacesLock; - std::unordered_map<std::string, ZenCacheStore*> m_Namespaces; -}; - -} // namespace zen |