@InterfaceAudience.Public public enum IndexBlockEncoding extends Enum<IndexBlockEncoding>
Enum Constant and Description |
---|
NONE
Disable index block encoding.
|
PREFIX_TREE |
Modifier and Type | Field and Description |
---|---|
static int |
ID_SIZE |
Modifier and Type | Method and Description |
---|---|
static IndexBlockEncoding |
getEncodingById(short indexBlockEncodingId) |
short |
getId()
Returns The id of a data block encoder.
|
static String |
getNameFromId(short encoderId)
Find and return the name of data block encoder for the given id.
|
byte[] |
getNameInBytes()
Returns name converted to bytes.
|
static IndexBlockEncoding |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static IndexBlockEncoding[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
void |
writeIdInBytes(byte[] dest,
int offset)
Writes id bytes to the given array starting from offset.
|
void |
writeIdInBytes(OutputStream stream)
Writes id in bytes.
|
public static final IndexBlockEncoding NONE
public static final IndexBlockEncoding PREFIX_TREE
public static final int ID_SIZE
public static IndexBlockEncoding[] values()
for (IndexBlockEncoding c : IndexBlockEncoding.values()) System.out.println(c);
public static IndexBlockEncoding valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic byte[] getNameInBytes()
public short getId()
public void writeIdInBytes(OutputStream stream) throws IOException
stream
- where the id should be written.IOException
public void writeIdInBytes(byte[] dest, int offset) throws IOException
dest
- output arrayoffset
- starting offset of the output arrayIOException
public static String getNameFromId(short encoderId)
encoderId
- id of data block encoderpublic static IndexBlockEncoding getEncodingById(short indexBlockEncodingId)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.