#pragma once #ifndef BLOCKSTORE_IMPLEMENTATIONS_INMEMORY_INMEMORYBLOCKSTORE_H_ #define BLOCKSTORE_IMPLEMENTATIONS_INMEMORY_INMEMORYBLOCKSTORE_H_ #include #include #include #include namespace blockstore { namespace inmemory { class InMemoryBlock; class InMemoryBlockStore: public BlockStoreWithRandomKeys { public: InMemoryBlockStore(); std::unique_ptr create(const Key &key, size_t size) override; std::unique_ptr load(const Key &key) override; void remove(const Key &key) override; private: std::map _blocks; DISALLOW_COPY_AND_ASSIGN(InMemoryBlockStore); }; } } #endif