#include <connpool.h>
Classes | |
struct | StoredConnection |
Public Member Functions | |
void | createdOne (DBClientBase *base) |
void | done (DBClientBase *c) |
void | flush () |
DBClientBase * | get () |
int | numAvailable () const |
long long | numCreated () const |
PoolForHost (const PoolForHost &other) | |
PoolForHost () | |
ConnectionString::ConnectionType | type () const |
~PoolForHost () | |
Static Public Member Functions | |
static unsigned | getMaxPerHost () |
static void | setMaxPerHost (unsigned max) |
Private Attributes | |
long long | _created |
std::stack< StoredConnection > | _pool |
ConnectionString::ConnectionType | _type |
Static Private Attributes | |
static unsigned | _maxPerHost |
not thread safe thread safety is handled by DBConnectionPool
Definition at line 31 of file connpool.h.
mongo::PoolForHost::PoolForHost | ( | ) | [inline] |
Definition at line 33 of file connpool.h.
mongo::PoolForHost::PoolForHost | ( | const PoolForHost & | other | ) | [inline] |
Definition at line 36 of file connpool.h.
mongo::PoolForHost::~PoolForHost | ( | ) |
void mongo::PoolForHost::createdOne | ( | DBClientBase * | base | ) |
void mongo::PoolForHost::done | ( | DBClientBase * | c | ) |
void mongo::PoolForHost::flush | ( | ) |
DBClientBase* mongo::PoolForHost::get | ( | ) |
gets a connection or return NULL
static unsigned mongo::PoolForHost::getMaxPerHost | ( | ) | [inline, static] |
Definition at line 61 of file connpool.h.
int mongo::PoolForHost::numAvailable | ( | ) | const [inline] |
Definition at line 44 of file connpool.h.
long long mongo::PoolForHost::numCreated | ( | ) | const [inline] |
Definition at line 47 of file connpool.h.
static void mongo::PoolForHost::setMaxPerHost | ( | unsigned | max | ) | [inline, static] |
Definition at line 60 of file connpool.h.
ConnectionString::ConnectionType mongo::PoolForHost::type | ( | ) | const [inline] |
Definition at line 49 of file connpool.h.
long long mongo::PoolForHost::_created [private] |
Definition at line 74 of file connpool.h.
unsigned mongo::PoolForHost::_maxPerHost [static, private] |
Definition at line 77 of file connpool.h.
std::stack<StoredConnection> mongo::PoolForHost::_pool [private] |
Definition at line 73 of file connpool.h.
Definition at line 75 of file connpool.h.