vector<string> & warnings,
49 boolthrow_port_exception);
51vector<string> & warnings);
53vector<string> & warnings);
55vector<string> & warnings);
57 const string& section,
59vector<string> & warnings);
61 const string& section,
63vector<string> & warnings);
65 const string& section,
const string& entry,
66vector<string> & warnings);
68 const string& section,
const string& entry,
69vector<string> & warnings);
71 const string& section,
const string& entry,
72vector<string> & warnings);
74 const string& section,
const string& entry,
75vector<string> & warnings);
76 static string NSTRegValName(
const string& section,
const string& entry);
79 unsigned intlow_limit,
80 unsigned inthigh_limit);
84vector<string> & warnings,
85 boolthrow_port_exception)
96vector<string> & warnings,
97 boolthrow_port_exception)
99 const stringsection =
"server";
105 intport_val = reg.
GetInt(section,
"port", 0);
108 " value. Allowed range: "+
111 if(throw_port_exception)
113warnings.push_back(
msg);
116 if(throw_port_exception)
124 int val= reg.
GetInt(section,
"max_connections",
145max_threads_val =
val;
159init_threads_val =
val;
162 if(init_threads_val > max_threads_val)
166 " break the mandatory condition " 167 "init_threads <= max_threads");
172 int val= reg.
GetInt(section,
"network_timeout",
189vector<string> & warnings)
191 const stringsection =
"database";
199 " must not be empty");
208 " must not be empty");
217 " must not be empty");
226 " must not be empty");
243vector<string> & warnings)
245 const stringsection =
"metadata_conf";
269list<string> sections;
272 const stringprefix =
"service_";
273 for(list<string>::const_iterator k = sections.begin();
274k != sections.end(); ++k) {
278 stringservice(k->c_str() + prefix.size());
279 if(service.empty()) {
280warnings.push_back(
"Section ["+ *k +
"] does not have " 285 if(!reg.
HasEntry(*k,
"metadata"))
291 if(!reg.
GetBool(*k,
"metadata",
false))
303 const string& section,
304 const string& entry,
305vector<string> & warnings)
312 if(!
value.empty()) {
322warnings.push_back(
"The "+
324 "be a positive value.");
328}
catch(
constexception & ex) {
329warnings.push_back(
"Exception while validating "+
331 " value: "+ ex.what());
333warnings.push_back(
"Unknown exception while validating "+
335 " value: "+
value+
". It must be " 336 " in a recognizable format.");
344 const string& section,
345 const string& entry,
346vector<string> & warnings)
353}
catch(
constexception & ex) {
354warnings.push_back(
"Exception while validating "+
356 " value: "+ ex.what());
358warnings.push_back(
"Unknown exception while validating "+
360 " value: "+
value+
". It must be " 361 "'infinity' or a recognizable format.");
370 return "["+ section +
"]/"+ entry;
376 const string& entry,
377 unsigned intlow_limit,
378 unsigned inthigh_limit)
389 const string& section,
const string& entry,
390vector<string> & warnings)
393reg.
GetBool(section, entry,
false);
396warnings.push_back(
g_LogPrefix+
"unexpected value of "+
398 ". Expected boolean value.");
407 const string& section,
const string& entry,
408vector<string> & warnings)
411reg.
GetInt(section, entry, 0);
414warnings.push_back(
g_LogPrefix+
"unexpected value of "+
416 ". Expected integer value.");
426 const string& section,
const string& entry,
427vector<string> & warnings)
433warnings.push_back(
g_LogPrefix+
"unexpected value of "+
435 ". Expected floating point value.");
445 const string& section,
const string& entry,
446vector<string> & warnings)
452warnings.push_back(
g_LogPrefix+
"unexpected value of "+
454 ". Expected string value.");
463vector<string> & warnings)
478warnings.push_back(
std::string(
"CException while retrieving " 479 "backend configuration when no " 480 "service is provided: ") + ex.
what());
481}
catch(
conststd::exception & ex) {
482warnings.push_back(
std::string(
"std::exception while retrieving " 483 "backend configuration when no " 484 "service is provided: ") + ex.
what());
486warnings.push_back(
"Unknown exception while retrieving backend " 487 "configuration when no service is provided");
492list<string> sections;
495 const stringprefix =
"service_";
496 for(list<string>::const_iterator k = sections.begin();
497k != sections.end(); ++k) {
501 stringservice(k->c_str() + prefix.size());
511warnings.push_back(
"CException while retrieving backend " 512 "configuration for service "+ service +
514}
catch(
conststd::exception & ex) {
515warnings.push_back(
"std::exception while retrieving backend " 516 "configuration for service "+ service +
519warnings.push_back(
"Unknown exception while retrieving " 520 "backend configuration for service "+ service);
523 returnconfiguration;
531 if(allow_infinity) {
538 result.m_IsNull =
false;
539 result.m_Value.AssignFromSmartString(reg_value);
CJsonNode ReportConfig() const
void SetByKey(const string &key, CJsonNode::TInstance value)
For a JSON object node, insert a new element or update an existing element.
static CJsonNode NewObjectNode()
Create a new JSON object node.
CCompoundIDPool GetCompoundIDPool(void) const
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
virtual const char * what(void) const noexcept
Standard report (includes full backlog).
virtual bool GetBool(const string §ion, const string &name, bool default_value, TFlags flags=0, EErrAction err_action=eThrow) const
Get boolean value of specified parameter name.
virtual void EnumerateSections(list< string > *sections, TFlags flags=fAllLayers) const
Enumerate section names.
virtual int GetInt(const string §ion, const string &name, int default_value, TFlags flags=0, EErrAction err_action=eThrow) const
Get integer value of specified parameter name.
virtual double GetDouble(const string §ion, const string &name, double default_value, TFlags flags=0, EErrAction err_action=eThrow) const
Get double value of specified parameter name.
virtual bool HasEntry(const string §ion, const string &name=kEmptyStr, TFlags flags=0) const
virtual string GetString(const string §ion, const string &name, const string &default_value, TFlags flags=0) const
Get the parameter string value.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static int CompareNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-insensitive compare of a substring with another string.
static bool EndsWith(const CTempString str, const CTempString end, ECase use_case=eCase)
Check if a string ends with a specified suffix value.
static double StringToDouble(const CTempStringEx str, TStringToNumFlags flags=0)
Convert string to double.
static void TruncateSpacesInPlace(string &str, ETrunc where=eTrunc_Both)
Truncate whitespace in a string (in-place)
static bool StartsWith(const CTempString str, const CTempString start, ECase use_case=eCase)
Check if a string starts with a specified prefix value.
static bool EqualNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-insensitive equality of a substring with another string.
static enable_if< is_arithmetic< TNumeric >::value||is_convertible< TNumeric, Int8 >::value, string >::type NumericToString(TNumeric value, TNumToStringFlags flags=0, int base=10)
Convert numeric value to string.
@ fAllowTrailingSpaces
Ignore trailing whitespace characters.
@ eNocase
Case insensitive compare.
const GenericPointer< typename T::ValueType > T2 value
const unsigned short port_high_limit
const unsigned int default_max_threads
const unsigned int default_init_threads
const unsigned short port_low_limit
const unsigned int max_threads_high_limit
const unsigned int max_connections_low_limit
const unsigned int default_max_connections
const unsigned int max_threads_low_limit
const unsigned int init_threads_high_limit
const unsigned int init_threads_low_limit
const unsigned int max_connections_high_limit
const unsigned int default_network_timeout
CJsonNode NSTGetBackendConfiguration(const IRegistry ®, CNetStorageServer *server, vector< string > &warnings)
static bool NSTValidateDouble(const IRegistry ®, const string §ion, const string &entry, vector< string > &warnings)
static string NSTRegValName(const string §ion, const string &entry)
static void NSTValidateDatabaseSection(const IRegistry ®, vector< string > &warnings)
static void NSTValidateProlongValue(const IRegistry ®, const string §ion, const string &entry, vector< string > &warnings)
static bool NSTValidateBool(const IRegistry ®, const string §ion, const string &entry, vector< string > &warnings)
TNSTDBValue< CTimeSpan > ReadTimeSpan(const string ®_value, bool allow_infinity)
static void NSTValidateServerSection(const IRegistry ®, vector< string > &warnings, bool throw_port_exception)
static bool NSTValidateString(const IRegistry ®, const string §ion, const string &entry, vector< string > &warnings)
static void NSTValidateServices(const IRegistry ®, vector< string > &warnings)
static void NSTValidateMetadataSection(const IRegistry ®, vector< string > &warnings)
static string NSTOutOfLimitMessage(const string §ion, const string &entry, unsigned int low_limit, unsigned int high_limit)
static bool NSTValidateInt(const IRegistry ®, const string §ion, const string &entry, vector< string > &warnings)
void NSTValidateConfigFile(const IRegistry ®, vector< string > &warnings, bool throw_port_exception)
static void NSTValidateTTLValue(const IRegistry ®, const string §ion, const string &entry, vector< string > &warnings)
const double default_execute_sp_timeout
static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
bool operator()(const string &m)
SCaseInsensitivePredicate(const string &pattern)
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