#ifndef MESSMER_BLOBSTORE_IMPLEMENTATIONS_ONBLOCKS_PARALLELACCESSDATATREESTORE_PARALLELACCESSDATATREESTOREADAPTER_H_ #define MESSMER_BLOBSTORE_IMPLEMENTATIONS_ONBLOCKS_PARALLELACCESSDATATREESTORE_PARALLELACCESSDATATREESTOREADAPTER_H_ #include #include #include "../datatreestore/DataTreeStore.h" #include "../datatreestore/DataTree.h" namespace blobstore { namespace onblocks { namespace parallelaccessdatatreestore { class ParallelAccessDataTreeStoreAdapter: public parallelaccessstore::ParallelAccessBaseStore { public: ParallelAccessDataTreeStoreAdapter(datatreestore::DataTreeStore *baseDataTreeStore) :_baseDataTreeStore(std::move(baseDataTreeStore)) { } std::unique_ptr loadFromBaseStore(const blockstore::Key &key) override { return _baseDataTreeStore->load(key); } void removeFromBaseStore(std::unique_ptr dataTree) override { return _baseDataTreeStore->remove(std::move(dataTree)); } private: datatreestore::DataTreeStore *_baseDataTreeStore; DISALLOW_COPY_AND_ASSIGN(ParallelAccessDataTreeStoreAdapter); }; } } } #endif