作者: 谢瑞阳 10225101483 徐翔宇 10225101535
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

36 righe
1.2 KiB

  1. // Copyright (c) 2011 The LevelDB Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file. See the AUTHORS file for names of contributors.
  4. #ifndef STORAGE_LEVELDB_DB_BUILDER_H_
  5. #define STORAGE_LEVELDB_DB_BUILDER_H_
  6. #include "leveldb/status.h"
  7. namespace leveldb {
  8. struct Options;
  9. struct FileMetaData;
  10. class Env;
  11. class Iterator;
  12. class TableCache;
  13. class VersionEdit;
  14. // Build a Table file from the contents of *iter. The generated file
  15. // will be named according to meta->number. On success, the rest of
  16. // *meta will be filled with metadata about the generated table, and
  17. // large value refs and the added file information will be added to
  18. // *edit. If no data is present in *iter, meta->file_size will be set
  19. // to zero, and no Table file will be produced.
  20. extern Status BuildTable(const std::string& dbname,
  21. Env* env,
  22. const Options& options,
  23. TableCache* table_cache,
  24. Iterator* iter,
  25. FileMetaData* meta,
  26. VersionEdit* edit);
  27. }
  28. #endif // STORAGE_LEVELDB_DB_BUILDER_H_