2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
18 package org
.apache
.hadoop
.hbase
;
20 import java
.util
.List
;
22 import org
.apache
.yetus
.audience
.InterfaceAudience
;
25 * For internal purpose.
26 * {@link Tag} and memstoreTS/mvcc are internal implementation detail
27 * that should not be exposed publicly.
28 * Use {@link ExtendedCellBuilderFactory} to get ExtendedCellBuilder instance.
29 * TODO: ditto for ByteBufferExtendedCell?
31 @InterfaceAudience.Private
32 public interface ExtendedCellBuilder
extends RawCellBuilder
{
34 ExtendedCellBuilder
setRow(final byte[] row
);
36 ExtendedCellBuilder
setRow(final byte[] row
, final int rOffset
, final int rLength
);
39 ExtendedCellBuilder
setFamily(final byte[] family
);
41 ExtendedCellBuilder
setFamily(final byte[] family
, final int fOffset
, final int fLength
);
44 ExtendedCellBuilder
setQualifier(final byte[] qualifier
);
46 ExtendedCellBuilder
setQualifier(final byte[] qualifier
, final int qOffset
, final int qLength
);
49 ExtendedCellBuilder
setTimestamp(final long timestamp
);
52 ExtendedCellBuilder
setType(final Cell
.Type type
);
54 ExtendedCellBuilder
setType(final byte type
);
57 ExtendedCellBuilder
setValue(final byte[] value
);
59 ExtendedCellBuilder
setValue(final byte[] value
, final int vOffset
, final int vLength
);
65 ExtendedCellBuilder
clear();
67 // we have this method for performance reasons so that if one could create a cell directly from
68 // the tag byte[] of the cell without having to convert to a list of Tag(s) and again adding it
70 ExtendedCellBuilder
setTags(final byte[] tags
);
71 // we have this method for performance reasons so that if one could create a cell directly from
72 // the tag byte[] of the cell without having to convert to a list of Tag(s) and again adding it
74 ExtendedCellBuilder
setTags(final byte[] tags
, int tagsOffset
, int tagsLength
);
77 ExtendedCellBuilder
setTags(List
<Tag
> tags
);
79 * Internal usage. Be careful before you use this while building a cell
80 * @param seqId set the seqId
81 * @return the current ExternalCellBuilder
83 ExtendedCellBuilder
setSequenceId(final long seqId
);