leveldb
db
log_format.h
Go to the documentation of this file.
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
//
5
// Log format information shared by reader and writer.
6
// See ../doc/log_format.txt for more detail.
7
8
#ifndef STORAGE_LEVELDB_DB_LOG_FORMAT_H_
9
#define STORAGE_LEVELDB_DB_LOG_FORMAT_H_
10
11
namespace
leveldb
{
12
namespace
log {
13
14
enum
RecordType
{
15
// Zero is reserved for preallocated files
16
kZeroType
= 0,
17
18
kFullType
= 1,
19
20
// For fragments
21
kFirstType
= 2,
22
kMiddleType
= 3,
23
kLastType
= 4
24
};
25
static
const
int
kMaxRecordType
=
kLastType
;
26
27
static
const
int
kBlockSize
= 32768;
28
29
// Header is checksum (4 bytes), length (2 bytes), type (1 byte).
30
static
const
int
kHeaderSize
= 4 + 2 + 1;
31
32
}
// namespace log
33
}
// namespace leveldb
34
35
#endif // STORAGE_LEVELDB_DB_LOG_FORMAT_H_
leveldb
Definition:
autocompact_test.cc:11
leveldb::log::kHeaderSize
static const int kHeaderSize
Definition:
log_format.h:30
leveldb::log::kFullType
Definition:
log_format.h:18
leveldb::log::kBlockSize
static const int kBlockSize
Definition:
log_format.h:27
leveldb::log::kMiddleType
Definition:
log_format.h:22
leveldb::log::kLastType
Definition:
log_format.h:23
leveldb::log::RecordType
RecordType
Definition:
log_format.h:14
leveldb::log::kZeroType
Definition:
log_format.h:16
leveldb::log::kFirstType
Definition:
log_format.h:21
leveldb::log::kMaxRecordType
static const int kMaxRecordType
Definition:
log_format.h:25
Generated by
1.8.12