ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Database
ConnectionManagement
DBReplicaSvc
src
DBReplicaSvc.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef DBREPLICASVC_DBREPLICASVC_H
6
#define DBREPLICASVC_DBREPLICASVC_H
7
// DBReplicaSvc.h - concrete implementation of service implementating
8
// CORAL IReplicaSortingAlgorithm
9
// Richard Hawkings, started 24/4/07
10
11
#include <string>
12
13
#include "
AthenaBaseComps/AthService.h
"
14
#include "CoralKernel/Context.h"
15
#include "
DBReplicaSvc/IDBReplicaSvc.h
"
16
#include "RelationalAccess/IDatabaseServiceDescription.h"
17
18
class
DBReplicaSvc
:
public
extends<AthService, IDBReplicaSvc> {
19
public
:
20
using
base_class::base_class;
21
22
virtual
StatusCode
initialize
()
override
;
23
24
void
sort
(std::vector<const coral::IDatabaseServiceDescription*>& replicaSet)
override
;
25
26
private
:
27
StatusCode
readConfig
();
28
29
Gaudi::Property<std::string>
m_configfile
{
this
,
"ConfigFile"
,
"dbreplica.config"
};
30
Gaudi::Property<std::string>
m_testhost
{
this
,
"TestHost"
,
""
};
31
Gaudi::Property<std::string>
m_coolsqlitepattern
{
this
,
"COOLSQLiteVetoPattern"
,
""
};
32
Gaudi::Property<bool>
m_usecoolsqlite
{
this
,
"UseCOOLSQLite"
,
true
};
33
Gaudi::Property<bool>
m_usecoolfrontier
{
this
,
"UseCOOLFrontier"
,
true
};
34
Gaudi::Property<bool>
m_usegeomsqlite
{
this
,
"UseGeomSQLite"
,
true
};
35
Gaudi::Property<bool>
m_nofailover
{
this
,
"DisableFailover"
,
false
};
36
38
Gaudi::Property<int>
m_retrialPeriod
{
this
,
"ConnectionRetrialPeriod"
, 300};
40
Gaudi::Property<int>
m_retrialTimeOut
{
this
,
"ConnectionRetrialTimeOut"
, 3600};
42
Gaudi::Property<int>
m_timeOut
{
this
,
"ConnectionTimeOut"
, 5};
44
Gaudi::Property<bool>
m_connClean
{
this
,
"ConnectionCleanUp"
,
false
};
46
Gaudi::Property<int>
m_frontierComp
{
this
,
"FrontierCompression"
, 5};
47
Gaudi::Property<std::vector<std::string>>
m_frontierRefresh
{
this
,
"FrontierRefreshSchema"
, {}};
48
49
coral::Context*
m_context
{
nullptr
};
50
bool
m_frontiergen
{
false
};
51
std::string
m_hostname
;
52
typedef
std::pair<std::string, int>
ServerPair
;
//<! (priority, name) pair
53
std::vector<ServerPair>
m_servermap
;
54
};
55
56
#endif
// DBREPLICASVC_DBREPLICASVC_H
AthService.h
IDBReplicaSvc.h
DBReplicaSvc
Definition
DBReplicaSvc.h:18
DBReplicaSvc::m_retrialTimeOut
Gaudi::Property< int > m_retrialTimeOut
ConnectionRetrialTimeOut, the retrial time out for CORAL Connection Service: default = 300 seconds.
Definition
DBReplicaSvc.h:40
DBReplicaSvc::m_frontiergen
bool m_frontiergen
Definition
DBReplicaSvc.h:50
DBReplicaSvc::m_hostname
std::string m_hostname
Definition
DBReplicaSvc.h:51
DBReplicaSvc::m_connClean
Gaudi::Property< bool > m_connClean
ConnectionCleanUp - whether to use CORAL connection management thread: default = false.
Definition
DBReplicaSvc.h:44
DBReplicaSvc::initialize
virtual StatusCode initialize() override
Definition
DBReplicaSvc.cxx:21
DBReplicaSvc::m_testhost
Gaudi::Property< std::string > m_testhost
Definition
DBReplicaSvc.h:30
DBReplicaSvc::m_usegeomsqlite
Gaudi::Property< bool > m_usegeomsqlite
Definition
DBReplicaSvc.h:34
DBReplicaSvc::m_context
coral::Context * m_context
Definition
DBReplicaSvc.h:49
DBReplicaSvc::sort
void sort(std::vector< const coral::IDatabaseServiceDescription * > &replicaSet) override
Definition
DBReplicaSvc.cxx:204
DBReplicaSvc::m_timeOut
Gaudi::Property< int > m_timeOut
ConnectionTimeOut, the time out for CORAL Connection Service: default = 5 seconds.
Definition
DBReplicaSvc.h:42
DBReplicaSvc::m_frontierRefresh
Gaudi::Property< std::vector< std::string > > m_frontierRefresh
Definition
DBReplicaSvc.h:47
DBReplicaSvc::ServerPair
std::pair< std::string, int > ServerPair
Definition
DBReplicaSvc.h:52
DBReplicaSvc::m_frontierComp
Gaudi::Property< int > m_frontierComp
Frontier proprties, compression level and list of schemas to be refreshed: default = 5.
Definition
DBReplicaSvc.h:46
DBReplicaSvc::m_retrialPeriod
Gaudi::Property< int > m_retrialPeriod
ConnectionRetrialPeriod, retry period for CORAL Connection Service: default = 30 seconds.
Definition
DBReplicaSvc.h:38
DBReplicaSvc::m_usecoolsqlite
Gaudi::Property< bool > m_usecoolsqlite
Definition
DBReplicaSvc.h:32
DBReplicaSvc::m_nofailover
Gaudi::Property< bool > m_nofailover
Definition
DBReplicaSvc.h:35
DBReplicaSvc::m_coolsqlitepattern
Gaudi::Property< std::string > m_coolsqlitepattern
Definition
DBReplicaSvc.h:31
DBReplicaSvc::m_servermap
std::vector< ServerPair > m_servermap
Definition
DBReplicaSvc.h:53
DBReplicaSvc::m_configfile
Gaudi::Property< std::string > m_configfile
Definition
DBReplicaSvc.h:29
DBReplicaSvc::readConfig
StatusCode readConfig()
Definition
DBReplicaSvc.cxx:108
DBReplicaSvc::m_usecoolfrontier
Gaudi::Property< bool > m_usecoolfrontier
Definition
DBReplicaSvc.h:33
Generated on
for ATLAS Offline Software by
1.17.0