.../org/apache/hadoop/hbase/BufferBackedCell.java | 70 ++++++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/BufferBackedCell.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/BufferBackedCell.java new file mode 100644 index 0000000..f46dcb6 --- /dev/null +++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/BufferBackedCell.java @@ -0,0 +1,70 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.hadoop.hbase; + +import java.nio.ByteBuffer; + +import org.apache.hadoop.hbase.classification.InterfaceAudience; +/** + * An extension of the {@link Cell} interface that provides API + * to access the parts of the cell (row, family, qualifier, value, tags) + * as ByteBuffer. Used in the read path on the server side. + */ +@InterfaceAudience.Private +public interface BufferBackedCell extends Cell { + + /** + * ByteBuffer containing the row bytes. + * Max length is Short.MAX_VALUE which is 32,767 bytes. + * + * @return The ByteBuffer containing the row bytes. + */ + ByteBuffer getRowBuffer(); + + /** + * ByteBuffer containing the family bytes. + * Max length is Byte.MAX_VALUE which is 127 bytes. + * + * @return the ByteBuffer containing the family bytes. + */ + ByteBuffer getFamilyBuffer(); + + /** + * ByteBuffer containing the qualifier bytes. + * Max length is Short.MAX_VALUE which is 32,767 bytes. + * + * @return The ByteBuffer containing the qualifier bytes. + */ + ByteBuffer getQualifierBuffer(); + + /** + * ByteBuffer containing the value bytes. + * Max length is Integer.MAX_VALUE which is 2,147,483,648 bytes. + * + * @return The ByteBuffer containing the value bytes. + */ + ByteBuffer getValueBuffer(); + + /** + * ByteBuffer containing the tag bytes. + * Max length is Integer.MAX_VALUE which is 2,147,483,648 bytes. + * + * @return The ByteBuffer containing the tag bytes. + */ + ByteBuffer getTagsBuffer(); +}