org.apache.hadoop.hbase.io
Class BatchOperation

java.lang.Object
  extended by org.apache.hadoop.hbase.io.BatchOperation
All Implemented Interfaces:
Writable

public class BatchOperation
extends Object
implements Writable

Batch update operations such as put, delete, and deleteAll.


Nested Class Summary
static class BatchOperation.Operation
          Operation types.
 
Constructor Summary
BatchOperation()
          default constructor used by Writable
BatchOperation(BatchOperation.Operation operation, Text column, byte[] value)
          Creates a put operation
BatchOperation(Text column)
          Creates a DELETE operation
BatchOperation(Text column, byte[] value)
          Creates a PUT operation
 
Method Summary
 Text getColumn()
           
 BatchOperation.Operation getOp()
           
 byte[] getValue()
           
 void readFields(DataInput in)
          Deserialize the fields of this object from in.
 void write(DataOutput out)
          Serialize the fields of this object to out.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BatchOperation

public BatchOperation()
default constructor used by Writable


BatchOperation

public BatchOperation(Text column)
Creates a DELETE operation

Parameters:
column - column name

BatchOperation

public BatchOperation(Text column,
                      byte[] value)
Creates a PUT operation

Parameters:
column - column name
value - column value

BatchOperation

public BatchOperation(BatchOperation.Operation operation,
                      Text column,
                      byte[] value)
Creates a put operation

Parameters:
column - column name
value - column value
Method Detail

getColumn

public Text getColumn()
Returns:
the column

getOp

public BatchOperation.Operation getOp()
Returns:
the operation

getValue

public byte[] getValue()
Returns:
the value

readFields

public void readFields(DataInput in)
                throws IOException
Deserialize the fields of this object from in.

For efficiency, implementations should attempt to re-use storage in the existing object where possible.

Specified by:
readFields in interface Writable
Parameters:
in - DataInput to deseriablize this object from.
Throws:
IOException

write

public void write(DataOutput out)
           throws IOException
Serialize the fields of this object to out.

Specified by:
write in interface Writable
Parameters:
out - DataOuput to serialize this object into.
Throws:
IOException


Copyright © 2006 The Apache Software Foundation