org.apache.hadoop.hbase.thrift2.generated
Class TPut

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

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

Used to perform Put operations for a single row. Add column values to this object and they'll be added. You can provide a default timestamp if the column values don't have one. If you don't provide a default timestamp the current time is inserted. You can also specify if this Put should be written to the write-ahead Log (WAL) or not. It defaults to true.

See Also:
Serialized Form

Nested Class Summary
static class TPut._Fields
          The set of fields this struct contains, along with convenience methods for finding and manipulating them.
 
Field Summary
 Map<ByteBuffer,ByteBuffer> attributes
           
 List<TColumnValue> columnValues
           
 TDurability durability
           
static Map<TPut._Fields,org.apache.thrift.meta_data.FieldMetaData> metaDataMap
           
 ByteBuffer row
           
 long timestamp
           
 boolean writeToWal
           
 
Constructor Summary
TPut()
           
TPut(ByteBuffer row, List<TColumnValue> columnValues)
           
TPut(TPut other)
          Performs a deep copy on other.
 
Method Summary
 void addToColumnValues(TColumnValue elem)
           
 ByteBuffer bufferForRow()
           
 void clear()
           
 int compareTo(TPut other)
           
 TPut deepCopy()
           
 boolean equals(Object that)
           
 boolean equals(TPut that)
           
 TPut._Fields fieldForId(int fieldId)
           
 Map<ByteBuffer,ByteBuffer> getAttributes()
           
 int getAttributesSize()
           
 List<TColumnValue> getColumnValues()
           
 Iterator<TColumnValue> getColumnValuesIterator()
           
 int getColumnValuesSize()
           
 TDurability getDurability()
           
 Object getFieldValue(TPut._Fields field)
           
 byte[] getRow()
           
 long getTimestamp()
           
 int hashCode()
           
 boolean isSet(TPut._Fields field)
          Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise
 boolean isSetAttributes()
          Returns true if field attributes is set (has been assigned a value) and false otherwise
 boolean isSetColumnValues()
          Returns true if field columnValues is set (has been assigned a value) and false otherwise
 boolean isSetDurability()
          Returns true if field durability is set (has been assigned a value) and false otherwise
 boolean isSetRow()
          Returns true if field row 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 isSetWriteToWal()
          Returns true if field writeToWal is set (has been assigned a value) and false otherwise
 boolean isWriteToWal()
           
 void putToAttributes(ByteBuffer key, ByteBuffer val)
           
 void read(org.apache.thrift.protocol.TProtocol iprot)
           
 TPut setAttributes(Map<ByteBuffer,ByteBuffer> attributes)
           
 void setAttributesIsSet(boolean value)
           
 TPut setColumnValues(List<TColumnValue> columnValues)
           
 void setColumnValuesIsSet(boolean value)
           
 TPut setDurability(TDurability durability)
           
 void setDurabilityIsSet(boolean value)
           
 void setFieldValue(TPut._Fields field, Object value)
           
 TPut setRow(byte[] row)
           
 TPut setRow(ByteBuffer row)
           
 void setRowIsSet(boolean value)
           
 TPut setTimestamp(long timestamp)
           
 void setTimestampIsSet(boolean value)
           
 TPut setWriteToWal(boolean writeToWal)
           
 void setWriteToWalIsSet(boolean value)
           
 String toString()
           
 void unsetAttributes()
           
 void unsetColumnValues()
           
 void unsetDurability()
           
 void unsetRow()
           
 void unsetTimestamp()
           
 void unsetWriteToWal()
           
 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

row

public ByteBuffer row

columnValues

public List<TColumnValue> columnValues

timestamp

public long timestamp

writeToWal

public boolean writeToWal

attributes

public Map<ByteBuffer,ByteBuffer> attributes

durability

public TDurability durability
See Also:
TDurability

metaDataMap

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

TPut

public TPut()

TPut

public TPut(ByteBuffer row,
            List<TColumnValue> columnValues)

TPut

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

Method Detail

deepCopy

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

clear

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

getRow

public byte[] getRow()

bufferForRow

public ByteBuffer bufferForRow()

setRow

public TPut setRow(byte[] row)

setRow

public TPut setRow(ByteBuffer row)

unsetRow

public void unsetRow()

isSetRow

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


setRowIsSet

public void setRowIsSet(boolean value)

getColumnValuesSize

public int getColumnValuesSize()

getColumnValuesIterator

public Iterator<TColumnValue> getColumnValuesIterator()

addToColumnValues

public void addToColumnValues(TColumnValue elem)

getColumnValues

public List<TColumnValue> getColumnValues()

setColumnValues

public TPut setColumnValues(List<TColumnValue> columnValues)

unsetColumnValues

public void unsetColumnValues()

isSetColumnValues

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


setColumnValuesIsSet

public void setColumnValuesIsSet(boolean value)

getTimestamp

public long getTimestamp()

setTimestamp

public TPut 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)

isWriteToWal

public boolean isWriteToWal()

setWriteToWal

public TPut setWriteToWal(boolean writeToWal)

unsetWriteToWal

public void unsetWriteToWal()

isSetWriteToWal

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


setWriteToWalIsSet

public void setWriteToWalIsSet(boolean value)

getAttributesSize

public int getAttributesSize()

putToAttributes

public void putToAttributes(ByteBuffer key,
                            ByteBuffer val)

getAttributes

public Map<ByteBuffer,ByteBuffer> getAttributes()

setAttributes

public TPut setAttributes(Map<ByteBuffer,ByteBuffer> attributes)

unsetAttributes

public void unsetAttributes()

isSetAttributes

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


setAttributesIsSet

public void setAttributesIsSet(boolean value)

getDurability

public TDurability getDurability()
See Also:
TDurability

setDurability

public TPut setDurability(TDurability durability)
See Also:
TDurability

unsetDurability

public void unsetDurability()

isSetDurability

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


setDurabilityIsSet

public void setDurabilityIsSet(boolean value)

setFieldValue

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

getFieldValue

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

isSet

public boolean isSet(TPut._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<TPut,TPut._Fields>

equals

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

equals

public boolean equals(TPut that)

hashCode

public int hashCode()
Overrides:
hashCode in class Object

compareTo

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

fieldForId

public TPut._Fields fieldForId(int fieldId)
Specified by:
fieldForId in interface org.apache.thrift.TBase<TPut,TPut._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<TPut,TPut._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<TPut,TPut._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 © 2013 The Apache Software Foundation. All Rights Reserved.