aboutsummaryrefslogtreecommitdiff
path: root/zenserver/upstream/jupiter.h
diff options
context:
space:
mode:
Diffstat (limited to 'zenserver/upstream/jupiter.h')
-rw-r--r--zenserver/upstream/jupiter.h58
1 files changed, 30 insertions, 28 deletions
diff --git a/zenserver/upstream/jupiter.h b/zenserver/upstream/jupiter.h
index cff9a9ef1..3d9e6ea7b 100644
--- a/zenserver/upstream/jupiter.h
+++ b/zenserver/upstream/jupiter.h
@@ -95,38 +95,40 @@ public:
~CloudCacheSession();
CloudCacheResult Authenticate();
- CloudCacheResult GetDerivedData(std::string_view BucketId, std::string_view Key);
- CloudCacheResult GetDerivedData(std::string_view BucketId, const IoHash& Key);
- CloudCacheResult GetRef(std::string_view BucketId, const IoHash& Key, ZenContentType RefType);
- CloudCacheResult GetBlob(const IoHash& Key);
- CloudCacheResult GetCompressedBlob(const IoHash& Key);
- CloudCacheResult GetObject(const IoHash& Key);
+ CloudCacheResult GetDerivedData(std::string_view Namespace, std::string_view BucketId, std::string_view Key);
+ CloudCacheResult GetDerivedData(std::string_view Namespace, std::string_view BucketId, const IoHash& Key);
+ CloudCacheResult GetRef(std::string_view Namespace, std::string_view BucketId, const IoHash& Key, ZenContentType RefType);
+ CloudCacheResult GetBlob(std::string_view Namespace, const IoHash& Key);
+ CloudCacheResult GetCompressedBlob(std::string_view Namespace, const IoHash& Key);
+ CloudCacheResult GetObject(std::string_view Namespace, const IoHash& Key);
- CloudCacheResult PutDerivedData(std::string_view BucketId, std::string_view Key, IoBuffer DerivedData);
- CloudCacheResult PutDerivedData(std::string_view BucketId, const IoHash& Key, IoBuffer DerivedData);
- PutRefResult PutRef(std::string_view BucketId, const IoHash& Key, IoBuffer Ref, ZenContentType RefType);
- CloudCacheResult PutBlob(const IoHash& Key, IoBuffer Blob);
- CloudCacheResult PutCompressedBlob(const IoHash& Key, IoBuffer Blob);
- CloudCacheResult PutObject(const IoHash& Key, IoBuffer Object);
+ CloudCacheResult PutDerivedData(std::string_view Namespace, std::string_view BucketId, std::string_view Key, IoBuffer DerivedData);
+ CloudCacheResult PutDerivedData(std::string_view Namespace, std::string_view BucketId, const IoHash& Key, IoBuffer DerivedData);
+ PutRefResult PutRef(std::string_view Namespace, std::string_view BucketId, const IoHash& Key, IoBuffer Ref, ZenContentType RefType);
+ CloudCacheResult PutBlob(std::string_view Namespace, const IoHash& Key, IoBuffer Blob);
+ CloudCacheResult PutCompressedBlob(std::string_view Namespace, const IoHash& Key, IoBuffer Blob);
+ CloudCacheResult PutObject(std::string_view Namespace, const IoHash& Key, IoBuffer Object);
- FinalizeRefResult FinalizeRef(std::string_view BucketId, const IoHash& Key, const IoHash& RefHah);
+ FinalizeRefResult FinalizeRef(std::string_view Namespace, std::string_view BucketId, const IoHash& Key, const IoHash& RefHah);
- CloudCacheResult RefExists(std::string_view BucketId, const IoHash& Key);
+ CloudCacheResult RefExists(std::string_view Namespace, std::string_view BucketId, const IoHash& Key);
- GetObjectReferencesResult GetObjectReferences(const IoHash& Key);
+ GetObjectReferencesResult GetObjectReferences(std::string_view Namespace, const IoHash& Key);
- CloudCacheResult BlobExists(const IoHash& Key);
- CloudCacheResult CompressedBlobExists(const IoHash& Key);
- CloudCacheResult ObjectExists(const IoHash& Key);
+ CloudCacheResult BlobExists(std::string_view Namespace, const IoHash& Key);
+ CloudCacheResult CompressedBlobExists(std::string_view Namespace, const IoHash& Key);
+ CloudCacheResult ObjectExists(std::string_view Namespace, const IoHash& Key);
- CloudCacheExistsResult BlobExists(const std::set<IoHash>& Keys);
- CloudCacheExistsResult CompressedBlobExists(const std::set<IoHash>& Keys);
- CloudCacheExistsResult ObjectExists(const std::set<IoHash>& Keys);
+ CloudCacheExistsResult BlobExists(std::string_view Namespace, const std::set<IoHash>& Keys);
+ CloudCacheExistsResult CompressedBlobExists(std::string_view Namespace, const std::set<IoHash>& Keys);
+ CloudCacheExistsResult ObjectExists(std::string_view Namespace, const std::set<IoHash>& Keys);
CloudCacheResult PostComputeTasks(IoBuffer TasksData);
CloudCacheResult GetComputeUpdates(std::string_view ChannelId, const uint32_t WaitSeconds = 0);
- std::vector<IoHash> Filter(std::string_view BucketId, const std::vector<IoHash>& ChunkHashes);
+ std::vector<IoHash> Filter(std::string_view Namespace, std::string_view BucketId, const std::vector<IoHash>& ChunkHashes);
+
+ CloudCacheClient& Client() { return *m_CacheClient; };
private:
inline spdlog::logger& Log() { return m_Log; }
@@ -134,9 +136,9 @@ private:
CloudCacheAccessToken GetAccessToken(bool RefreshToken = false);
bool VerifyAccessToken(long StatusCode);
- CloudCacheResult CacheTypeExists(std::string_view TypeId, const IoHash& Key);
+ CloudCacheResult CacheTypeExists(std::string_view Namespace, std::string_view TypeId, const IoHash& Key);
- CloudCacheExistsResult CacheTypeExists(std::string_view TypeId, const std::set<IoHash>& Keys);
+ CloudCacheExistsResult CacheTypeExists(std::string_view Namespace, std::string_view TypeId, const std::set<IoHash>& Keys);
spdlog::logger& m_Log;
RefPtr<CloudCacheClient> m_CacheClient;
@@ -189,8 +191,8 @@ public:
~CloudCacheClient();
CloudCacheAccessToken AcquireAccessToken();
- std::string_view DdcNamespace() const { return m_DdcNamespace; }
- std::string_view BlobStoreNamespace() const { return m_BlobStoreNamespace; }
+ std::string_view DefaultDdcNamespace() const { return m_DefaultDdcNamespace; }
+ std::string_view DefaultBlobStoreNamespace() const { return m_DefaultBlobStoreNamespace; }
std::string_view ComputeCluster() const { return m_ComputeCluster; }
std::string_view ServiceUrl() const { return m_ServiceUrl; }
@@ -199,8 +201,8 @@ public:
private:
spdlog::logger& m_Log;
std::string m_ServiceUrl;
- std::string m_DdcNamespace;
- std::string m_BlobStoreNamespace;
+ std::string m_DefaultDdcNamespace;
+ std::string m_DefaultBlobStoreNamespace;
std::string m_ComputeCluster;
std::chrono::milliseconds m_ConnectTimeout{};
std::chrono::milliseconds m_Timeout{};