org.apache.hadoop.hbase.thrift.generated
Class TCell

java.lang.Object
  extended by org.apache.hadoop.hbase.thrift.generated.TCell
All Implemented Interfaces:
Serializable, Cloneable, Comparable<TCell>, org.apache.thrift.TBase<TCell,TCell._Fields>

public class TCell
extends Object
implements org.apache.thrift.TBase<TCell,TCell._Fields>, Serializable, Cloneable

TCell - Used to transport a cell value (byte[]) and the timestamp it was stored with together as a result for get and getRow methods. This promotes the timestamp of a cell to a first-class value, making it easy to take note of temporal data. Cell is used all the way from HStore up to HTable.

See Also:
Serialized Form

Nested Class Summary
static class TCell._Fields
          The set of fields this struct contains, along with convenience methods for finding and manipulating them.
 
Field Summary
static Map<TCell._Fields,org.apache.thrift.meta_data.FieldMetaData> metaDataMap
           
 long timestamp
           
 ByteBuffer value
           
 
Constructor Summary
TCell()
           
TCell(ByteBuffer value, long timestamp)
           
TCell(TCell other)
          Performs a deep copy on other.
 
Method Summary
 ByteBuffer bufferForValue()
           
 void clear()
           
 int compareTo(TCell other)
           
 TCell deepCopy()
           
 boolean equals(Object that)
           
 boolean equals(TCell that)
           
 TCell._Fields fieldForId(int fieldId)
           
 Object getFieldValue(TCell._Fields field)
           
 long getTimestamp()
           
 byte[] getValue()
           
 int hashCode()
           
 boolean isSet(TCell._Fields field)
          Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise
 boolean isSetTimestamp()
          Returns true if field timestamp is set (has been assigned a value) and false otherwise
 boolean isSetValue()
          Returns true if field value is set (has been assigned a value) and false otherwise
 void read(org.apache.thrift.protocol.TProtocol iprot)
           
 void setFieldValue(TCell._Fields field, Object value)
           
 TCell setTimestamp(long timestamp)
           
 void setTimestampIsSet(boolean value)
           
 TCell setValue(byte[] value)
           
 TCell setValue(ByteBuffer value)
           
 void setValueIsSet(boolean value)
           
 String toString()
           
 void unsetTimestamp()
           
 void unsetValue()
           
 void validate()
           
 void write(org.apache.thrift.protocol.TProtocol oprot)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

value

public ByteBuffer value

timestamp

public long timestamp

metaDataMap

public static final Map<TCell._Fields,org.apache.thrift.meta_data.FieldMetaData> metaDataMap
Constructor Detail

TCell

public TCell()

TCell

public TCell(ByteBuffer value,
             long timestamp)

TCell

public TCell(TCell other)
Performs a deep copy on other.

Method Detail

deepCopy

public TCell deepCopy()
Specified by:
deepCopy in interface org.apache.thrift.TBase<TCell,TCell._Fields>

clear

public void clear()
Specified by:
clear in interface org.apache.thrift.TBase<TCell,TCell._Fields>

getValue

public byte[] getValue()

bufferForValue

public ByteBuffer bufferForValue()

setValue

public TCell setValue(byte[] value)

setValue

public TCell setValue(ByteBuffer value)

unsetValue

public void unsetValue()

isSetValue

public boolean isSetValue()
Returns true if field value is set (has been assigned a value) and false otherwise


setValueIsSet

public void setValueIsSet(boolean value)

getTimestamp

public long getTimestamp()

setTimestamp

public TCell setTimestamp(long timestamp)

unsetTimestamp

public void unsetTimestamp()

isSetTimestamp

public boolean isSetTimestamp()
Returns true if field timestamp is set (has been assigned a value) and false otherwise


setTimestampIsSet

public void setTimestampIsSet(boolean value)

setFieldValue

public void setFieldValue(TCell._Fields field,
                          Object value)
Specified by:
setFieldValue in interface org.apache.thrift.TBase<TCell,TCell._Fields>

getFieldValue

public Object getFieldValue(TCell._Fields field)
Specified by:
getFieldValue in interface org.apache.thrift.TBase<TCell,TCell._Fields>

isSet

public boolean isSet(TCell._Fields field)
Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise

Specified by:
isSet in interface org.apache.thrift.TBase<TCell,TCell._Fields>

equals

public boolean equals(Object that)
Overrides:
equals in class Object

equals

public boolean equals(TCell that)

hashCode

public int hashCode()
Overrides:
hashCode in class Object

compareTo

public int compareTo(TCell other)
Specified by:
compareTo in interface Comparable<TCell>

fieldForId

public TCell._Fields fieldForId(int fieldId)
Specified by:
fieldForId in interface org.apache.thrift.TBase<TCell,TCell._Fields>

read

public void read(org.apache.thrift.protocol.TProtocol iprot)
          throws org.apache.thrift.TException
Specified by:
read in interface org.apache.thrift.TBase<TCell,TCell._Fields>
Throws:
org.apache.thrift.TException

write

public void write(org.apache.thrift.protocol.TProtocol oprot)
           throws org.apache.thrift.TException
Specified by:
write in interface org.apache.thrift.TBase<TCell,TCell._Fields>
Throws:
org.apache.thrift.TException

toString

public String toString()
Overrides:
toString in class Object

validate

public void validate()
              throws org.apache.thrift.TException
Throws:
org.apache.thrift.TException


Copyright © 2015 The Apache Software Foundation. All Rights Reserved.