org.apache.hadoop.hbase.types
Class PBCell

java.lang.Object
  extended by org.apache.hadoop.hbase.types.PBType<CellProtos.Cell>
      extended by org.apache.hadoop.hbase.types.PBCell
All Implemented Interfaces:
DataType<CellProtos.Cell>

public class PBCell
extends PBType<CellProtos.Cell>

An example for using protobuf objects with DataType API.


Constructor Summary
PBCell()
           
 
Method Summary
 CellProtos.Cell decode(PositionedByteRange src)
          Read an instance of T from the buffer src.
 int encode(PositionedByteRange dst, CellProtos.Cell val)
          Write instance val into buffer dst.
 Class<CellProtos.Cell> encodedClass()
          Inform consumers over what type this DataType operates.
 int skip(PositionedByteRange src)
          Skip src's position forward over one encoded value.
 
Methods inherited from class org.apache.hadoop.hbase.types.PBType
encodedLength, getOrder, inputStreamFromByteRange, isNullable, isOrderPreserving, isSkippable, outputStreamFromByteRange
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PBCell

public PBCell()
Method Detail

encodedClass

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


skip

public int skip(PositionedByteRange src)
Description copied from interface: DataType
Skip src's position forward over one encoded value.

Parameters:
src - the buffer containing the encoded value.
Returns:
number of bytes skipped.

decode

public CellProtos.Cell 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,
                  CellProtos.Cell 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.


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