CMS 3D CMS Logo

cond::ConnectionConfiguration Class Reference

#include <CondCore/DBCommon/interface/ConnectionConfiguration.h>

List of all members.

Public Member Functions

 ConnectionConfiguration ()
int connectionRetrialPeriod () const
 Returns the rate of connection retrials (time interval between two retrials).
int connectionRetrialTimeOut () const
 Returns the time out for the connection retrials before the connection service fails over to the next available replica or quits.
int connectionTimeOut ()
 Retrieves the connection time out in seconds.
void disableConnectionSharing ()
 Disables the sharing of the same physical connection among more clients.
void disablePoolAutomaticCleanUp ()
 Disable the parallel thread for idle pool cleaning up.
void disableReadOnlySessionOnUpdateConnections ()
 Disables the re-use of Update connections for Read-Only sessions.
void enableConnectionSharing ()
 Enables the sharing of the same physical connection among more clients.
void enablePoolAutomaticCleanUp ()
 Activate the parallel thread for idle pool cleaning up.
void enableReadOnlySessionOnUpdateConnections ()
 Enables the re-use of Update connections for Read-Only sessions.
int idleConnectionCleanupPeriod () const
 Returns period in second for manual cleanup idle connections.
bool isConnectionSharingEnabled () const
 Returns true if connection sharing is enabled.
bool isPoolAutomaticCleanUpEnabled () const
 Returns true if the parallel thread for idle pool cleaning up is enabled.
bool isReadOnlySessionOnUpdateConnectionsEnabled ()
 Returns true if the re-use of Update connections for Read-Only sessions is enabled.
coral::monitor::Level monitorLevel () const
void setConnectionRetrialPeriod (int timeInSeconds)
 Sets the period of connection retrials (time interval between two retrials).
void setConnectionRetrialTimeOut (int timeOutInSeconds)
 Sets the time out for the connection retrials before the connection service fails over to the next available replica or quits.
void setConnectionTimeOut (int timeOutInSeconds)
 Sets the connection time out in seconds.
void setIdleConnectionCleanupPeriod (int timeInSeconds)
 Sets idle connection pool cleanup period.
void setMonitorLevel (coral::monitor::Level level)
 ~ConnectionConfiguration ()

Private Attributes

int m_connectionRetrialPeriod
int m_connectionRetrialTimeOut
int m_connectionTimeOut
bool m_enableCommonConnection
bool m_enableConSharing
bool m_enablePoolAutomaticCleanUp
int m_idleconnectionCleanupPeriod
coral::monitor::Level m_monitorLevel


Detailed Description

Definition at line 15 of file ConnectionConfiguration.h.


Constructor & Destructor Documentation

ConnectionConfiguration::ConnectionConfiguration (  ) 

Definition at line 3 of file ConnectionConfiguration.cc.

ConnectionConfiguration::~ConnectionConfiguration (  ) 

Definition at line 4 of file ConnectionConfiguration.cc.

00004 {}


Member Function Documentation

int ConnectionConfiguration::connectionRetrialPeriod (  )  const

Returns the rate of connection retrials (time interval between two retrials).

Definition at line 17 of file ConnectionConfiguration.cc.

References m_connectionRetrialPeriod.

Referenced by cond::DBSession::open().

00017                                                               {
00018   return m_connectionRetrialPeriod;
00019 }

int ConnectionConfiguration::connectionRetrialTimeOut (  )  const

Returns the time out for the connection retrials before the connection service fails over to the next available replica or quits.

Definition at line 23 of file ConnectionConfiguration.cc.

References m_connectionRetrialTimeOut.

Referenced by cond::DBSession::open().

00023                                                                {
00024   return m_connectionRetrialTimeOut;
00025 }

int ConnectionConfiguration::connectionTimeOut (  ) 

Retrieves the connection time out in seconds.

Definition at line 29 of file ConnectionConfiguration.cc.

References m_connectionTimeOut.

Referenced by cond::DBSession::open().

00029                                                   {
00030   return m_connectionTimeOut;
00031 }

void ConnectionConfiguration::disableConnectionSharing (  ) 

Disables the sharing of the same physical connection among more clients.

Definition at line 8 of file ConnectionConfiguration.cc.

