]>
Commit | Line | Data |
---|---|---|
7c673cae | 1 | // Copyright (c) 2011-present, Facebook, Inc. All rights reserved. |
11fdf7f2 TL |
2 | // This source code is licensed under both the GPLv2 (found in the |
3 | // COPYING file in the root directory) and Apache 2.0 License | |
4 | // (found in the LICENSE.Apache file in the root directory). | |
7c673cae | 5 | |
11fdf7f2 | 6 | #pragma once |
7c673cae FG |
7 | |
8 | #include <stdint.h> | |
1e59de90 | 9 | |
11fdf7f2 | 10 | #include "rocksdb/slice.h" |
7c673cae | 11 | |
f67539c2 | 12 | namespace ROCKSDB_NAMESPACE { |
7c673cae FG |
13 | |
14 | // Define all public custom types here. | |
15 | ||
20effc67 TL |
16 | using ColumnFamilyId = uint32_t; |
17 | ||
7c673cae | 18 | // Represents a sequence number in a WAL file. |
1e59de90 | 19 | using SequenceNumber = uint64_t; |
7c673cae | 20 | |
494da23a TL |
21 | const SequenceNumber kMinUnCommittedSeq = 1; // 0 is always committed |
22 | ||
1e59de90 TL |
23 | enum class TableFileCreationReason { |
24 | kFlush, | |
25 | kCompaction, | |
26 | kRecovery, | |
27 | kMisc, | |
28 | }; | |
29 | ||
30 | enum class BlobFileCreationReason { | |
31 | kFlush, | |
32 | kCompaction, | |
33 | kRecovery, | |
34 | }; | |
35 | ||
20effc67 TL |
36 | // The types of files RocksDB uses in a DB directory. (Available for |
37 | // advanced options.) | |
38 | enum FileType { | |
39 | kWalFile, | |
40 | kDBLockFile, | |
41 | kTableFile, | |
42 | kDescriptorFile, | |
43 | kCurrentFile, | |
44 | kTempFile, | |
45 | kInfoLogFile, // Either the current one, or an old one | |
46 | kMetaDatabase, | |
47 | kIdentityFile, | |
48 | kOptionsFile, | |
49 | kBlobFile | |
50 | }; | |
51 | ||
11fdf7f2 | 52 | // User-oriented representation of internal key types. |
20effc67 | 53 | // Ordering of this enum entries should not change. |
11fdf7f2 TL |
54 | enum EntryType { |
55 | kEntryPut, | |
56 | kEntryDelete, | |
57 | kEntrySingleDelete, | |
58 | kEntryMerge, | |
59 | kEntryRangeDeletion, | |
60 | kEntryBlobIndex, | |
20effc67 | 61 | kEntryDeleteWithTimestamp, |
1e59de90 | 62 | kEntryWideColumnEntity, |
11fdf7f2 TL |
63 | kEntryOther, |
64 | }; | |
65 | ||
f67539c2 | 66 | } // namespace ROCKSDB_NAMESPACE |