| 枚举常量和说明 |
|---|
kBinarySearch
A space efficient index block that is optimized for
binary-search-based index.
|
kBinarySearchWithFirstKey
Like
kBinarySearch, but index also contains first key of each block. |
kHashSearch
The hash index, if enabled, will do the hash lookup when
Options.prefix_extractor is provided. |
kTwoLevelIndexSearch
A two-level index implementation.
|
| 限定符和类型 | 方法和说明 |
|---|---|
byte |
getValue()
Returns the byte value of the enumerations value
|
static IndexType |
valueOf(java.lang.String name)
返回带有指定名称的该类型的枚举常量。
|
static IndexType[] |
values()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
public static final IndexType kBinarySearch
public static final IndexType kHashSearch
Options.prefix_extractor is provided.public static final IndexType kTwoLevelIndexSearch
public static final IndexType kBinarySearchWithFirstKey
kBinarySearch, but index also contains first key of each block.
This allows iterators to defer reading the block until it's actually
needed. May significantly reduce read amplification of short range scans.
Without it, iterator seek usually reads one block from each level-0 file
and from each level, which may be expensive.
Works best in combination with:
- IndexShorteningMode::kNoShortening,
- custom FlushBlockPolicy to cut blocks at some meaningful boundaries,
e.g. when prefix changes.
Makes the index significantly bigger (2x or more), especially when keys
are long.public static IndexType[] values()
for (IndexType c : IndexType.values()) System.out.println(c);
public static IndexType valueOf(java.lang.String name)
name - 要返回的枚举常量的名称。java.lang.IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量java.lang.NullPointerException - 如果参数为空值public byte getValue()