QxOrm  1.5.1
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 customRequestHandler (qx::service::QxTransaction_ptr transaction)
void serverIsRunning (bool bIsRunning, qx::service::QxServer *pServer)

Public Member Functions

 QxThreadPool (IxConnect *pSettings=NULL)
virtual ~QxThreadPool ()
IxConnectgetSettings () const
bool isStopped () const
QxThreadgetAvailable ()
void setAvailable (QxThread *p)
void raiseError (const QString &err, QxTransaction_ptr transaction)

Static Public Member Functions

static void sleepThread (unsigned long msecs)

Protected Member Functions

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

Protected Attributes

IxConnectm_pSettings
 Connection parameters used by QxService module and QxHttpServer module.
QList< QxThread * > m_lstAllServices
 List of all services created by 'QxThreadPool'.
QQueue< QxThread * > m_lstAvailable
 List of services available to execute process.
bool m_bIsStopped
 Flag to indicate if thread has been stopped.
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 76 of file QxThreadPool.h.


Constructor & Destructor Documentation

qx::service::QxThreadPool::QxThreadPool ( IxConnect pSettings = NULL)
virtual qx::service::QxThreadPool::~QxThreadPool ( ) [virtual]

Member Function Documentation

void qx::service::QxThreadPool::clearServices ( ) [protected]
void qx::service::QxThreadPool::customRequestHandler ( qx::service::QxTransaction_ptr  transaction) [signal]
void qx::service::QxThreadPool::error ( const QString &  err,
qx::service::QxTransaction_ptr  transaction 
) [signal]
QxThread* qx::service::QxThreadPool::getAvailable ( )
IxConnect* qx::service::QxThreadPool::getSettings ( ) const
void qx::service::QxThreadPool::initServices ( ) [protected]
bool qx::service::QxThreadPool::isStopped ( ) const
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)
static void qx::service::QxThreadPool::sleepThread ( unsigned long  msecs) [inline, static]

Definition at line 100 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 has been stopped.

Definition at line 86 of file QxThreadPool.h.

List of all services created by 'QxThreadPool'.

Definition at line 84 of file QxThreadPool.h.

List of services available to execute process.

Definition at line 85 of file QxThreadPool.h.

Mutex => 'QxThreadPool' is thread-safe.

Definition at line 87 of file QxThreadPool.h.

Connection parameters used by QxService module and QxHttpServer module.

Definition at line 83 of file QxThreadPool.h.


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