diff options
Diffstat (limited to 'zenstore/compactcas.h')
| -rw-r--r-- | zenstore/compactcas.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/zenstore/compactcas.h b/zenstore/compactcas.h index c65af0435..05bbf81f6 100644 --- a/zenstore/compactcas.h +++ b/zenstore/compactcas.h @@ -40,12 +40,22 @@ struct CasDiskIndexEntry static_assert(sizeof(CasDiskIndexEntry) == 32); +/** This implements a storage strategy for small CAS values + * + * New chunks are simply appended to a small object file, and an index is + * maintained to allow chunks to be looked up within the active small object + * files + * + */ + struct CasContainerStrategy { CasContainerStrategy(const CasStoreConfiguration& Config, CasStore::Stats& Stats) : m_Config(Config), m_Stats(Stats) {} - CasStore::InsertResult InsertChunk(const void* chunkData, size_t chunkSize, const IoHash& chunkHash); + CasStore::InsertResult InsertChunk(const void* ChunkData, size_t ChunkSize, const IoHash& ChunkHash); CasStore::InsertResult InsertChunk(IoBuffer Chunk, const IoHash& chunkHash); - IoBuffer FindChunk(const IoHash& chunkHash); + IoBuffer FindChunk(const IoHash& ChunkHash); + bool HaveChunk(const IoHash& ChunkHash); + void FilterChunks(CasChunkSet& InOutChunks); void Initialize(const std::string_view ContainerBaseName, uint64_t Alignment, bool IsNewStore); void Flush(); |