28 #if !defined(MYSQLPP_CPOOL_H)    29 #define MYSQLPP_CPOOL_H    40 #if !defined(DOXYGEN_IGNORE)    42 class MYSQLPP_EXPORT Connection;
    81         bool empty()
 const { 
return pool_.empty(); }
   176         void clear(
bool all = 
true);
   207         virtual unsigned int max_idle_time() = 0;
   210         size_t size()
 const { 
return pool_.size(); }
   214         struct ConnectionInfo {
   231                 bool operator<(
const ConnectionInfo& rhs)
 const   233                         const ConnectionInfo& lhs = *
this;
   234                         return lhs.in_use == rhs.in_use ?
   235                                         lhs.last_used < rhs.last_used :
   239         typedef std::list<ConnectionInfo> PoolT;
   240         typedef PoolT::iterator PoolIt;
   243         Connection* find_mru();
   244         void remove(
const PoolIt& it);
   245         void remove_old_connections();
   249         BeecryptMutex mutex_;
   254 #endif // !defined(MYSQLPP_CPOOL_H) Definition: autoflag.h:31
Manages the connection to the database server. 
Definition: connection.h:59
Manages a pool of connections for programs that need more than one Connection object at a time...
Definition: cpool.h:68
size_t size() const
Returns the current size of the internal connection pool. 
Definition: cpool.h:210
bool empty() const
Returns true if pool is empty. 
Definition: cpool.h:81
MUTually EXclusive lock class. 
ConnectionPool()
Create empty pool. 
Definition: cpool.h:72
void shrink()
Remove all unused connections from the pool. 
Definition: cpool.h:165
virtual ~ConnectionPool()
Destroy object. 
Definition: cpool.h:78