本文整理汇总了C++中IRegistry::GetEncryptedString方法的典型用法代码示例。如果您正苦于以下问题:C++ IRegistry::GetEncryptedString方法的具体用法?C++ IRegistry::GetEncryptedString怎么用?C++ IRegistry::GetEncryptedString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IRegistry
的用法示例。
在下文中一共展示了IRegistry::GetEncryptedString方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Read
// A configuration file is always already validated so the reading
// must not produce any log output etc.
// See ns_util.cpp NS_ValidateConfigFile(...)
void SNS_Parameters::Read(const IRegistry & reg)
{
const string sname = "server";
max_connections = GetIntNoErr("max_connections", default_max_connections);
if (max_connections < max_connections_low_limit)
max_connections = (max_connections_low_limit +
max_connections_high_limit) / 2;
else if (max_connections > max_connections_high_limit)
max_connections = max_connections_high_limit;
max_threads = GetIntNoErr("max_threads", default_max_threads);
init_threads = GetIntNoErr("init_threads", default_init_threads);
if (init_threads > max_threads)
init_threads = max_threads;
port = (unsigned short) GetIntNoErr("port", 0);
use_hostname = GetBoolNoErr("use_hostname", default_use_hostname);
network_timeout = GetIntNoErr("network_timeout", default_network_timeout);
if (network_timeout == 0)
network_timeout = default_network_timeout;
// Logging parameters
is_log = GetBoolNoErr("log", default_is_log);
log_batch_each_job = GetBoolNoErr("log_batch_each_job",
default_log_batch_each_job);
log_notification_thread = GetBoolNoErr("log_notification_thread",
default_log_notification_thread);
log_cleaning_thread = GetBoolNoErr("log_cleaning_thread",
default_log_cleaning_thread);
log_execution_watcher_thread = GetBoolNoErr("log_execution_watcher_thread",
default_log_execution_watcher_thread);
log_statistics_thread = GetBoolNoErr("log_statistics_thread",
default_log_statistics_thread);
// Job deleting parameters
del_batch_size = GetIntNoErr("del_batch_size", default_del_batch_size);
markdel_batch_size = GetIntNoErr("markdel_batch_size",
default_markdel_batch_size);
scan_batch_size = GetIntNoErr("scan_batch_size", default_scan_batch_size);
purge_timeout = GetDoubleNoErr("purge_timeout", default_purge_timeout);
x_CheckJobGarbageCollectorSettings();
stat_interval = GetIntNoErr("stat_interval", default_stat_interval);
if (stat_interval < 1)
stat_interval = 1;
int val = GetIntNoErr("job_counters_interval",
default_job_counters_interval);
if (val < 0)
job_counters_interval = 0;
else
job_counters_interval = val;
affinity_reg.Read(reg, sname, "affinity",
default_max_affinities,
default_affinity_high_mark_percentage,
default_affinity_low_mark_percentage,
default_affinity_high_removal,
default_affinity_low_removal,
default_affinity_dirt_percentage);
group_reg.Read(reg, sname, "group",
default_max_groups,
default_group_high_mark_percentage,
default_group_low_mark_percentage,
default_group_high_removal,
default_group_low_removal,
default_group_dirt_percentage);
scope_reg.Read(reg, sname, "scope",
default_max_scopes,
default_scope_high_mark_percentage,
default_scope_low_mark_percentage,
default_scope_high_removal,
default_scope_low_removal,
default_scope_dirt_percentage);
reserve_dump_space = NS_GetDataSize(reg, "server", "reserve_dump_space",
default_reserve_dump_space);
wst_cache_size = GetIntNoErr("wst_cache_size",
default_wst_cache_size);
if (wst_cache_size < 0)
wst_cache_size = default_wst_cache_size;
max_client_data = GetIntNoErr("max_client_data", default_max_client_data);
if (max_client_data <= 0)
max_client_data = default_max_client_data;
admin_hosts = reg.GetString(sname, "admin_host", kEmptyStr);
try {
admin_client_names = reg.GetEncryptedString(sname, "admin_client_name",
IRegistry::fPlaintextAllowed);
} catch (...) {
// All the warnings are collected at the time of validating the
// configuration file, so here a problem is simply suppressed
//.........这里部分代码省略.........