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

Application queue worker thread function (functor) More...

Collaboration diagram for Hypertable::ApplicationQueue::Worker:
Collaboration graph
[legend]

Public Member Functions

 Worker (ApplicationQueueState &qstate, bool one_shot=false)
 
void operator() ()
 Thread run method. More...
 

Private Member Functions

void remove (RequestRec *rec)
 Removes and deletes a request. More...
 
void remove_expired (RequestRec *rec)
 Removes and deletes an expired request. More...
 

Private Attributes

ApplicationQueueStatem_state
 Shared application queue state object. More...
 
bool m_one_shot
 Set to true if thread should exit after executing request. More...
 

Detailed Description

Application queue worker thread function (functor)

Definition at line 163 of file ApplicationQueue.h.

Constructor & Destructor Documentation

Hypertable::ApplicationQueue::Worker::Worker ( ApplicationQueueState qstate,
bool  one_shot = false 
)
inline

Definition at line 166 of file ApplicationQueue.h.

Member Function Documentation

void Hypertable::ApplicationQueue::Worker::operator() ( )
inline

Thread run method.

Definition at line 171 of file ApplicationQueue.h.

void Hypertable::ApplicationQueue::Worker::remove ( RequestRec rec)
inlineprivate

Removes and deletes a request.

This method updates the group state associated with rec by setting the running flag to false and decrementing the outstanding count. If the outstanding count for the group drops to 0, the group state record is removed from ApplicationQueueState::group_state_map and is deleted.

Parameters
recRequest record to remove

Definition at line 272 of file ApplicationQueue.h.

void Hypertable::ApplicationQueue::Worker::remove_expired ( RequestRec rec)
inlineprivate

Removes and deletes an expired request.

This method updates the group state associated with rec by decrementing the outstanding count. If the outstanding count for the group drops to 0, the group state record is removed from ApplicationQueueState::group_state_map and is deleted.

Parameters
recRequest record to remove

Definition at line 292 of file ApplicationQueue.h.

Member Data Documentation

bool Hypertable::ApplicationQueue::Worker::m_one_shot
private

Set to true if thread should exit after executing request.

Definition at line 307 of file ApplicationQueue.h.

ApplicationQueueState& Hypertable::ApplicationQueue::Worker::m_state
private

Shared application queue state object.

Definition at line 304 of file ApplicationQueue.h.


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