A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/dbapi__pool__balancer_8cpp_source.html below:

NCBI C++ ToolKit: src/dbapi/driver/dbapi_pool_balancer.cpp Source File

44 #define NCBI_USE_ERRCODE_X Dbapi_PoolBalancer 57  if

(

key

==

"do_not_connect"

) {

86  const string

& pool_name,

89

:

CPoolBalancer

(service_info.GetServiceName(), service_info.GetOptions(),

90

x_GetFlags(driver_ctx, is_pooled)),

91

m_ServiceInfo(&service_info), m_PoolName(pool_name),

92

m_DriverCtx(driver_ctx)

102  if

(driver_ctx !=

nullptr 118  if

(ctx_impl ==

NULL

) {

121  "Called with non-standard IDriverContext"

);

136  auto

params =

static_cast<const CDBConnParams

*

>

(params_in);

142  if

(server.Empty()) {

151  return

it->second.get();

161  if

(

conn

==

nullptr

) {

172  auto

params =

static_cast<const CDBConnParams

*

>

(params_in);

174  string

pool_name = params->GetParam(

"pool_name"

);

181  auto

params =

static_cast<const CDBConnParams

*

>

(params_in);

183  string

pool_max_str = params->GetParam(

"pool_maxsize"

);

184  unsigned int

pool_max = 0u;

185  if

( !pool_max_str.empty() && pool_max_str !=

"default"

) {

195  auto

params =

static_cast<const CDBConnParams

*

>

(params_in);

198  if

(

conn

==

nullptr

) {

202  _TRACE

(

"Proceeding to request turnover"

);

203  string

server_name =

conn

->ServerName();

204  bool

was_reusable =

conn

->IsReusable();

211

(server_name, params->GetParam(

"pool_name"

), 1u);

CDBConnParams_DNC(const CDBConnParams &other)

string GetParam(const string &key) const

Parameters, which are not listed above explicitly, should be retrieved via SetParam() method.

Uint2 GetPort(void) const

const string & GetName(void) const

Uint4 GetHost(void) const

Uint4 Host(void) const override

CDB_FakeConnection(TSvrRef server)

const string & ServerName(void) const override

Uint2 Port(void) const override

void x_InitFromCounts(const TCounts &counts)

bool x_NoPooling(void) const

static CDB_Connection * CtxMakeConnection(I_DriverContext &ctx, const CDBConnParams &params)

Helper method to provide access to a protected method in I_DriverContext for child classses.

void GetCountsForPool(const string &pool_name, TCounts *counts) const

void GetCountsForService(const string &service, TCounts *counts) const

const_iterator end() const

const_iterator lower_bound(const key_type &key) const

Help distribute connections within a pool across servers.

static CS_CONNECTION * conn

static TFlags x_GetFlags(I_DriverContext *driver_ctx, bool is_pooled)

CFastMutex m_FakeConnLock

TFakeConnections m_FakeConnections

I_DriverContext * m_DriverCtx

void x_Discard(const void *params, IBalanceable *conn) override

virtual TSvrRef GetMappedServer(void)=0

virtual const string & GetServiceName(void) const =0

CRef< IDBServiceInfo > m_ServiceInfo

unsigned int x_GetCount(const void *params, const string &name) override

IBalanceable * x_TryPool(const void *params) override

unsigned int x_GetPoolMax(const void *params) override

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

void x_ReinitFromCounts(void)

virtual string GetParam(const string &key) const

Parameters, which are not listed above explicitly, should be retrieved via SetParam() method.

virtual string GetDriverName(void) const

virtual void CloseUnusedConnections(const string &srv_name=kEmptyStr, const string &pool_name=kEmptyStr, unsigned int max_closings=kMax_UInt)=0

Close reusable deleted connections for specified server and/or pool.

virtual unsigned int NofConnections(const string &srv_name="", const string &pool_name="") const =0

Return number of currently open connections in this context.

#define ERR_POST_X(err_subcode, message)

Error posting with default error code and given error subcode.

void Warning(CExceptionArgs_Base &args)

bool NotEmpty(void) const THROWS_NONE

Check if CRef is not empty – pointing to an object and has a non-null value.

uint32_t Uint4

4-byte (32-bit) unsigned integer

uint16_t Uint2

2-byte (16-bit) unsigned integer

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

static TNumeric StringToNumeric(const CTempString str, TStringToNumFlags flags=0, int base=10)

Convert string to a numeric value.

static bool StartsWith(const CTempString str, const CTempString start, ECase use_case=eCase)

Check if a string starts with a specified prefix value.

@ fConvErr_NoThrow

Do not throw an exception on error.

Definition of all error codes used in dbapi libraries (dbapi_driver.lib and others).

const struct ncbi::grid::netcache::search::fields::KEY key


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4