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
Fields inherited from class org.apache.hadoop.hbase.types.OrderedBytesBase
order
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionRead an instance ofT
from the buffersrc
.int
Read anint
value from the buffersrc
.int
encode
(PositionedByteRange dst, Integer val) Write instanceval
into bufferdst
.Inform consumers over what type thisDataType
operates.int
encodedLength
(Integer val) Inform consumers how long the encodedbyte[]
will be.int
encodeInt
(PositionedByteRange dst, int val) Write instanceval
into bufferdst
.boolean
Indicates 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:DataType
Indicates whether this instance supports encoding null values. This depends on the implementation details of the encoding format. AllDataType
s that support null should treat null as comparing less than any non-null value for default sort ordering purposes.- Specified by:
isNullable
in interfaceDataType<Integer>
- Overrides:
isNullable
in classOrderedBytesBase<Integer>
- Returns:
true
when null is supported,false
otherwise.
-
encodedLength
Description copied from interface:DataType
Inform 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:DataType
Inform consumers over what type thisDataType
operates. Useful when working with bareDataType
instances. -
decode
Description copied from interface:DataType
Read an instance ofT
from the buffersrc
.- Parameters:
src
- the buffer containing the encoded value.
-
encode
Description copied from interface:DataType
Write instanceval
into bufferdst
.- Parameters:
dst
- the buffer containing the encoded value.val
- the value to encode ontodst
.- Returns:
- number of bytes written.
-
decodeInt
Read anint
value from the buffersrc
. -
encodeInt
Write instanceval
into bufferdst
.
-