@InterfaceAudience.Private public class CellModel extends Object implements ProtobufMessageHandler, Serializable
<complexType name="Cell"> <sequence> <element name="value" maxOccurs="1" minOccurs="1"> <simpleType> <restriction base="base64Binary"/> </simpleType> </element> </sequence> <attribute name="column" type="base64Binary" /> <attribute name="timestamp" type="int" /> </complexType>
Modifier and Type | Field and Description |
---|---|
private byte[] |
column |
private static long |
serialVersionUID |
private long |
timestamp |
private byte[] |
value |
Constructor and Description |
---|
CellModel()
Default constructor
|
CellModel(byte[] column,
byte[] value)
Constructor nn
|
CellModel(byte[] column,
byte[] qualifier,
byte[] value)
Constructor nnn
|
CellModel(byte[] column,
byte[] qualifier,
long timestamp,
byte[] value)
Constructor nnnn
|
CellModel(byte[] column,
long timestamp,
byte[] value)
Constructor nnn
|
CellModel(Cell cell)
Constructor from KeyValue n
|
Modifier and Type | Method and Description |
---|---|
byte[] |
createProtobufOutput()
Returns the protobuf represention of the model
|
boolean |
equals(Object obj) |
byte[] |
getColumn()
Returns the column
|
ProtobufMessageHandler |
getObjectFromMessage(byte[] message)
Initialize the model from a protobuf representation.
|
long |
getTimestamp()
Returns the timestamp
|
byte[] |
getValue()
Returns the value
|
int |
hashCode() |
boolean |
hasUserTimestamp()
Returns true if the timestamp property has been specified by the user
|
void |
setColumn(byte[] column) |
void |
setTimestamp(long timestamp) |
void |
setValue(byte[] value) |
String |
toString() |
private static final long serialVersionUID
private byte[] column
private long timestamp
private byte[] value
public CellModel()
public CellModel(byte[] column, byte[] value)
public CellModel(byte[] column, byte[] qualifier, byte[] value)
public CellModel(byte[] column, long timestamp, byte[] value)
public CellModel(byte[] column, byte[] qualifier, long timestamp, byte[] value)
public byte[] getColumn()
public void setColumn(byte[] column)
column
- the column to setpublic boolean hasUserTimestamp()
public long getTimestamp()
public void setTimestamp(long timestamp)
timestamp
- the timestamp to setpublic byte[] getValue()
public void setValue(byte[] value)
value
- the value to setpublic byte[] createProtobufOutput()
ProtobufMessageHandler
createProtobufOutput
in interface ProtobufMessageHandler
public ProtobufMessageHandler getObjectFromMessage(byte[] message) throws IOException
ProtobufMessageHandler
getObjectFromMessage
in interface ProtobufMessageHandler
message
- the raw bytes of the protobuf messageIOException
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.