@InterfaceAudience.Private public abstract class ByteBufferExtendedCell extends Object implements ExtendedCell
Cell
interface. It is used when the Cell is
backed by a ByteBuffer
: i.e. cell instanceof ByteBufferedCell
.
This class has getters for the row, column family, column qualifier, value and tags hosting
ByteBuffers. It also has getters of the *position* within a ByteBuffer where these field bytes
begin. These are needed because a single ByteBuffer may back one or many Cell instances -- it
depends on the implementation -- so the ByteBuffer position as returned by
ByteBuffer.arrayOffset()
cannot be relied upon. Also, do not confuse these position
methods with the getXXXOffset methods from the super Interface, Cell
; dependent up on
implementation, the Cell getXXXOffset methods can return the same value as a call to its
equivalent position method from below BUT they can also stray; if a ByteBufferedCell, use the
below position methods to find where a field begins.
Use the getXXXLength methods from Cell to find a fields length.
A Cell object can be of this type only on the server side.
WARNING: If a Cell is backed by an offheap ByteBuffer, any call to getXXXArray() will result in a temporary byte array creation and a bytes copy. Avoid these allocations by using the appropriate Cell access server-side: i.e. ByteBufferedCell when backed by a ByteBuffer and Cell when it is not.
CELL_NOT_BASED_ON_CHUNK
MAX_TAGS_LENGTH
Constructor and Description |
---|
ByteBufferExtendedCell() |
Modifier and Type | Method and Description |
---|---|
abstract ByteBuffer |
getFamilyByteBuffer()
Returns The
ByteBuffer containing the column family bytes. |
abstract int |
getFamilyPosition()
Returns Position in the
ByteBuffer where column family bytes start |
abstract ByteBuffer |
getQualifierByteBuffer()
Returns The
ByteBuffer containing the column qualifier bytes. |
abstract int |
getQualifierPosition()
Returns Position in the
ByteBuffer where column qualifier bytes start |
abstract ByteBuffer |
getRowByteBuffer()
Returns The
ByteBuffer containing the row bytes. |
abstract int |
getRowPosition()
Returns Position in the
ByteBuffer where row bytes start |
abstract ByteBuffer |
getTagsByteBuffer()
Returns The
ByteBuffer containing the tag bytes. |
abstract int |
getTagsPosition()
Returns Position in the
ByteBuffer where tag bytes start |
abstract ByteBuffer |
getValueByteBuffer()
Returns The
ByteBuffer containing the value bytes. |
abstract int |
getValuePosition()
Returns Position in the
ByteBuffer where value bytes start |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
deepClone, getChunkId, getSequenceId, getSerializedSize, getSerializedSize, getTagsArray, getTagsLength, getTagsOffset, getTypeByte, setSequenceId, setTimestamp, setTimestamp, write, write
checkForTagsLength, cloneTags, createCell, getTag, getTags
getFamilyArray, getFamilyLength, getFamilyOffset, getQualifierArray, getQualifierLength, getQualifierOffset, getRowArray, getRowLength, getRowOffset, getTimestamp, getType, getValueArray, getValueLength, getValueOffset
public ByteBufferExtendedCell()
public abstract ByteBuffer getRowByteBuffer()
ByteBuffer
containing the row bytes.public abstract int getRowPosition()
ByteBuffer
where row bytes startpublic abstract ByteBuffer getFamilyByteBuffer()
ByteBuffer
containing the column family bytes.public abstract int getFamilyPosition()
ByteBuffer
where column family bytes startpublic abstract ByteBuffer getQualifierByteBuffer()
ByteBuffer
containing the column qualifier bytes.public abstract int getQualifierPosition()
ByteBuffer
where column qualifier bytes startpublic abstract ByteBuffer getValueByteBuffer()
ByteBuffer
containing the value bytes.public abstract int getValuePosition()
ByteBuffer
where value bytes startpublic abstract ByteBuffer getTagsByteBuffer()
ByteBuffer
containing the tag bytes.public abstract int getTagsPosition()
ByteBuffer
where tag bytes startCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.