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

Provides application work queue and worker threads. More...

#include <TableScannerQueue.h>

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

Public Member Functions

 TableScannerQueue ()
 Default constructor. More...
 
 ~TableScannerQueue ()
 
virtual void add (ApplicationHandler *app_handler)
 Adds an application handler to queue. More...
 
virtual void add_unlocked (ApplicationHandler *app_handler)
 Adds an application handler to queue without locking. More...
 
void next_result (ScanCellsPtr &cells, int *error, std::string &error_msg)
 
void add_cells (ScanCellsPtr &cells)
 
void set_error (int error, const std::string &error_msg)
 

Private Types

typedef std::list
< ApplicationHandler * > 
WorkQueue
 
typedef std::list< ScanCellsPtrCellsQueue
 

Private Attributes

std::mutex m_mutex
 
std::condition_variable m_cond
 
WorkQueue m_work_queue
 
CellsQueue m_cells_queue
 
std::string m_error_msg
 
int m_error {}
 
bool m_error_shown {}
 

Detailed Description

Provides application work queue and worker threads.

It maintains a queue of requests and a pool of threads that pull requests off the queue and carry them out.

Definition at line 40 of file TableScannerQueue.h.

Member Typedef Documentation

Definition at line 113 of file TableScannerQueue.h.

Definition at line 112 of file TableScannerQueue.h.

Constructor & Destructor Documentation

Hypertable::TableScannerQueue::TableScannerQueue ( )
inline

Default constructor.

Definition at line 46 of file TableScannerQueue.h.

Hypertable::TableScannerQueue::~TableScannerQueue ( )
inline

Definition at line 48 of file TableScannerQueue.h.

Member Function Documentation

virtual void Hypertable::TableScannerQueue::add ( ApplicationHandler app_handler)
inlinevirtual

Adds an application handler to queue.

Implements Hypertable::ApplicationQueueInterface.

Definition at line 52 of file TableScannerQueue.h.

void Hypertable::TableScannerQueue::add_cells ( ScanCellsPtr cells)
inline

Definition at line 97 of file TableScannerQueue.h.

virtual void Hypertable::TableScannerQueue::add_unlocked ( ApplicationHandler app_handler)
inlinevirtual

Adds an application handler to queue without locking.

This method is similar to add except that it does not do any locking to serialize access to the queue. It is for situations where access serialization is handled by the caller.

Implements Hypertable::ApplicationQueueInterface.

Definition at line 58 of file TableScannerQueue.h.

void Hypertable::TableScannerQueue::next_result ( ScanCellsPtr cells,
int *  error,
std::string &  error_msg 
)
inline

Definition at line 60 of file TableScannerQueue.h.

void Hypertable::TableScannerQueue::set_error ( int  error,
const std::string &  error_msg 
)
inline

Definition at line 103 of file TableScannerQueue.h.

Member Data Documentation

CellsQueue Hypertable::TableScannerQueue::m_cells_queue
private

Definition at line 117 of file TableScannerQueue.h.

std::condition_variable Hypertable::TableScannerQueue::m_cond
private

Definition at line 115 of file TableScannerQueue.h.

int Hypertable::TableScannerQueue::m_error {}
private

Definition at line 119 of file TableScannerQueue.h.

std::string Hypertable::TableScannerQueue::m_error_msg
private

Definition at line 118 of file TableScannerQueue.h.

bool Hypertable::TableScannerQueue::m_error_shown {}
private

Definition at line 120 of file TableScannerQueue.h.

std::mutex Hypertable::TableScannerQueue::m_mutex
private

Definition at line 114 of file TableScannerQueue.h.

WorkQueue Hypertable::TableScannerQueue::m_work_queue
private

Definition at line 116 of file TableScannerQueue.h.


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