Add Blob::key()
This commit is contained in:
parent
0e17ea5b29
commit
8dd0275c75
@ -9,6 +9,7 @@ using std::unique_ptr;
|
||||
using std::function;
|
||||
using blobstore::onblocks::datanodestore::DataLeafNode;
|
||||
using blobstore::onblocks::datanodestore::DataNodeLayout;
|
||||
using blockstore::Key;
|
||||
|
||||
namespace blobstore {
|
||||
namespace onblocks {
|
||||
@ -59,5 +60,9 @@ void BlobOnBlocks::write(const void *source, uint64_t offset, uint64_t size) {
|
||||
});
|
||||
}
|
||||
|
||||
Key BlobOnBlocks::key() const {
|
||||
return _datatree->key();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -20,6 +20,8 @@ public:
|
||||
BlobOnBlocks(std::unique_ptr<datatreestore::DataTree> datatree);
|
||||
virtual ~BlobOnBlocks();
|
||||
|
||||
blockstore::Key key() const override;
|
||||
|
||||
uint64_t size() const override;
|
||||
void resize(uint64_t numBytes) override;
|
||||
|
||||
|
@ -5,12 +5,19 @@
|
||||
#include <cstring>
|
||||
#include <cstdint>
|
||||
|
||||
namespace blockstore {
|
||||
class Key;
|
||||
}
|
||||
|
||||
namespace blobstore {
|
||||
|
||||
class Blob {
|
||||
public:
|
||||
virtual ~Blob() {}
|
||||
|
||||
//TODO Use own Key class for blobstore
|
||||
virtual blockstore::Key key() const = 0;
|
||||
|
||||
virtual uint64_t size() const = 0;
|
||||
virtual void resize(uint64_t numBytes) = 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user