2014-12-09 17:45:33 +01:00
|
|
|
#pragma once
|
|
|
|
#ifndef BLOBSTORE_IMPLEMENTATIONS_BLOCKED_BLOBSTOREONBLOCKS_H_
|
|
|
|
#define BLOBSTORE_IMPLEMENTATIONS_BLOCKED_BLOBSTOREONBLOCKS_H_
|
|
|
|
|
2015-02-17 00:40:34 +01:00
|
|
|
#include "../../interface/BlobStore.h"
|
|
|
|
#include "messmer/blockstore/interface/BlockStore.h"
|
2014-12-09 17:56:48 +01:00
|
|
|
|
2014-12-09 17:45:33 +01:00
|
|
|
namespace blobstore {
|
|
|
|
namespace onblocks {
|
2014-12-13 19:17:08 +01:00
|
|
|
namespace datanodestore {
|
|
|
|
class DataNodeStore;
|
|
|
|
}
|
2014-12-09 17:45:33 +01:00
|
|
|
|
2014-12-09 17:56:48 +01:00
|
|
|
class BlobStoreOnBlocks: public BlobStore {
|
2014-12-09 17:45:33 +01:00
|
|
|
public:
|
2014-12-09 18:53:11 +01:00
|
|
|
static constexpr size_t BLOCKSIZE = 4096;
|
|
|
|
|
2014-12-09 17:56:48 +01:00
|
|
|
BlobStoreOnBlocks(std::unique_ptr<blockstore::BlockStore> blockStore);
|
2014-12-09 17:45:33 +01:00
|
|
|
virtual ~BlobStoreOnBlocks();
|
2014-12-09 17:56:48 +01:00
|
|
|
|
2014-12-13 19:17:08 +01:00
|
|
|
std::unique_ptr<Blob> create() override;
|
|
|
|
std::unique_ptr<Blob> load(const blockstore::Key &key) override;
|
2014-12-09 17:56:48 +01:00
|
|
|
|
|
|
|
private:
|
2014-12-13 19:17:08 +01:00
|
|
|
std::unique_ptr<datanodestore::DataNodeStore> _nodes;
|
2014-12-09 17:45:33 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|