MongoDB  2.7.0
Classes | Public Member Functions | Static Public Attributes | List of all members
mongo::PoolForHost Class Reference

not thread safe thread safety is handled by DBConnectionPool More...

#include <connpool.h>

Public Member Functions

 PoolForHost (const PoolForHost &other)
 
int getMaxPoolSize ()
 Returns the maximum number of connections stored in the pool.
 
void setMaxPoolSize (int maxPoolSize)
 Sets the maximum number of connections stored in the pool.
 
int numAvailable () const
 
void createdOne (DBClientBase *base)
 
long long numCreated () const
 
ConnectionString::ConnectionType type () const
 
DBClientBaseget (DBConnectionPool *pool, double socketTimeout)
 gets a connection or return NULL
 
void clear ()
 
void done (DBConnectionPool *pool, DBClientBase *c)
 
void flush ()
 
void getStaleConnections (vector< DBClientBase * > &stale)
 
void reportBadConnectionAt (uint64_t microSec)
 Sets the lower bound for creation times that can be considered as good connections.
 
bool isBadSocketCreationTime (uint64_t microSec)
 
void initializeHostName (const std::string &hostName)
 Sets the host name to a new one, only if it is currently empty.
 

Static Public Attributes

static const int kPoolSizeUnlimited
 

Detailed Description

not thread safe thread safety is handled by DBConnectionPool

Member Function Documentation

bool mongo::PoolForHost::isBadSocketCreationTime ( uint64_t  microSec)
Returns
true if the given creation time is considered to be not good for use.

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