References m_enableConSharing.

Referenced by cond::ConfigSessionFromParameterSet::ConfigSessionFromParameterSet().

00008                                                           {
00009   m_enableConSharing=false;
00010 }

void ConnectionConfiguration::disablePoolAutomaticCleanUp (  ) 

Disable the parallel thread for idle pool cleaning up.

Definition at line 50 of file ConnectionConfiguration.cc.

References m_enablePoolAutomaticCleanUp.

Referenced by cond::ConfigSessionFromParameterSet::ConfigSessionFromParameterSet().

00050                                                              {
00051   m_enablePoolAutomaticCleanUp=false;
00052 }

void ConnectionConfiguration::disableReadOnlySessionOnUpdateConnections (  ) 

Disables the re-use of Update connections for Read-Only sessions.

Definition at line 41 of file ConnectionConfiguration.cc.

References m_enableCommonConnection.

Referenced by cond::ConfigSessionFromParameterSet::ConfigSessionFromParameterSet().

00041                                                                            {
00042   m_enableCommonConnection=false;
00043 }

void ConnectionConfiguration::enableConnectionSharing (  ) 

Enables the sharing of the same physical connection among more clients.

Definition at line 5 of file ConnectionConfiguration.cc.

References m_enableConSharing.

Referenced by cond::ConfigSessionFromParameterSet::ConfigSessionFromParameterSet().

00005                                                          {
00006   m_enableConSharing=true;
00007 }

void ConnectionConfiguration::enablePoolAutomaticCleanUp (  ) 

Activate the parallel thread for idle pool cleaning up.

Definition at line 47 of file ConnectionConfiguration.cc.

References m_enablePoolAutomaticCleanUp.

Referenced by cond::ConfigSessionFromParameterSet::ConfigSessionFromParameterSet().

00047                                                             {
00048   m_enablePoolAutomaticCleanUp=true;
00049 }

void ConnectionConfiguration::enableReadOnlySessionOnUpdateConnections (  ) 

Enables the re-use of Update connections for Read-Only sessions.

Definition at line 38 of file ConnectionConfiguration.cc.

References m_enableCommonConnection.

Referenced by cond::ConfigSessionFromParameterSet::ConfigSessionFromParameterSet().

00038                                                                           {
00039   m_enableCommonConnection=true;
00040 }

int ConnectionConfiguration::idleConnectionCleanupPeriod (  )  const

Returns period in second for manual cleanup idle connections.

Definition at line 35 of file ConnectionConfiguration.cc.

References m_idleconnectionCleanupPeriod.

Referenced by cond::Connection::connect().

00035                                                                   {
00036   return m_idleconnectionCleanupPeriod;
00037 }

bool ConnectionConfiguration::isConnectionSharingEnabled (  )  const

Returns true if connection sharing is enabled.

Definition at line 11 of file ConnectionConfiguration.cc.

References m_enableConSharing.

Referenced by cond::DBSession::open().

00011                                                                   {
00012   return m_enableConSharing;
00013 }

bool ConnectionConfiguration::isPoolAutomaticCleanUpEnabled (  )  const

Returns true if the parallel thread for idle pool cleaning up is enabled.

Definition at line 53 of file ConnectionConfiguration.cc.

References m_enablePoolAutomaticCleanUp.

Referenced by cond::DBSession::open().

00053                                                                      {
00054   return m_enablePoolAutomaticCleanUp;
00055 }

bool ConnectionConfiguration::isReadOnlySessionOnUpdateConnectionsEnabled (  ) 

Returns true if the re-use of Update connections for Read-Only sessions is enabled.

Definition at line 44 of file ConnectionConfiguration.cc.

References m_enableCommonConnection.

00044                                                                              {
00045   return m_enableCommonConnection;
00046 }

coral::monitor::Level ConnectionConfiguration::monitorLevel (  )  const

Definition at line 60 of file ConnectionConfiguration.cc.

References m_monitorLevel.

Referenced by cond::DBSession::open().

00060                                                {
00061   return m_monitorLevel;
00062 }

void ConnectionConfiguration::setConnectionRetrialPeriod ( int  timeInSeconds  ) 

