![]() |
![]() |
00001 #include "CondCore/DBCommon/interface/ConnectionConfiguration.h" 00002 //#include <iostream> 00003 cond::ConnectionConfiguration::ConnectionConfiguration():m_enableConSharing(true),m_connectionRetrialPeriod(10),m_connectionRetrialTimeOut(60),m_connectionTimeOut(300),m_idleconnectionCleanupPeriod(10),m_enableCommonConnection(false),m_enablePoolAutomaticCleanUp(true),m_monitorLevel(coral::monitor::Off){} 00004 cond::ConnectionConfiguration::~ConnectionConfiguration(){} 00005 void cond::ConnectionConfiguration::enableConnectionSharing(){ 00006 m_enableConSharing=true; 00007 } 00008 void cond::ConnectionConfiguration::disableConnectionSharing(){ 00009 m_enableConSharing=false; 00010 } 00011 bool cond::ConnectionConfiguration::isConnectionSharingEnabled() const{ 00012 return m_enableConSharing; 00013 } 00014 void cond::ConnectionConfiguration::setConnectionRetrialPeriod( int timeInSeconds ){ 00015 m_connectionRetrialPeriod=timeInSeconds; 00016 } 00017 int cond::ConnectionConfiguration::connectionRetrialPeriod() const{ 00018 return m_connectionRetrialPeriod; 00019 } 00020 void cond::ConnectionConfiguration::setConnectionRetrialTimeOut( int timeOutInSeconds ){ 00021 m_connectionRetrialTimeOut=timeOutInSeconds; 00022 } 00023 int cond::ConnectionConfiguration::connectionRetrialTimeOut() const{ 00024 return m_connectionRetrialTimeOut; 00025 } 00026 void cond::ConnectionConfiguration::setConnectionTimeOut( int timeOutInSeconds ){ 00027 m_connectionTimeOut=timeOutInSeconds; 00028 } 00029 int cond::ConnectionConfiguration::connectionTimeOut(){ 00030 return m_connectionTimeOut; 00031 } 00032 void cond::ConnectionConfiguration::setIdleConnectionCleanupPeriod( int timeInSeconds ){ 00033 m_idleconnectionCleanupPeriod=timeInSeconds; 00034 } 00035 int cond::ConnectionConfiguration::idleConnectionCleanupPeriod() const{ 00036 return m_idleconnectionCleanupPeriod; 00037 } 00038 void cond::ConnectionConfiguration::enableReadOnlySessionOnUpdateConnections(){ 00039 m_enableCommonConnection=true; 00040 } 00041 void cond::ConnectionConfiguration::disableReadOnlySessionOnUpdateConnections(){ 00042 m_enableCommonConnection=false; 00043 } 00044 bool cond::ConnectionConfiguration::isReadOnlySessionOnUpdateConnectionsEnabled(){ 00045 return m_enableCommonConnection; 00046 } 00047 void cond::ConnectionConfiguration::enablePoolAutomaticCleanUp(){ 00048 m_enablePoolAutomaticCleanUp=true; 00049 } 00050 void cond::ConnectionConfiguration::disablePoolAutomaticCleanUp(){ 00051 m_enablePoolAutomaticCleanUp=false; 00052 } 00053 bool cond::ConnectionConfiguration::isPoolAutomaticCleanUpEnabled() const{ 00054 return m_enablePoolAutomaticCleanUp; 00055 } 00056 void cond::ConnectionConfiguration::setMonitorLevel(coral::monitor::Level level){ 00057 m_monitorLevel = level; 00058 } 00059 coral::monitor::Level 00060 cond::ConnectionConfiguration::monitorLevel() const{ 00061 return m_monitorLevel; 00062 }