org.apache.hadoop.hbase.types
Class OrderedInt8

java.lang.Object
  extended by org.apache.hadoop.hbase.types.OrderedBytesBase<Byte>
      extended by org.apache.hadoop.hbase.types.OrderedInt8
All Implemented Interfaces:
DataType<Byte>

@InterfaceAudience.Public
@InterfaceStability.Evolving
public class OrderedInt8
extends OrderedBytesBase<Byte>

A byte of 8-bits using a fixed-length encoding. Built on OrderedBytes.encodeInt8(PositionedByteRange, byte, Order).


Field Summary
static OrderedInt8 ASCENDING
           
static OrderedInt8 DESCENDING
           
 
Fields inherited from class org.apache.hadoop.hbase.types.OrderedBytesBase
order
 
Constructor Summary
protected OrderedInt8(Order order)
           
 
Method Summary
 Byte decode(PositionedByteRange src)
          Read an instance of T from the buffer src.
 byte decodeByte(PositionedByteRange src)
          Read a byte value from the buffer src.
 int encode(PositionedByteRange dst, Byte val)
          Write instance val into buffer dst.
 int encodeByte(PositionedByteRange dst, byte val)
          Write instance val into buffer dst.
 Class<Byte> encodedClass()
          Inform consumers over what type this DataType operates.
 int encodedLength(Byte val)
          Inform consumers how long the encoded byte[] will be.
 boolean isNullable()
          Indicates whether this instance supports encoding null values.
 
Methods inherited from class org.apache.hadoop.hbase.types.OrderedBytesBase
getOrder, isOrderPreserving, isSkippable, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ASCENDING

public static final OrderedInt8 ASCENDING

DESCENDING

public static final OrderedInt8 DESCENDING
Constructor Detail

OrderedInt8

protected OrderedInt8(Order order)
Method Detail

isNullable

public boolean isNullable()
Description copied from interface: DataType
Indicates whether this instance supports encoding null values. This depends on the implementation details of the encoding format. All DataTypes that support null should treat null as comparing less than any non-null value for default sort ordering purposes.

Specified by:
isNullable in interface DataType<Byte>
Overrides:
isNullable in class OrderedBytesBase<Byte>
Returns:
true when null is supported, false otherwise.

encodedLength

public int encodedLength(Byte val)
Description copied from interface: DataType
Inform consumers how long the encoded byte[] will be.

Parameters:
val - The value to check.
Returns:
the number of bytes required to encode val.a

encodedClass

public Class<Byte> encodedClass()
Description copied from interface: DataType
Inform consumers over what type this DataType operates. Useful when working with bare DataType instances.


decode

public Byte decode(PositionedByteRange src)
Description copied from interface: DataType
Read an instance of T from the buffer src.

Parameters:
src - the buffer containing the encoded value.

encode

public int encode(PositionedByteRange dst,
                  Byte val)
Description copied from interface: DataType
Write instance val into buffer dst.

Parameters:
dst - the buffer containing the encoded value.
val - the value to encode onto dst.
Returns:
number of bytes written.

decodeByte

public byte decodeByte(PositionedByteRange src)
Read a byte value from the buffer src.


encodeByte

public int encodeByte(PositionedByteRange dst,
                      byte val)
Write instance val into buffer dst.



Copyright © 2007–2016 The Apache Software Foundation. All rights reserved.