aboutsummaryrefslogtreecommitdiff
path: root/src/zenstore/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/zenstore/include')
-rw-r--r--src/zenstore/include/zenstore/cache/structuredcachestore.h24
1 files changed, 11 insertions, 13 deletions
diff --git a/src/zenstore/include/zenstore/cache/structuredcachestore.h b/src/zenstore/include/zenstore/cache/structuredcachestore.h
index 3722a0d31..16be04ace 100644
--- a/src/zenstore/include/zenstore/cache/structuredcachestore.h
+++ b/src/zenstore/include/zenstore/cache/structuredcachestore.h
@@ -85,14 +85,12 @@ public:
~ZenCacheNamespace();
struct PutBatchHandle;
- PutBatchHandle* CreatePutBatch(ZenCachePutResultVec_t& OutResults);
- void CommitPutBatch(PutBatchHandle* Batch);
- void DeletePutBatch(PutBatchHandle* Batch) noexcept;
+ std::unique_ptr<PutBatchHandle> CreatePutBatch(ZenCachePutResultVec_t& OutResults);
+ void CommitPutBatch(PutBatchHandle* Batch);
struct GetBatchHandle;
- GetBatchHandle* CreateGetBatch(ZenCacheValueVec_t& OutResults);
- void CommitGetBatch(GetBatchHandle* Batch);
- void DeleteGetBatch(GetBatchHandle* Batch) noexcept;
+ std::unique_ptr<GetBatchHandle> CreateGetBatch(ZenCacheValueVec_t& OutResults);
+ void CommitGetBatch(GetBatchHandle* Batch);
bool Get(std::string_view Bucket, const IoHash& HashKey, ZenCacheValue& OutValue);
void Get(std::string_view Bucket, const IoHash& HashKey, GetBatchHandle& OptionalBatchHandle);
@@ -217,9 +215,9 @@ public:
~PutBatch();
private:
- ZenCacheStore& m_CacheStore;
- ZenCacheNamespace* m_Store = nullptr;
- ZenCacheNamespace::PutBatchHandle* m_NamespaceBatchHandle = nullptr;
+ ZenCacheStore& m_CacheStore;
+ ZenCacheNamespace* m_Store = nullptr;
+ std::unique_ptr<ZenCacheNamespace::PutBatchHandle> m_NamespaceBatchHandle;
friend class ZenCacheStore;
};
@@ -232,10 +230,10 @@ public:
~GetBatch();
private:
- ZenCacheStore& m_CacheStore;
- ZenCacheNamespace* m_Store = nullptr;
- ZenCacheNamespace::GetBatchHandle* m_NamespaceBatchHandle = nullptr;
- ZenCacheValueVec_t& Results;
+ ZenCacheStore& m_CacheStore;
+ ZenCacheNamespace* m_Store = nullptr;
+ std::unique_ptr<ZenCacheNamespace::GetBatchHandle> m_NamespaceBatchHandle;
+ ZenCacheValueVec_t& Results;
friend class ZenCacheStore;
};