Class Cell
- java.lang.Object
-
- com.palantir.atlasdb.keyvalue.api.Cell
-
- All Implemented Interfaces:
Measurable
,Serializable
,Comparable<Cell>
public final class Cell extends Object implements Serializable, Comparable<Cell>, Measurable
Represents a cell in the key-value store. A cell consists of a non-empty row and column name that each individually have length at mostMAX_NAME_LENGTH
.- See Also:
Value
,Bytes
, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static Comparator<Cell>
COLUMN_COMPARATOR
static int
MAX_NAME_LENGTH
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(Cell other)
static Cell
create(byte[] rowName, byte[] columnName)
Creates a key.boolean
equals(Object obj)
byte[]
getColumnName()
The name of the column within the row.byte[]
getRowName()
The name of the row within the table.int
hashCode()
static boolean
isNameValid(byte[] name)
long
sizeInBytes()
String
toString()
-
-
-
Field Detail
-
MAX_NAME_LENGTH
public static final int MAX_NAME_LENGTH
- See Also:
- Constant Field Values
-
COLUMN_COMPARATOR
public static final Comparator<Cell> COLUMN_COMPARATOR
-
-
Method Detail
-
create
public static Cell create(byte[] rowName, byte[] columnName)
Creates a key. Do not modify the rowName or the columnName arrays after passing them. This doesn't make a copy for performance reasons.
-
isNameValid
public static boolean isNameValid(byte[] name)
-
getRowName
@Nonnull public byte[] getRowName()
The name of the row within the table.
-
getColumnName
@Nonnull public byte[] getColumnName()
The name of the column within the row.
-
sizeInBytes
public long sizeInBytes()
- Specified by:
sizeInBytes
in interfaceMeasurable
-
compareTo
public int compareTo(Cell other)
- Specified by:
compareTo
in interfaceComparable<Cell>
-
-