2015-01-23 04:39:36 +01:00
|
|
|
#pragma once
|
|
|
|
#ifndef BLOBSTORE_IMPLEMENTATIONS_ONBLOCKS_DATATREESTORE_DATATREESTORE_H_
|
|
|
|
#define BLOBSTORE_IMPLEMENTATIONS_ONBLOCKS_DATATREESTORE_DATATREESTORE_H_
|
|
|
|
|
|
|
|
#include <memory>
|
2015-04-09 15:40:27 +02:00
|
|
|
#include <messmer/cpp-utils/macros.h>
|
2015-01-23 04:39:36 +01:00
|
|
|
|
|
|
|
namespace blockstore{
|
|
|
|
class Key;
|
|
|
|
}
|
|
|
|
namespace blobstore {
|
|
|
|
namespace onblocks {
|
|
|
|
namespace datanodestore {
|
|
|
|
class DataNodeStore;
|
|
|
|
}
|
|
|
|
namespace datatreestore {
|
|
|
|
class DataTree;
|
|
|
|
|
|
|
|
class DataTreeStore {
|
|
|
|
public:
|
|
|
|
DataTreeStore(std::unique_ptr<datanodestore::DataNodeStore> nodeStore);
|
|
|
|
virtual ~DataTreeStore();
|
|
|
|
|
|
|
|
std::unique_ptr<DataTree> load(const blockstore::Key &key);
|
|
|
|
|
|
|
|
std::unique_ptr<DataTree> createNewTree();
|
|
|
|
|
2015-02-24 22:44:10 +01:00
|
|
|
void remove(std::unique_ptr<DataTree> tree);
|
|
|
|
|
2015-01-23 04:39:36 +01:00
|
|
|
private:
|
|
|
|
std::unique_ptr<datanodestore::DataNodeStore> _nodeStore;
|
|
|
|
|
|
|
|
DISALLOW_COPY_AND_ASSIGN(DataTreeStore);
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|