2011-03-18 23:37:00 +01:00
|
|
|
// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
|
|
// found in the LICENSE file. See the AUTHORS file for names of contributors.
|
|
|
|
|
|
|
|
#ifndef STORAGE_LEVELDB_DB_BUILDER_H_
|
|
|
|
#define STORAGE_LEVELDB_DB_BUILDER_H_
|
|
|
|
|
2013-08-23 17:38:13 +02:00
|
|
|
#include "rocksdb/comparator.h"
|
|
|
|
#include "rocksdb/status.h"
|
|
|
|
#include "rocksdb/types.h"
|
2011-03-18 23:37:00 +01:00
|
|
|
|
|
|
|
namespace leveldb {
|
|
|
|
|
|
|
|
struct Options;
|
|
|
|
struct FileMetaData;
|
|
|
|
|
|
|
|
class Env;
|
2013-09-16 08:01:26 +02:00
|
|
|
class EnvOptions;
|
2011-03-18 23:37:00 +01:00
|
|
|
class Iterator;
|
|
|
|
class TableCache;
|
|
|
|
class VersionEdit;
|
|
|
|
|
|
|
|
// Build a Table file from the contents of *iter. The generated file
|
|
|
|
// will be named according to meta->number. On success, the rest of
|
2011-06-22 04:36:45 +02:00
|
|
|
// *meta will be filled with metadata about the generated table.
|
|
|
|
// If no data is present in *iter, meta->file_size will be set to
|
|
|
|
// zero, and no Table file will be produced.
|
2011-03-18 23:37:00 +01:00
|
|
|
extern Status BuildTable(const std::string& dbname,
|
|
|
|
Env* env,
|
|
|
|
const Options& options,
|
2013-06-08 00:35:17 +02:00
|
|
|
const EnvOptions& soptions,
|
2011-03-18 23:37:00 +01:00
|
|
|
TableCache* table_cache,
|
|
|
|
Iterator* iter,
|
2013-02-28 23:09:30 +01:00
|
|
|
FileMetaData* meta,
|
|
|
|
const Comparator* user_comparator,
|
|
|
|
const SequenceNumber newest_snapshot,
|
|
|
|
const SequenceNumber earliest_seqno_in_memtable);
|
2011-03-18 23:37:00 +01:00
|
|
|
|
2011-10-31 18:22:06 +01:00
|
|
|
} // namespace leveldb
|
2011-03-18 23:37:00 +01:00
|
|
|
|
|
|
|
#endif // STORAGE_LEVELDB_DB_BUILDER_H_
|