Sets the period of connection retrials (time interval between two retrials).

Definition at line 14 of file ConnectionConfiguration.cc.

References m_connectionRetrialPeriod.

Referenced by cond::ConfigSessionFromParameterSet::ConfigSessionFromParameterSet().

00014                                                                                {
00015   m_connectionRetrialPeriod=timeInSeconds;
00016 }

void ConnectionConfiguration::setConnectionRetrialTimeOut ( int  timeOutInSeconds  ) 

Sets the time out for the connection retrials before the connection service fails over to the next available replica or quits.

Definition at line 20 of file ConnectionConfiguration.cc.

References m_connectionRetrialTimeOut.

Referenced by cond::ConfigSessionFromParameterSet::ConfigSessionFromParameterSet().

00020                                                                                    {
00021   m_connectionRetrialTimeOut=timeOutInSeconds;
00022 }

void ConnectionConfiguration::setConnectionTimeOut ( int  timeOutInSeconds  ) 

Sets the connection time out in seconds.

Definition at line 26 of file ConnectionConfiguration.cc.

References m_connectionTimeOut.

Referenced by cond::ConfigSessionFromParameterSet::ConfigSessionFromParameterSet().

00026                                                                             {
00027   m_connectionTimeOut=timeOutInSeconds;
00028 }

void ConnectionConfiguration::setIdleConnectionCleanupPeriod ( int  timeInSeconds  ) 

Sets idle connection pool cleanup period.

Has effect only if PoolAutomaticCleanUp is disabled

Definition at line 32 of file ConnectionConfiguration.cc.

References m_idleconnectionCleanupPeriod.

Referenced by cond::ConfigSessionFromParameterSet::ConfigSessionFromParameterSet().

00032                                                                                    {
00033   m_idleconnectionCleanupPeriod=timeInSeconds;
00034 }

void ConnectionConfiguration::setMonitorLevel ( coral::monitor::Level  level  ) 

Definition at line 56 of file ConnectionConfiguration.cc.

References m_monitorLevel.

Referenced by cond::DBSession::open().

00056                                                                         {
00057   m_monitorLevel = level;
00058 }


Member Data Documentation

int cond::ConnectionConfiguration::m_connectionRetrialPeriod [private]

Definition at line 115 of file ConnectionConfiguration.h.

Referenced by connectionRetrialPeriod(), and setConnectionRetrialPeriod().

int cond::ConnectionConfiguration::m_connectionRetrialTimeOut [private]

Definition at line 116 of file ConnectionConfiguration.h.

Referenced by connectionRetrialTimeOut(), and setConnectionRetrialTimeOut().

int cond::ConnectionConfiguration::m_connectionTimeOut [private]

Definition at line 117 of file ConnectionConfiguration.h.

Referenced by connectionTimeOut(), and setConnectionTimeOut().

bool cond::ConnectionConfiguration::m_enableCommonConnection [private]

Definition at line 119 of file ConnectionConfiguration.h.

Referenced by disableReadOnlySessionOnUpdateConnections(), enableReadOnlySessionOnUpdateConnections(), and isReadOnlySessionOnUpdateConnectionsEnabled().

bool cond::ConnectionConfiguration::m_enableConSharing [private]

Definition at line 114 of file ConnectionConfiguration.h.

Referenced by disableConnectionSharing(), enableConnectionSharing(), and isConnectionSharingEnabled().

bool cond::ConnectionConfiguration::m_enablePoolAutomaticCleanUp [private]

Definition at line 120 of file ConnectionConfiguration.h.

Referenced by disablePoolAutomaticCleanUp(), enablePoolAutomaticCleanUp(), and isPoolAutomaticCleanUpEnabled().

int cond::ConnectionConfiguration::m_idleconnectionCleanupPeriod [private]

Definition at line 118 of file ConnectionConfiguration.h.

Referenced by idleConnectionCleanupPeriod(), and setIdleConnectionCleanupPeriod().

coral::monitor::Level cond::ConnectionConfiguration::m_monitorLevel [private]

Definition at line 121 of file ConnectionConfiguration.h.

Referenced by monitorLevel(), and setMonitorLevel().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:36:43 2009 for CMSSW by  doxygen 1.5.4