@InterfaceAudience.Public public class OrderedInt64 extends OrderedBytesBase<Long>
long
of 64-bits using a fixed-length encoding. Built on
OrderedBytes.encodeInt64(PositionedByteRange, long, Order)
.Modifier and Type | Field and Description |
---|---|
static OrderedInt64 |
ASCENDING
Deprecated.
since 3.0.0 and will be removed in 4.0.0
|
static OrderedInt64 |
DESCENDING
Deprecated.
since 3.0.0 and will be removed in 4.0.0
|
order
Constructor and Description |
---|
OrderedInt64(Order order)
Creates a new 64-bit
long with a fixed-length encoding. |
Modifier and Type | Method and Description |
---|---|
Long |
decode(PositionedByteRange src)
Read an instance of
T from the buffer src . |
long |
decodeLong(PositionedByteRange src)
Read a
long value from the buffer src . |
int |
encode(PositionedByteRange dst,
Long val)
Write instance
val into buffer dst . |
Class<Long> |
encodedClass()
Inform consumers over what type this
DataType operates. |
int |
encodedLength(Long val)
Inform consumers how long the encoded
byte[] will be. |
int |
encodeLong(PositionedByteRange dst,
long val)
Write instance
val into buffer dst . |
boolean |
isNullable()
Indicates whether this instance supports encoding null values.
|
getOrder, isOrderPreserving, isSkippable, skip
@Deprecated public static final OrderedInt64 ASCENDING
@Deprecated public static final OrderedInt64 DESCENDING
public OrderedInt64(Order order)
long
with a fixed-length encoding.order
- the Order
to usepublic boolean isNullable()
DataType
DataType
s that support null should
treat null as comparing less than any non-null value for default sort ordering purposes.isNullable
in interface DataType<Long>
isNullable
in class OrderedBytesBase<Long>
true
when null is supported, false
otherwise.public int encodedLength(Long val)
DataType
byte[]
will be.val
- The value to check.val
.apublic Class<Long> encodedClass()
DataType
DataType
operates. Useful when working with bare
DataType
instances.public Long decode(PositionedByteRange src)
DataType
T
from the buffer src
.src
- the buffer containing the encoded value.public int encode(PositionedByteRange dst, Long val)
DataType
val
into buffer dst
.dst
- the buffer containing the encoded value.val
- the value to encode onto dst
.public long decodeLong(PositionedByteRange src)
long
value from the buffer src
.src
- the PositionedByteRange
to read the long
fromlong
read from the bufferpublic int encodeLong(PositionedByteRange dst, long val)
val
into buffer dst
.dst
- the PositionedByteRange
to write toval
- the value to write to dst
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.