Package org.apache.hadoop.hbase.types
Class OrderedInt32
An
int of 32-bits using a fixed-length encoding. Built on
OrderedBytes.encodeInt32(PositionedByteRange, int, Order).-
Field Summary
FieldsFields inherited from class org.apache.hadoop.hbase.types.OrderedBytesBase
order -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRead an instance ofTfrom the buffersrc.intRead anintvalue from the buffersrc.intencode(PositionedByteRange dst, Integer val) Write instancevalinto bufferdst.Inform consumers over what type thisDataTypeoperates.intencodedLength(Integer val) Inform consumers how long the encodedbyte[]will be.intencodeInt(PositionedByteRange dst, int 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
-
DESCENDING
-
-
Constructor Details
-
OrderedInt32
-
-
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<Integer>- Overrides:
isNullablein classOrderedBytesBase<Integer>- 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.
-
decodeInt
Read anintvalue from the buffersrc. -
encodeInt
Write instancevalinto bufferdst.
-