NCBI C++ ToolKit
settings.hpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 #ifndef SETTINGS__HPP
2 #define SETTINGS__HPP
3 
4 /* $Id: settings.hpp 101614 2024-01-12 16:31:21Z satskyse $
5  * ===========================================================================
6  *
7  * PUBLIC DOMAIN NOTICE
8  * National Center for Biotechnology Information
9  *
10  * This software/database is a "United States Government Work" under the
11  * terms of the United States Copyright Act. It was written as part of
12  * the author's official duties as a United States Government employee and
13  * thus cannot be copyrighted. This software/database is freely available
14  * to the public for use. The National Library of Medicine and the U.S.
15  * Government have not placed any restriction on its use or reproduction.
16  *
17  * Although all reasonable efforts have been taken to ensure the accuracy
18  * and reliability of the software and data, the NLM and the U.S.
19  * Government do not and cannot warrant the performance or results that
20  * may be obtained by using this software or data. The NLM and the U.S.
21  * Government disclaim all warranties, express or implied, including
22  * warranties of performance, merchantability or fitness for any particular
23  * purpose.
24  *
25  * Please cite the author in any work or product based on this material.
26  *
27  * ===========================================================================
28  *
29  * Authors: Sergey Satskiy
30  *
31  * File Description:
32  *
33  */
34 
35 #include <corelib/ncbireg.hpp>
36 
38 
39 class CPSGAlerts;
40 
41 
43 {
46 
47  void Read(const CNcbiRegistry & registry,
48  CPSGAlerts & alerts);
49  void Validate(CPSGAlerts & alerts);
51  const string & processor_id);
52  bool IsAuthProtectedCommand(const string & cmd) const;
53 
54  // [SERVER]
55  unsigned short m_HttpPort;
56  unsigned short m_HttpWorkers;
57  unsigned int m_ListenerBacklog;
58  unsigned short m_TcpMaxConn;
59  unsigned int m_TimeoutMs;
60  unsigned int m_MaxRetries;
61  unsigned long m_SendBlobIfSmall;
62  bool m_Log;
63  int m_MaxHops;
75 
76  // [STATISTICS]
77  unsigned long m_SmallBlobSize;
78  unsigned long m_MinStatValue;
79  unsigned long m_MaxStatValue;
80  unsigned long m_NStatBins;
82  unsigned long m_TickSpan;
84 
85 
86  // [LMDB_CACHE]
90 
91  // [AUTO_EXCLUDE]
92  unsigned int m_ExcludeCacheMaxSize;
95 
96  // [DEBUG]
99 
100  // [IPG]
103 
104  // [ADMIN]
105  string m_AuthToken;
106  vector<string> m_AuthCommands;
107 
108  // [SSL]
111  string m_SSLKeyFile;
112  string m_SSLCiphers;
113 
114  // [HEALTH]
115  string m_TestSeqId;
117 
118  // [CASSANDRA_PROCESSOR]
120 
121  // [OSG_PROCESSOR]
123 
124  // [CDD_PROCESSOR]
126 
127  // [WGS_PROCESSOR]
129 
130  // [SNP_PROCESSOR]
132 
133  // [COUNTERS]
134  // Configured counter/statistics ID to name/description
136 
137  // [MY_NCBI]
143  string m_MyNCBIURL;
147 
148 private:
156  CPSGAlerts & alerts);
166 
167  unsigned long x_GetDataSize(const CNcbiRegistry & registry,
168  const string & section,
169  const string & entry,
170  unsigned long default_val);
171 };
172 
173 
174 #endif
175 
CNcbiRegistry –.
Definition: ncbireg.hpp:913
Definition: map.hpp:338
static CMemoryRegistry registry
Definition: cn3d_tools.cpp:81
static CS_COMMAND * cmd
Definition: ct_dynamic.c:26
Process information in the NCBI Registry, including working with configuration files.
USING_NCBI_SCOPE
Definition: settings.hpp:37
void x_ReadOSGProcessorSection(const CNcbiRegistry &registry)
Definition: settings.cpp:354
void Read(const CNcbiRegistry &registry, CPSGAlerts &alerts)
Definition: settings.cpp:174
unsigned long m_MinStatValue
Definition: settings.hpp:78
unsigned int m_TimeoutMs
Definition: settings.hpp:59
void x_ReadCountersSection(const CNcbiRegistry &registry)
Definition: settings.cpp:418
size_t m_SplitInfoBlobCacheSize
Definition: settings.hpp:67
unsigned long x_GetDataSize(const CNcbiRegistry &registry, const string &section, const string &entry, unsigned long default_val)
Definition: settings.cpp:815
void x_ReadCDDProcessorSection(const CNcbiRegistry &registry)
Definition: settings.cpp:362
map< string, tuple< string, string > > m_IdToNameAndDescription
Definition: settings.hpp:135
unsigned int m_ExcludeCachePurgePercentage
Definition: settings.hpp:93
void x_ReadIPGSection(const CNcbiRegistry &registry)
Definition: settings.cpp:314
size_t m_MyNCBINotFoundCacheSize
Definition: settings.hpp:139
unsigned short m_HttpPort
Definition: settings.hpp:55
void x_ReadSNPProcessorSection(const CNcbiRegistry &registry)
Definition: settings.cpp:378
unsigned long m_MaxStatValue
Definition: settings.hpp:79
void x_ReadStatisticsSection(const CNcbiRegistry &registry)
Definition: settings.cpp:260
void x_ReadWGSProcessorSection(const CNcbiRegistry &registry)
Definition: settings.cpp:370
void x_ReadServerSection(const CNcbiRegistry &registry)
Definition: settings.cpp:199
unsigned short m_HttpWorkers
Definition: settings.hpp:56
string m_ConfigurationDomain
Definition: settings.hpp:70
void x_ReadAutoExcludeSection(const CNcbiRegistry &registry)
Definition: settings.cpp:291
bool IsAuthProtectedCommand(const string &cmd) const
Definition: settings.cpp:862
size_t m_MyNCBIErrorCacheBackOffMs
Definition: settings.hpp:142
void x_ReadMyNCBISection(const CNcbiRegistry &registry)
Definition: settings.cpp:386
unsigned int m_ExcludeCacheMaxSize
Definition: settings.hpp:92
void Validate(CPSGAlerts &alerts)
Definition: settings.cpp:478
unsigned short m_TcpMaxConn
Definition: settings.hpp:58
void x_ReadAdminSection(const CNcbiRegistry &registry, CPSGAlerts &alerts)
Definition: settings.cpp:439
unsigned long m_TickSpan
Definition: settings.hpp:82
unsigned long m_SmallBlobSize
Definition: settings.hpp:77
size_t GetProcessorMaxConcurrency(const CNcbiRegistry &registry, const string &processor_id)
Definition: settings.cpp:834
void x_ReadSSLSection(const CNcbiRegistry &registry)
Definition: settings.cpp:323
size_t m_ProcessorMaxConcurrency
Definition: settings.hpp:66
unsigned int m_MaxRetries
Definition: settings.hpp:60
void x_ReadHealthSection(const CNcbiRegistry &registry)
Definition: settings.cpp:336
size_t m_ShutdownIfTooManyOpenFD
Definition: settings.hpp:68
unsigned int m_ListenerBacklog
Definition: settings.hpp:57
unsigned int m_ExcludeCacheInactivityPurge
Definition: settings.hpp:94
size_t m_MyNCBINotFoundCacheExpirationSec
Definition: settings.hpp:140
unsigned long m_SendBlobIfSmall
Definition: settings.hpp:61
void x_ReadLmdbCacheSection(const CNcbiRegistry &registry)
Definition: settings.cpp:280
vector< string > m_AuthCommands
Definition: settings.hpp:106
void x_ReadCassandraProcessorSection(const CNcbiRegistry &registry)
Definition: settings.cpp:346
void x_ReadDebugSection(const CNcbiRegistry &registry)
Definition: settings.cpp:305
unsigned long m_NStatBins
Definition: settings.hpp:80
size_t m_MyNCBIResolveTimeoutMs
Definition: settings.hpp:146
Modified on Tue Apr 23 07:37:21 2024 by modify_doxy.py rev. 669887