NCBI C++ ToolKit
Modules | Classes | Typedefs | Functions | Variables
DBAPI

Database API members. More...

+ Collaboration diagram for DBAPI:

Modules

 Database APIs
 
 Driver Manager
 
 Variant exception and data type
 
 Database Exceptions
 
 Database Server Interfaces
 
 Database Server Public Interfaces
 
 Database Types
 
 Drivers' Registration
 

Classes

class  IDBServiceInfo
 
class  CDBPoolBalancer
 

Typedefs

typedef IDBServiceMapper::TOptions IDBServiceInfo::TOptions
 
typedef SSimpleLock< IDBServiceInfoIDBServiceInfo::TLock
 
typedef SSimpleUnlock< IDBServiceInfoIDBServiceInfo::TUnlock
 
typedef CGuard< IDBServiceInfoIDBServiceInfo::TGuard
 
typedef CGuard< IDBServiceInfo, TUnlock, TLockIDBServiceInfo::TAntiGuard
 
typedef map< TSvrRef, unique_ptr< IBalanceable > > CDBPoolBalancer::TFakeConnections
 

Functions

virtual const stringIDBServiceInfo::GetServiceName (void) const =0
 
virtual const TOptionsIDBServiceInfo::GetOptions (void)=0
 
virtual TSvrRef IDBServiceInfo::GetMappedServer (void)=0
 
virtual void IDBServiceInfo::Lock (void)=0
 
virtual void IDBServiceInfo::Unlock (void)=0
 
 CDBPoolBalancer::CDBPoolBalancer (IDBServiceInfo &service_info, const string &pool_name, I_DriverContext *driver_ctx=nullptr, bool is_pooled=true)
 
TSvrRef CDBPoolBalancer::GetServer (CDB_Connection **conn, const CDBConnParams *params)
 
IBalanceableCDBPoolBalancer::x_TryPool (const void *params) override
 
unsigned int CDBPoolBalancer::x_GetCount (const void *params, const string &name) override
 
unsigned int CDBPoolBalancer::x_GetPoolMax (const void *params) override
 
void CDBPoolBalancer::x_Discard (const void *params, IBalanceable *conn) override
 
static TFlags CDBPoolBalancer::x_GetFlags (I_DriverContext *driver_ctx, bool is_pooled)
 
void CDBPoolBalancer::x_ReinitFromCounts (void)
 

Variables

CRef< IDBServiceInfoCDBPoolBalancer::m_ServiceInfo
 
string CDBPoolBalancer::m_PoolName
 
I_DriverContextCDBPoolBalancer::m_DriverCtx
 
TFakeConnections CDBPoolBalancer::m_FakeConnections
 
CFastMutex CDBPoolBalancer::m_FakeConnLock
 
bool CDBPoolBalancer::m_IsPooled
 

Detailed Description

Database API members.

Typedef Documentation

◆ TAntiGuard

Definition at line 52 of file dbapi_pool_balancer.hpp.

◆ TFakeConnections

Definition at line 79 of file dbapi_pool_balancer.hpp.

◆ TGuard

Definition at line 51 of file dbapi_pool_balancer.hpp.

◆ TLock

Definition at line 49 of file dbapi_pool_balancer.hpp.

◆ TOptions

Definition at line 48 of file dbapi_pool_balancer.hpp.

◆ TUnlock

Definition at line 50 of file dbapi_pool_balancer.hpp.

Function Documentation

◆ CDBPoolBalancer()

CDBPoolBalancer::CDBPoolBalancer ( IDBServiceInfo service_info,
const string pool_name,
I_DriverContext driver_ctx = nullptr,
bool  is_pooled = true 
)

Definition at line 85 of file dbapi_pool_balancer.cpp.

References CDBPoolBalancer::x_ReinitFromCounts().

◆ GetMappedServer()

virtual TSvrRef IDBServiceInfo::GetMappedServer ( void  )
pure virtual

◆ GetOptions()

virtual const TOptions& IDBServiceInfo::GetOptions ( void  )
pure virtual

◆ GetServer()

TSvrRef CDBPoolBalancer::GetServer ( CDB_Connection **  conn,
const CDBConnParams params 
)
inline

Definition at line 94 of file dbapi_pool_balancer.hpp.

References conn, and CPoolBalancer::x_GetServer().

◆ GetServiceName()

virtual const string& IDBServiceInfo::GetServiceName ( void  ) const
pure virtual

◆ Lock()

virtual void IDBServiceInfo::Lock ( void  )
pure virtual

◆ Unlock()

virtual void IDBServiceInfo::Unlock ( void  )
pure virtual

◆ x_Discard()

void CDBPoolBalancer::x_Discard ( const void *  params,
IBalanceable conn 
)
overrideprotectedvirtual

◆ x_GetCount()

unsigned int CDBPoolBalancer::x_GetCount ( const void *  params,
const string name 
)
overrideprotectedvirtual

Reimplemented from CPoolBalancer.

Definition at line 169 of file dbapi_pool_balancer.cpp.

References _ASSERT, CDBPoolBalancer::m_DriverCtx, and I_DriverContext::NofConnections().

◆ x_GetFlags()

CPoolBalancer::TFlags CDBPoolBalancer::x_GetFlags ( I_DriverContext driver_ctx,
bool  is_pooled 
)
staticprivate

◆ x_GetPoolMax()

unsigned int CDBPoolBalancer::x_GetPoolMax ( const void *  params)
overrideprotectedvirtual

Reimplemented from CPoolBalancer.

Definition at line 179 of file dbapi_pool_balancer.cpp.

References _ASSERT, NStr::fConvErr_NoThrow, and NStr::StringToNumeric().

◆ x_ReinitFromCounts()

void CDBPoolBalancer::x_ReinitFromCounts ( void  )
private

◆ x_TryPool()

IBalanceable * CDBPoolBalancer::x_TryPool ( const void *  params)
overrideprotectedvirtual

Variable Documentation

◆ m_DriverCtx

I_DriverContext* CDBPoolBalancer::m_DriverCtx
private

◆ m_FakeConnections

TFakeConnections CDBPoolBalancer::m_FakeConnections
private

Definition at line 87 of file dbapi_pool_balancer.hpp.

Referenced by CDBPoolBalancer::x_TryPool().

◆ m_FakeConnLock

CFastMutex CDBPoolBalancer::m_FakeConnLock
private

Definition at line 88 of file dbapi_pool_balancer.hpp.

Referenced by CDBPoolBalancer::x_TryPool().

◆ m_IsPooled

bool CDBPoolBalancer::m_IsPooled
private

Definition at line 89 of file dbapi_pool_balancer.hpp.

◆ m_PoolName

string CDBPoolBalancer::m_PoolName
private

Definition at line 85 of file dbapi_pool_balancer.hpp.

Referenced by CDBPoolBalancer::x_ReinitFromCounts().

◆ m_ServiceInfo

CRef<IDBServiceInfo> CDBPoolBalancer::m_ServiceInfo
private
Modified on Wed Jul 24 17:21:29 2024 by modify_doxy.py rev. 669887