org.apache.hbase.cell
Interface CellOutputStream


@InterfaceAudience.Private
@InterfaceStability.Evolving
public interface CellOutputStream

Accepts a stream of Cells and adds them to its internal data structure. This can be used to build a block of cells during compactions and flushes, or to build a byte[] to send to the client. This could be backed by a List, but more efficient implementations will append results to a byte[] to eliminate overhead, and possibly encode the cells further.


Method Summary
 void flush()
          Let the implementation decide what to do.
 void write(Cell cell)
          Implementation must copy the entire state of the Cell.
 

Method Detail

write

void write(Cell cell)
Implementation must copy the entire state of the Cell. If the appended Cell is modified immediately after the append method returns, the modifications must have absolutely no effect on the copy of the Cell that was added to the appender. For example, calling someList.add(cell) is not correct.


flush

void flush()
Let the implementation decide what to do. Usually means writing accumulated data into a byte[] that can then be read from the implementation to be sent to disk, put in the block cache, or sent over the network.



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