aboutsummaryrefslogtreecommitdiff
path: root/zenstore/include
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2021-08-11 12:09:34 +0200
committerStefan Boberg <[email protected]>2021-08-11 12:09:52 +0200
commitf84f5d9c1ca60c39cb27c806900d6a99727650d3 (patch)
treeac7b7b8337456a57175b5750c13424464bfd5fbd /zenstore/include
parenttrivial: Updated comment (diff)
downloadzen-f84f5d9c1ca60c39cb27c806900d6a99727650d3.tar.xz
zen-f84f5d9c1ca60c39cb27c806900d6a99727650d3.zip
Implemented Flush() operation for CID/CAS store interfaces
Diffstat (limited to 'zenstore/include')
-rw-r--r--zenstore/include/zenstore/CAS.h1
-rw-r--r--zenstore/include/zenstore/cidstore.h7
2 files changed, 6 insertions, 2 deletions
diff --git a/zenstore/include/zenstore/CAS.h b/zenstore/include/zenstore/CAS.h
index b4c97a6fd..f01b562cb 100644
--- a/zenstore/include/zenstore/CAS.h
+++ b/zenstore/include/zenstore/CAS.h
@@ -52,6 +52,7 @@ public:
virtual void Initialize(const CasStoreConfiguration& Config) = 0;
virtual InsertResult InsertChunk(IoBuffer Data, const IoHash& ChunkHash) = 0;
virtual IoBuffer FindChunk(const IoHash& ChunkHash) = 0;
+ virtual void Flush() = 0;
protected:
CasStoreConfiguration m_Config;
diff --git a/zenstore/include/zenstore/cidstore.h b/zenstore/include/zenstore/cidstore.h
index e365b198e..edc3f5582 100644
--- a/zenstore/include/zenstore/cidstore.h
+++ b/zenstore/include/zenstore/cidstore.h
@@ -17,8 +17,10 @@ class IoBuffer;
/** Content Store
*
* Data in the content store is referenced by content identifiers (CIDs), rather than their
- * literal hash. This is required to map uncompressed hashes to compressed hashes and may
- * be used to deal with other indirections in the future.
+ * literal hash. This class maps uncompressed hashes to compressed hashes and may
+ * be used to deal with other kinds of indirections in the future. For example, if we want
+ * to support chunking then a CID may represent a list of chunks which could be concatenated
+ * to form the referenced chunk.
*
*/
class CidStore
@@ -29,6 +31,7 @@ public:
void AddCompressedCid(const IoHash& DecompressedId, const IoHash& Compressed);
IoBuffer FindChunkByCid(const IoHash& DecompressedId);
+ void Flush();
private:
struct CidState;