小组成员: 曹可心-10223903406 朴祉燕-10224602413
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.
 
 
 

26 lines
617 B

#ifndef STORAGE_LEVELDB_DB_VLOG_WRITER_H_
#define STORAGE_LEVELDB_DB_VLOG_WRITER_H_
#include <cstdint>
#include "leveldb/slice.h"
#include "leveldb/status.h"
// format: [size, key, vptr, value].
namespace leveldb{
class WritableFile;
namespace vlog{
class VWriter{
public:
explicit VWriter(WritableFile* vlogfile);
~VWriter();
Status AddRecord(const Slice& slice, int& write_size);
VWriter(const VWriter&) = delete;
VWriter& operator=(const VWriter&) = delete;
Status Flush();
private:
WritableFile* vlogfile_;
};
}// namespace vlog
}
#endif