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::TableMutatorQueue Class Reference

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

#include <TableMutatorQueue.h>

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

Public Member Functions

 TableMutatorQueue (std::mutex &mutex, std::condition_variable &cond)
 
 ~TableMutatorQueue ()
 
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 wait_for_buffer (std::unique_lock< std::mutex > &lock, ApplicationHandler **app_handlerp)
 

Private Types

typedef std::list
< ApplicationHandler * > 
WorkQueue
 

Private Attributes

std::mutex & m_mutex
 
std::condition_variable & m_cond
 
WorkQueue m_work_queue
 

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 42 of file TableMutatorQueue.h.

Member Typedef Documentation

Definition at line 74 of file TableMutatorQueue.h.

Constructor & Destructor Documentation

Hypertable::TableMutatorQueue::TableMutatorQueue ( std::mutex &  mutex,
std::condition_variable &  cond 
)
inline

Definition at line 49 of file TableMutatorQueue.h.

Hypertable::TableMutatorQueue::~TableMutatorQueue ( )
inline

Definition at line 51 of file TableMutatorQueue.h.

Member Function Documentation

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

Adds an application handler to queue.

Implements Hypertable::ApplicationQueueInterface.

Definition at line 55 of file TableMutatorQueue.h.

virtual void Hypertable::TableMutatorQueue::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 60 of file TableMutatorQueue.h.

void Hypertable::TableMutatorQueue::wait_for_buffer ( std::unique_lock< std::mutex > &  lock,
ApplicationHandler **  app_handlerp 
)
inline

Definition at line 65 of file TableMutatorQueue.h.

Member Data Documentation

std::condition_variable& Hypertable::TableMutatorQueue::m_cond
private

Definition at line 76 of file TableMutatorQueue.h.

std::mutex& Hypertable::TableMutatorQueue::m_mutex
private

Definition at line 75 of file TableMutatorQueue.h.

WorkQueue Hypertable::TableMutatorQueue::m_work_queue
private

Definition at line 77 of file TableMutatorQueue.h.


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