GetMaxNumOfConnAttempts(
void)
const;
70 voidSetMaxNumOfConnAttempts(
unsigned intmax_num);
72 unsigned intGetMaxNumOfValidationAttempts(
void)
const;
73 voidSetMaxNumOfValidationAttempts(
unsigned intmax_num);
75 unsigned intGetMaxNumOfServerAlternatives(
void)
const;
76 voidSetMaxNumOfServerAlternatives(
unsigned intmax_num);
78 unsigned intGetMaxNumOfDispatches(
void)
const;
79 voidSetMaxNumOfDispatches(
unsigned intmax_num);
81 unsigned intGetConnectionTimeout(
void)
const;
82 voidSetConnectionTimeout(
unsigned inttimeout);
84 unsigned intGetLoginTimeout(
void)
const;
85 voidSetLoginTimeout(
unsigned inttimeout);
87 voidGetServersList(
const string& validator_name,
88 const string& service_name,
89list<string>* serv_list);
90 voidWorkWithSingleServer(
const string& validator_name,
91 const string& service_name,
92 const string& server);
100: m_Factory(factory), m_Mapper(&mapper),
101m_ServiceName(service_name), m_NumDispatches(0),
102m_NumValidationFailures(0)
106{
returnm_ServiceName; }
107 const TOptions& GetOptions(
void)
override;
111{ m_Mutex.Unlock(); }
114{ m_Options.clear(); }
116 voidSetDispatchedServer(
const TSvrRef& server);
118{
returnm_Dispatched; }
120{
returnm_Mapper->GetServer(m_ServiceName); }
123{
returnm_NumDispatches; }
125{
returnm_NumValidationFailures; }
126 voidIncNumOfValidationFailures(
const TSvrRef& dsp_srv);
129{
returnm_Mapper->GetName(); }
131{
returnm_Mapper->HasExclusions(m_ServiceName); }
132 stringGetExcluded(
void);
136m_Mapper->Exclude(m_ServiceName, server);
137 if(m_Dispatched.NotEmpty()
138&& *server == *m_Dispatched) {
139m_Dispatched.Reset();
144{ m_Mapper->CleanExcluded(m_ServiceName); }
166 return*m_DBServiceMapper;
170 return*m_DBServiceMapper;
172 CServiceInfo& GetServiceInfo(
const string& service_name);
186 CRuntimeData& GetRuntimeData(
const string& validator_name);
319 virtual stringGetName(
void)
const;
324 bool Empty(
void)
const;
338eKeepModifiedConnection = 0,
339eRestoreDefaultDB = 1,
342 enum{eDefaultValidateAttr = eRestoreDefaultDB | eCheckSysobjects};
345 intattr = eDefaultValidateAttr);
349 virtual stringGetName(
void)
const;
371 const string& srv_name,
vector< CRef< IConnValidator > > TValidators
const IRegistry * m_Registry
EDefaultMapping m_DefMapping
const IDBServiceMapper::TFactory m_SvcMapperFactory
const CDBConnectionFactory * m_Parent
unique_ptr< CFastMutex > m_Mutex
TServiceInfoMap m_ServiceInfoMap
IDBServiceMapper & GetDBServiceMapper(void)
CRef< IDBServiceMapper > m_DBServiceMapper
const IDBServiceMapper & GetDBServiceMapper(void) const
map< string, CRef< CServiceInfo > > TServiceInfoMap
string GetMapperName(void) const
CServiceInfo(const CDBConnectionFactory &factory, IDBServiceMapper &mapper, const string &service_name)
unsigned int m_NumDispatches
void Unlock(void) override
bool HasExclusions(void) const
const string & GetServiceName(void) const override
void Exclude(const TSvrRef &server)
TSvrRef GetDispatchedServer(void) const
unsigned int m_NumValidationFailures
unsigned int GetNumOfDispatches(void) const
TSvrRef GetMappedServer(void) override
unsigned int GetNumOfValidationFailures(void) const
const CDBConnectionFactory & m_Factory
CRef< IDBServiceMapper > m_Mapper
unsigned int GetMaxNumOfServerAlternatives(void) const
unsigned int m_MaxNumOfServerAlternatives
unsigned int GetMaxNumOfConnAttempts(void) const
unsigned int m_MaxNumOfConnAttempts
unsigned int m_MaxNumOfValidationAttempts
unsigned int GetLoginTimeout(void) const
CFastMutex m_ValidatorSetMutex
unsigned int m_LoginTimeout
unsigned int GetMaxNumOfDispatches(void) const
unsigned int m_ConnectionTimeout
unsigned int GetMaxNumOfValidationAttempts(void) const
const CMapperFactory m_MapperFactory
unsigned int m_MaxNumOfDispatches
map< string, CRuntimeData > TValidatorSet
TValidatorSet m_ValidatorSet
unsigned int GetConnectionTimeout(void) const
virtual Uint4 GetHost(void) const
virtual Uint2 GetPort(void) const
const string m_ServerName
CDB_DBLB_Delegate(const CDB_DBLB_Delegate &other)
impl::CDBHandlerStack & SetOpeningMsgHandlers(void)
impl::CDBHandlerStack m_OpeningMsgHandlers
CDB_DBLB_Delegate & operator=(const CDB_DBLB_Delegate &other)
virtual string GetServerName(void) const
CDB_DBLB_Delegate(const string &srv_name, Uint4 host, Uint2 port, const CDBConnParams &other)
virtual const impl::CDBHandlerStack & GetOpeningMsgHandlers(void) const
virtual ~CDB_DBLB_Delegate(void)
const string & GetDBName(void) const
virtual void Configure(const IRegistry *registry=NULL)=0
Configure connection policy using registry.
virtual CDB_Connection * MakeDBConnection(I_DriverContext &ctx, const CDBConnParams ¶ms, CDB_UserHandler::TExceptions &exceptions)=0
Create new connection object for the given context and connection attributes.
IDBServiceMapper *(* TFactory)(const IRegistry *registry)
EDefaultMapping
CDBConnectionFactory.
Help distribute connections within a pool across servers.
bool Empty(const CNcbiOstrstream &src)
static CS_CONNECTION * conn
IDBServiceMapper::TOptions TOptions
deque< CDB_Exception * > TExceptions
Exception container type.
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.
double Restart(void)
Return time elapsed since first Start() or last Restart() call (in seconds).
void Stop(void)
Suspend the timer.
#define NCBI_DBAPIDRIVER_EXPORT
Multi-threading â mutexes; rw-locks; semaphore.
CStopWatchScope(CStopWatch &sw_)
CServiceInfo & service_info
CStopWatch dispatch_server_name_sw
CStopWatch make_valid_connection_sw
IConnValidator::EConnStatus conn_status
CDB_UserHandler::TExceptions & errors
I_DriverContext & driver_ctx
impl::CDBHandlerStack handlers
Simple record type used to specify index creation parameters.
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