BlobStore uses synchronized access to its BlockStore

This commit is contained in:
Sebastian Meßmer 2015-03-19 11:16:50 +01:00
parent 92bec0afb2
commit deb1a2462a

View File

@ -3,6 +3,7 @@
#include "datatreestore/DataTreeStore.h"
#include "datatreestore/DataTree.h"
#include "BlobStoreOnBlocks.h"
#include <messmer/blockstore/implementations/synchronized/SynchronizedBlockStore.h>
#include "BlobOnBlocks.h"
#include <messmer/cpp-utils/pointer.h>
@ -11,6 +12,7 @@ using std::unique_ptr;
using std::make_unique;
using blockstore::BlockStore;
using blockstore::synchronized::SynchronizedBlockStore;
using blockstore::Key;
using cpputils::dynamic_pointer_move;
@ -21,7 +23,7 @@ using datanodestore::DataNodeStore;
using datatreestore::DataTreeStore;
BlobStoreOnBlocks::BlobStoreOnBlocks(unique_ptr<BlockStore> blockStore, uint32_t blocksizeBytes)
: _dataTreeStore(make_unique<DataTreeStore>(make_unique<DataNodeStore>(std::move(blockStore), blocksizeBytes))) {
: _dataTreeStore(make_unique<DataTreeStore>(make_unique<DataNodeStore>(make_unique<SynchronizedBlockStore>(std::move(blockStore)), blocksizeBytes))) {
}
BlobStoreOnBlocks::~BlobStoreOnBlocks() {