BlobStoreOnBlocks can be configured with a blocksize

This commit is contained in:
Sebastian Messmer 2015-03-05 22:21:59 +01:00
parent 31417f8e05
commit 398b564156
2 changed files with 3 additions and 7 deletions

View File

@ -18,10 +18,8 @@ namespace onblocks {
using datanodestore::DataNodeStore;
using datatreestore::DataTreeStore;
constexpr size_t BlobStoreOnBlocks::BLOCKSIZE_BYTES;
BlobStoreOnBlocks::BlobStoreOnBlocks(unique_ptr<BlockStore> blockStore)
: _dataTreeStore(make_unique<DataTreeStore>(make_unique<DataNodeStore>(std::move(blockStore), BLOCKSIZE_BYTES))) {
BlobStoreOnBlocks::BlobStoreOnBlocks(unique_ptr<BlockStore> blockStore, uint32_t blocksizeBytes)
: _dataTreeStore(make_unique<DataTreeStore>(make_unique<DataNodeStore>(std::move(blockStore), blocksizeBytes))) {
}
BlobStoreOnBlocks::~BlobStoreOnBlocks() {

View File

@ -13,9 +13,7 @@ class DataTreeStore;
class BlobStoreOnBlocks: public BlobStore {
public:
static constexpr size_t BLOCKSIZE_BYTES = 4096;
BlobStoreOnBlocks(std::unique_ptr<blockstore::BlockStore> blockStore);
BlobStoreOnBlocks(std::unique_ptr<blockstore::BlockStore> blockStore, uint32_t blocksizeBytes);
virtual ~BlobStoreOnBlocks();
std::unique_ptr<Blob> create() override;