Package org.apache.hadoop.hbase.types
Class OrderedInt16
A
short of 16-bits using a fixed-length encoding. Built on
OrderedBytes.encodeInt16(PositionedByteRange, short, Order).-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final OrderedInt16Deprecated.since 3.0.0 and will be removed in 4.0.0static final OrderedInt16Deprecated.since 3.0.0 and will be removed in 4.0.0Fields inherited from class org.apache.hadoop.hbase.types.OrderedBytesBase
order -
Constructor Summary
ConstructorsConstructorDescriptionOrderedInt16(Order order) Creates a new 16-bitshortwith a fixed-length encoding. -
Method Summary
Modifier and TypeMethodDescriptionRead an instance ofTfrom the buffersrc.shortRead ashortvalue from the buffersrc.intencode(PositionedByteRange dst, Short val) Write instancevalinto bufferdst.Inform consumers over what type thisDataTypeoperates.intencodedLength(Short val) Inform consumers how long the encodedbyte[]will be.intencodeShort(PositionedByteRange dst, short val) Write instancevalinto bufferdst.booleanIndicates whether this instance supports encoding null values.Methods inherited from class org.apache.hadoop.hbase.types.OrderedBytesBase
getOrder, isOrderPreserving, isSkippable, skip
-
Field Details
-
ASCENDING
Deprecated.since 3.0.0 and will be removed in 4.0.0 -
DESCENDING
Deprecated.since 3.0.0 and will be removed in 4.0.0
-
-
Constructor Details
-
OrderedInt16
Creates a new 16-bitshortwith a fixed-length encoding.- Parameters:
order- theOrderto use
-
-
Method Details
-
isNullable
Description copied from interface:DataTypeIndicates whether this instance supports encoding null values. This depends on the implementation details of the encoding format. AllDataTypes that support null should treat null as comparing less than any non-null value for default sort ordering purposes.- Specified by:
isNullablein interfaceDataType<Short>- Overrides:
isNullablein classOrderedBytesBase<Short>- Returns:
truewhen null is supported,falseotherwise.
-
encodedLength
Description copied from interface:DataTypeInform consumers how long the encodedbyte[]will be.- Parameters:
val- The value to check.- Returns:
- the number of bytes required to encode
val.a
-
encodedClass
Description copied from interface:DataTypeInform consumers over what type thisDataTypeoperates. Useful when working with bareDataTypeinstances. -
decode
Description copied from interface:DataTypeRead an instance ofTfrom the buffersrc.- Parameters:
src- the buffer containing the encoded value.
-
encode
Description copied from interface:DataTypeWrite instancevalinto bufferdst.- Parameters:
dst- the buffer containing the encoded value.val- the value to encode ontodst.- Returns:
- number of bytes written.
-
decodeShort
Read ashortvalue from the buffersrc.- Parameters:
src- thePositionedByteRangeto read thefloatfrom- Returns:
- the
shortread from buffer
-
encodeShort
Write instancevalinto bufferdst.- Parameters:
dst- thePositionedByteRangeto write toval- the value to write todst- Returns:
- the number of bytes written
-