QxOrm  1.4.5
C++ Object Relational Mapping library

qx::service::QxThreadPool : thread-safe thread pool to manage list of threads for executing all transactions of QxService module More...

#include <QxThreadPool.h>

List of all members.

Signals

void error (const QString &err, qx::service::QxTransaction_ptr transaction)
void transactionStarted (qx::service::QxTransaction_ptr transaction)
void transactionFinished (qx::service::QxTransaction_ptr transaction)
void serverIsRunning (bool bIsRunning, qx::service::QxServer *pServer)

Public Member Functions

 QxThreadPool ()
virtual ~QxThreadPool ()
QxThreadgetAvailable ()
void setAvailable (QxThread *p)
void raiseError (const QString &err, QxTransaction_ptr transaction)
void sleepThread (unsigned long msecs)

Protected Member Functions

virtual void run ()
void runServer ()
void initServices ()
void clearServices ()

Protected Attributes

QList< QxThread * > m_lstAllServices
 List of all services created by 'QxThreadPool'.
QQueue< QxThread * > m_lstAvailable
 List of services available to execute process.
bool m_bIsRunning
 Flag to indicate if thread is running.
QMutex m_mutex
 Mutex => 'QxThreadPool' is thread-safe.

Detailed Description

qx::service::QxThreadPool : thread-safe thread pool to manage list of threads for executing all transactions of QxService module

Click here to access to a tutorial to explain how to work with QxService module.

Definition at line 73 of file QxThreadPool.h.


Constructor & Destructor Documentation

qx::service::QxThreadPool::QxThreadPool ( ) [inline]

Definition at line 87 of file QxThreadPool.h.

virtual qx::service::QxThreadPool::~QxThreadPool ( ) [inline, virtual]

Definition at line 88 of file QxThreadPool.h.


Member Function Documentation

void qx::service::QxThreadPool::clearServices ( ) [protected]
void qx::service::QxThreadPool::error ( const QString &  err,
qx::service::QxTransaction_ptr  transaction 
) [signal]
QxThread* qx::service::QxThreadPool::getAvailable ( )
void qx::service::QxThreadPool::initServices ( ) [protected]
void qx::service::QxThreadPool::raiseError ( const QString &  err,
QxTransaction_ptr  transaction 
)
virtual void qx::service::QxThreadPool::run ( ) [protected, virtual]
void qx::service::QxThreadPool::runServer ( ) [protected]
void qx::service::QxThreadPool::serverIsRunning ( bool  bIsRunning,
qx::service::QxServer pServer 
) [signal]
void qx::service::QxThreadPool::setAvailable ( QxThread p)
void qx::service::QxThreadPool::sleepThread ( unsigned long  msecs) [inline]

Definition at line 94 of file QxThreadPool.h.

void qx::service::QxThreadPool::transactionFinished ( qx::service::QxTransaction_ptr  transaction) [signal]
void qx::service::QxThreadPool::transactionStarted ( qx::service::QxTransaction_ptr  transaction) [signal]

Member Data Documentation

Flag to indicate if thread is running.

Definition at line 82 of file QxThreadPool.h.

List of all services created by 'QxThreadPool'.

Definition at line 80 of file QxThreadPool.h.

List of services available to execute process.

Definition at line 81 of file QxThreadPool.h.

Mutex => 'QxThreadPool' is thread-safe.

Definition at line 83 of file QxThreadPool.h.


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