fastcgi++
|
Defines some functions and data types shared between ASql engines. More...
#include <asql.hpp>
Classes | |
class | Queries |
Thread safe queue of queries. More... | |
struct | QuerySet |
class | SetCanceler |
Locks the mutex on a statement and set's the canceller to the queries canceller. More... |
Public Member Functions | |
int | queriesSize () const |
Returns the number of queued queries. | |
void | start () |
Start all threads of the handler. | |
void | terminate () |
Terminate all thread of the handler. | |
void | queue (Transaction< T > &transaction, int instance) |
Queue up a transaction for completion. | |
void | queue (T *const &statement, QueryPar &query, int instance) |
int | threads () const |
Returns the number of threads. | |
bool | running () const |
Return true if the handler is running. |
Static Public Attributes | |
static const bool | s_false = false |
Protected Member Functions | |
ConnectionPar (const int maxThreads_) | |
virtual void | commit (const unsigned int thread=0)=0 |
virtual void | rollback (const unsigned int thread=0)=0 |
Protected Attributes | |
const int | maxThreads |
Number of threads to pool for simultaneous queries. | |
boost::mutex | threadsMutex |
boost::condition_variable | threadsChanged |
int | m_threads |
boost::scoped_array < boost::condition_variable > | wakeUp |
boost::mutex | terminateMutex |
bool | terminateBool |
Private Member Functions | |
void | intHandler (const unsigned int id) |
Function that runs in threads. |
Private Attributes | |
boost::scoped_array< Queries > | queries |
Defines some functions and data types shared between ASql engines.
|
inlineprotected |
|
protectedpure virtualinherited |
Implemented in ASql::MySQL::Connection.
|
private |
Function that runs in threads.
Definition at line 242 of file asql.hpp.
References ASql::QueryPar::callback(), ASql::QueryPar::clearResults(), ASql::QueryPar::getCallback(), ASql::QueryPar::isCallback(), ASql::ConnectionPar< T >::QuerySet::m_commit, ASql::ConnectionPar< T >::QuerySet::m_query, ASql::QueryPar::m_sharedData, ASql::ConnectionPar< T >::QuerySet::m_statement, ASql::QueryPar::parameters(), ASql::QueryPar::results(), and ASql::QueryPar::setCallback().
int ASql::ConnectionPar< T >::queriesSize | ( | ) | const |
void ASql::ConnectionPar< T >::queue | ( | Transaction< T > & | transaction, |
int | instance | ||
) |
Queue up a transaction for completion.
Definition at line 344 of file asql.hpp.
References ASql::Transaction< T >::begin(), and ASql::Transaction< T >::end().
Referenced by ASql::MySQL::Statement::queue().
|
inline |
|
protectedpure virtualinherited |
Implemented in ASql::MySQL::Connection.
|
inlineinherited |
Return true if the handler is running.
Definition at line 119 of file asql.hpp.
References ASql::Connection::m_threads.
void ASql::ConnectionPar< T >::start | ( | ) |
void ASql::ConnectionPar< T >::terminate | ( | ) |
|
inlineinherited |
Returns the number of threads.
Definition at line 116 of file asql.hpp.
References ASql::Connection::maxThreads.
Referenced by ASql::MySQL::Connection::connect().
|
protectedinherited |
Definition at line 127 of file asql.hpp.
Referenced by ASql::Connection::running().
|
protectedinherited |
Number of threads to pool for simultaneous queries.
Definition at line 124 of file asql.hpp.
Referenced by ASql::Connection::threads().
|
private |
|
static |
Definition at line 195 of file asql.hpp.
Referenced by ASql::ConnectionPar< T >::SetCanceler::~SetCanceler().
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |