10215300402 朱维清 10222140408 谷杰
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

35 lines
659 B

#ifndef LEVELDB_VLOG_READER_H
#define LEVELDB_VLOG_READER_H
#include <cstdint>
#include "leveldb/slice.h"
#include "leveldb/status.h"
namespace leveldb {
class RandomAccessFile;
namespace vlog {
class VlogInfo;
class VlogManager;
class VlogReader {
public:
VlogReader(uint32_t vlog_no);
~VlogReader() = default;
/* 在 vlog_offset 处往后读取一条 record 的 value */
Status Get(uint64_t vlog_offset, std::string* value);
private:
VlogInfo* vlog_info_;
RandomAccessFile* vlog_;
friend class VlogManager;
};
} // namespace vlog
} // namespace leveldb
#endif // LEVELDB_VLOG_READER_H