diff options
| author | Stefan Boberg <[email protected]> | 2021-09-20 12:08:44 +0200 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2021-09-20 12:08:44 +0200 |
| commit | 782351959f697fca6b0804c134467b7d9c29da1a (patch) | |
| tree | fdd6c841a567e69e3d0b45089de70c7e7d0bb756 /zenserver/upstream/upstreamcache.cpp | |
| parent | trivial: include cleanup (diff) | |
| download | zen-782351959f697fca6b0804c134467b7d9c29da1a.tar.xz zen-782351959f697fca6b0804c134467b7d9c29da1a.zip | |
Moved more code into zen namespace, for consistency
Also removed snapshot_manifest (remnants of vfs prototype)
Diffstat (limited to 'zenserver/upstream/upstreamcache.cpp')
| -rw-r--r-- | zenserver/upstream/upstreamcache.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/zenserver/upstream/upstreamcache.cpp b/zenserver/upstream/upstreamcache.cpp index ecd540445..5b7680be2 100644 --- a/zenserver/upstream/upstreamcache.cpp +++ b/zenserver/upstream/upstreamcache.cpp @@ -94,7 +94,7 @@ namespace detail { std::atomic_bool m_CompleteAdding{false}; }; - class JupiterUpstreamEndpoint final : public zen::UpstreamEndpoint + class JupiterUpstreamEndpoint final : public UpstreamEndpoint { public: JupiterUpstreamEndpoint(const CloudCacheClientOptions& Options) : m_UseLegacyDdc(Options.UseLegacyDdc) @@ -108,7 +108,7 @@ namespace detail { virtual bool Initialize() override { - zen::CloudCacheSession Session(m_Client); + CloudCacheSession Session(m_Client); const CloudCacheResult Result = Session.Authenticate(); return Result.Success; } @@ -119,7 +119,7 @@ namespace detail { { try { - zen::CloudCacheSession Session(m_Client); + CloudCacheSession Session(m_Client); CloudCacheResult Result; if (m_UseLegacyDdc && Type == ZenContentType::kBinary) @@ -135,7 +135,7 @@ namespace detail { { CbPackage Package; - const CbValidateError ValidationResult = zen::ValidateCompactBinary(Result.Response, CbValidateMode::All); + const CbValidateError ValidationResult = ValidateCompactBinary(Result.Response, CbValidateMode::All); if (Result.Success = ValidationResult == CbValidateError::None; Result.Success) { CbObject CacheRecord = LoadCompactBinaryObject(Result.Response); @@ -184,7 +184,7 @@ namespace detail { { try { - zen::CloudCacheSession Session(m_Client); + CloudCacheSession Session(m_Client); const CloudCacheResult Result = Session.GetCompressedBlob(PayloadKey.PayloadId); return {.Value = Result.Response, @@ -279,7 +279,7 @@ namespace detail { RefPtr<CloudCacheClient> m_Client; }; - class ZenUpstreamEndpoint final : public zen::UpstreamEndpoint + class ZenUpstreamEndpoint final : public UpstreamEndpoint { public: ZenUpstreamEndpoint(std::string_view ServiceUrl) @@ -357,14 +357,14 @@ namespace detail { try { - zen::ZenStructuredCacheSession Session(*m_Client); + ZenStructuredCacheSession Session(*m_Client); ZenCacheResult Result; int64_t TotalBytes = 0ull; double TotalElapsedSeconds = 0.0; if (CacheRecord.Type == ZenContentType::kCbPackage) { - zen::CbPackage Package; + CbPackage Package; Package.SetObject(CbObject(SharedBuffer(RecordValue))); for (const IoBuffer& Payload : Payloads) @@ -441,7 +441,7 @@ namespace detail { private: std::string m_DisplayName; - RefPtr<zen::ZenStructuredCacheClient> m_Client; + RefPtr<ZenStructuredCacheClient> m_Client; }; } // namespace detail @@ -468,7 +468,7 @@ class UpstreamStats final }; public: - UpstreamStats() : m_Log(zen::logging::Get("upstream")) {} + UpstreamStats() : m_Log(logging::Get("upstream")) {} void Add(const UpstreamEndpoint& Endpoint, const GetUpstreamCacheResult& Result) { @@ -536,8 +536,8 @@ private: class DefaultUpstreamCache final : public UpstreamCache { public: - DefaultUpstreamCache(const UpstreamCacheOptions& Options, ::ZenCacheStore& CacheStore, CidStore& CidStore) - : m_Log(zen::logging::Get("upstream")) + DefaultUpstreamCache(const UpstreamCacheOptions& Options, ZenCacheStore& CacheStore, CidStore& CidStore) + : m_Log(logging::Get("upstream")) , m_Options(Options) , m_CacheStore(CacheStore) , m_CidStore(CidStore) @@ -718,11 +718,11 @@ private: spdlog::logger& m_Log; UpstreamCacheOptions m_Options; - ::ZenCacheStore& m_CacheStore; + ZenCacheStore& m_CacheStore; CidStore& m_CidStore; UpstreamQueue m_UpstreamQueue; UpstreamStats m_Stats; - std::vector<std::unique_ptr<zen::UpstreamEndpoint>> m_Endpoints; + std::vector<std::unique_ptr<UpstreamEndpoint>> m_Endpoints; std::vector<std::thread> m_UpstreamThreads; std::atomic_bool m_IsRunning{false}; }; @@ -730,7 +730,7 @@ private: ////////////////////////////////////////////////////////////////////////// std::unique_ptr<UpstreamCache> -MakeUpstreamCache(const UpstreamCacheOptions& Options, ::ZenCacheStore& CacheStore, CidStore& CidStore) +MakeUpstreamCache(const UpstreamCacheOptions& Options, ZenCacheStore& CacheStore, CidStore& CidStore) { return std::make_unique<DefaultUpstreamCache>(Options, CacheStore, CidStore); } |