2014-12-09 18:53:11 +01:00
|
|
|
#pragma once
|
|
|
|
#ifndef BLOBSTORE_IMPLEMENTATIONS_ONBLOCKS_IMPL_DATALEAFNODE_H_
|
|
|
|
#define BLOBSTORE_IMPLEMENTATIONS_ONBLOCKS_IMPL_DATALEAFNODE_H_
|
|
|
|
|
|
|
|
#include "DataNode.h"
|
|
|
|
|
|
|
|
namespace blobstore {
|
|
|
|
namespace onblocks {
|
|
|
|
|
|
|
|
class DataLeafNode: public DataNode {
|
|
|
|
public:
|
2014-12-10 16:48:00 +01:00
|
|
|
DataLeafNode(DataNodeView block);
|
2014-12-09 18:53:11 +01:00
|
|
|
virtual ~DataLeafNode();
|
|
|
|
|
2014-12-10 22:55:02 +01:00
|
|
|
void InitializeNewNode();
|
|
|
|
|
2014-12-10 16:48:00 +01:00
|
|
|
void read(off_t offset, size_t count, blockstore::Data *result) override;
|
|
|
|
void write(off_t offset, size_t count, const blockstore::Data &data) override;
|
|
|
|
|
|
|
|
uint64_t numBytesInThisNode() override;
|
2014-12-09 18:53:11 +01:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|