]>
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 FG |
5 | |
6 | package org.rocksdb; | |
7 | ||
8 | /** | |
9 | * IndexType used in conjunction with BlockBasedTable. | |
10 | */ | |
11 | public enum IndexType { | |
12 | /** | |
13 | * A space efficient index block that is optimized for | |
14 | * binary-search-based index. | |
15 | */ | |
16 | kBinarySearch((byte) 0), | |
17 | /** | |
18 | * The hash index, if enabled, will do the hash lookup when | |
19 | * {@code Options.prefix_extractor} is provided. | |
20 | */ | |
21 | kHashSearch((byte) 1), | |
22 | /** | |
23 | * A two-level index implementation. Both levels are binary search indexes. | |
24 | */ | |
25 | kTwoLevelIndexSearch((byte) 2); | |
26 | ||
27 | /** | |
28 | * Returns the byte value of the enumerations value | |
29 | * | |
30 | * @return byte representation | |
31 | */ | |
32 | public byte getValue() { | |
33 | return value_; | |
34 | } | |
35 | ||
36 | private IndexType(byte value) { | |
37 | value_ = value; | |
38 | } | |
39 | ||
40 | private final byte value_; | |
41 | } |