0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
Hypertable::CellListScannerBuffer Class Reference

Cell list scanner over a buffer of cells. More...

#include <CellListScannerBuffer.h>

Inheritance diagram for Hypertable::CellListScannerBuffer:
Inheritance graph
[legend]
Collaboration diagram for Hypertable::CellListScannerBuffer:
Collaboration graph
[legend]

Classes

struct  LtKeyValueT
 STL Strict Weak Ordering for KeyValueT. More...
 

Public Member Functions

 CellListScannerBuffer (ScanContextPtr &scan_ctx)
 Constructor. More...
 
virtual ~CellListScannerBuffer ()
 Destructor. More...
 
void add (const SerializedKey key, const ByteString value)
 Adds a key/value pair to the buffer. More...
 
virtual void forward ()
 
virtual bool get (Key &key, ByteString &value)
 
virtual int64_t get_disk_read ()
 
- Public Member Functions inherited from Hypertable::CellListScanner
 CellListScanner ()
 
 CellListScanner (ScanContext *scan_ctx)
 
virtual ~CellListScanner ()
 
ScanContextscan_context ()
 
void add_disk_read (int64_t amount)
 

Private Types

typedef std::pair
< SerializedKey, ByteString
KeyValueT
 Key/value type. More...
 
typedef StlAllocator< KeyValueTKeyValueAllocT
 STL allocator for KeyValueT structure. More...
 
typedef std::vector< KeyValueT,
KeyValueAllocT
KeyValueVectorT
 Vector of KeyValueT with allocator. More...
 

Private Member Functions

void initialize_for_scan ()
 Sorts cells in preparation for scan. More...
 

Private Attributes

ScanContextPtr m_scan_context
 Scan context. More...
 
KeyValueVectorT m_cells
 Buffer (array) of cells to be returned. More...
 
KeyValueVectorT::iterator m_iter
 Iterator pointing to next cell in m_cells to be returned. More...
 
ByteArena m_arena
 Memory arena to hold serialized keys and values. More...
 
bool m_initialized_for_scan {}
 Flag indicating if initialize_for_scan has been called. More...
 

Additional Inherited Members

- Protected Attributes inherited from Hypertable::CellListScanner
uint64_t m_disk_read {}
 
ScanContextm_scan_context_ptr {}
 

Detailed Description

Cell list scanner over a buffer of cells.

This concrete class if for situations where a list of cells with no backing store (CellCache, CellStore, etc.), needs to be returned via the CellListScanner interface. An example use case is pseudo-table scanners.

Definition at line 48 of file CellListScannerBuffer.h.

Member Typedef Documentation

STL allocator for KeyValueT structure.

Definition at line 79 of file CellListScannerBuffer.h.

Key/value type.

Definition at line 76 of file CellListScannerBuffer.h.

Vector of KeyValueT with allocator.

Definition at line 82 of file CellListScannerBuffer.h.

Constructor & Destructor Documentation

CellListScannerBuffer::CellListScannerBuffer ( ScanContextPtr scan_ctx)

Constructor.

Parameters
scan_ctxReference to scan context

Definition at line 39 of file CellListScannerBuffer.cc.

virtual Hypertable::CellListScannerBuffer::~CellListScannerBuffer ( )
inlinevirtual

Destructor.

Definition at line 57 of file CellListScannerBuffer.h.

Member Function Documentation

void CellListScannerBuffer::add ( const SerializedKey  key,
const ByteString  value 
)

Adds a key/value pair to the buffer.

Parameters
keySerialized key
valueByteString pointer to value

Definition at line 43 of file CellListScannerBuffer.cc.

void CellListScannerBuffer::forward ( )
virtual

Implements Hypertable::CellListScanner.

Definition at line 61 of file CellListScannerBuffer.cc.

bool CellListScannerBuffer::get ( Key key,
ByteString value 
)
virtual

Implements Hypertable::CellListScanner.

Definition at line 68 of file CellListScannerBuffer.cc.

virtual int64_t Hypertable::CellListScannerBuffer::get_disk_read ( )
inlinevirtual

Implements Hypertable::CellListScanner.

Definition at line 68 of file CellListScannerBuffer.h.

void CellListScannerBuffer::initialize_for_scan ( )
private

Sorts cells in preparation for scan.

Definition at line 82 of file CellListScannerBuffer.cc.

Member Data Documentation

ByteArena Hypertable::CellListScannerBuffer::m_arena
private

Memory arena to hold serialized keys and values.

Definition at line 101 of file CellListScannerBuffer.h.

KeyValueVectorT Hypertable::CellListScannerBuffer::m_cells
private

Buffer (array) of cells to be returned.

Definition at line 95 of file CellListScannerBuffer.h.

bool Hypertable::CellListScannerBuffer::m_initialized_for_scan {}
private

Flag indicating if initialize_for_scan has been called.

Definition at line 104 of file CellListScannerBuffer.h.

KeyValueVectorT::iterator Hypertable::CellListScannerBuffer::m_iter
private

Iterator pointing to next cell in m_cells to be returned.

Definition at line 98 of file CellListScannerBuffer.h.

ScanContextPtr Hypertable::CellListScannerBuffer::m_scan_context
private

Scan context.

Definition at line 92 of file CellListScannerBuffer.h.


The documentation for this class was generated from the following files: