NCBI C++ ToolKit
Functions | Variables
ns_util.cpp File Reference
#include <ncbi_pch.hpp>
#include "ns_util.hpp"
#include "ns_queue.hpp"
#include "ns_ini_params.hpp"
#include "ns_queue_parameters.hpp"
#include "queue_database.hpp"
#include <util/bitset/bmalgo.h>
#include <util/checksum.hpp>
#include <connect/ncbi_socket.hpp>
#include <unistd.h>
+ Include dependency graph for ns_util.cpp:

Go to the source code of this file.

Go to the SVN repository for this file.

Functions

static void NS_ValidateServerSection (const IRegistry &reg, vector< string > &warnings, bool throw_port_exception, bool &decrypting_error)
 
static void NS_ValidateQueuesAndClasses (const IRegistry &reg, list< string > &queues, vector< string > &warnings)
 
static TQueueParams NS_ValidateClasses (const IRegistry &reg, vector< string > &warnings)
 
static void NS_ValidateQueues (const IRegistry &reg, const TQueueParams &qclasses, list< string > &queues, vector< string > &warnings)
 
static void NS_ValidateServiceToQueueSection (const IRegistry &reg, const list< string > &queues, vector< string > &warnings)
 
static string NS_OutOfLimitMessage (const string &section, const string &entry, unsigned int low_limit, unsigned int high_limit)
 
static void NS_ValidateRegistrySettings (const IRegistry &reg, const string &section, const string &name, unsigned int default_max, unsigned int default_high_mark_percentage, unsigned int default_low_mark_percentage, unsigned int default_high_removal, unsigned int default_low_removal, unsigned int default_dirt_percentage, vector< string > &warnings)
 
string NS_RegValName (const string &section, const string &entry)
 
bool NS_ValidateDouble (const IRegistry &reg, const string &section, const string &entry, vector< string > &warnings)
 
bool NS_ValidateBool (const IRegistry &reg, const string &section, const string &entry, vector< string > &warnings)
 
bool NS_ValidateInt (const IRegistry &reg, const string &section, const string &entry, vector< string > &warnings)
 
bool NS_ValidateString (const IRegistry &reg, const string &section, const string &entry, vector< string > &warnings)
 
bool NS_ValidateDataSize (const IRegistry &reg, const string &section, const string &entry, vector< string > &warnings)
 
unsigned int NS_GetDataSize (const IRegistry &reg, const string &section, const string &entry, unsigned int default_val)
 
void NS_ValidateConfigFile (const IRegistry &reg, vector< string > &warnings, bool throw_port_exception, bool &decrypting_error)
 
string NS_GetConfigFileChecksum (const string &file_name, vector< string > &warnings)
 

Variables

static const string s_ErrorGettingChecksum = "error detected"
 

Function Documentation

◆ NS_GetConfigFileChecksum()

string NS_GetConfigFileChecksum ( const string file_name,
vector< string > &  warnings 
)

◆ NS_GetDataSize()

unsigned int NS_GetDataSize ( const IRegistry reg,
const string section,
const string entry,
unsigned int  default_val 
)

◆ NS_OutOfLimitMessage()

string NS_OutOfLimitMessage ( const string section,
const string entry,
unsigned int  low_limit,
unsigned int  high_limit 
)
static

Definition at line 590 of file ns_util.cpp.

References g_ValidPrefix, and NS_RegValName().

Referenced by NS_ValidateServerSection().

◆ NS_RegValName()

string NS_RegValName ( const string section,
const string entry 
)

Definition at line 83 of file ns_util.cpp.

Referenced by NS_OutOfLimitMessage(), NS_ValidateBool(), NS_ValidateDataSize(), NS_ValidateDouble(), NS_ValidateInt(), NS_ValidateRegistrySettings(), NS_ValidateServerSection(), NS_ValidateServiceToQueueSection(), NS_ValidateString(), SQueueParameters::ReadBlacklistTime(), SQueueParameters::ReadClientRegistryMinAdmins(), SQueueParameters::ReadClientRegistryMinReaders(), SQueueParameters::ReadClientRegistryMinSubmitters(), SQueueParameters::ReadClientRegistryMinUnknowns(), SQueueParameters::ReadClientRegistryMinWorkerNodes(), SQueueParameters::ReadClientRegistryTimeoutAdmin(), SQueueParameters::ReadClientRegistryTimeoutReader(), SQueueParameters::ReadClientRegistryTimeoutSubmitter(), SQueueParameters::ReadClientRegistryTimeoutUnknown(), SQueueParameters::ReadClientRegistryTimeoutWorkerNode(), SQueueParameters::ReadDescription(), SQueueParameters::ReadDumpAffBufferSize(), SQueueParameters::ReadDumpBufferSize(), SQueueParameters::ReadDumpClientBufferSize(), SQueueParameters::ReadDumpGroupBufferSize(), SQueueParameters::ReadFailedRetries(), SQueueParameters::ReadLinkedSections(), SQueueParameters::ReadMaxInputSize(), SQueueParameters::ReadMaxJobsPerClient(), SQueueParameters::ReadMaxOutputSize(), SQueueParameters::ReadMaxPendingReadWaitTimeout(), SQueueParameters::ReadMaxPendingWaitTimeout(), SQueueParameters::ReadNotifHandicap(), SQueueParameters::ReadNotifHifreqInterval(), SQueueParameters::ReadNotifHifreqPeriod(), SQueueParameters::ReadNotifLofreqMult(), SQueueParameters::ReadPendingTimeout(), SQueueParameters::ReadProgram(), SQueueParameters::ReadQueue(), SQueueParameters::ReadReadBlacklistTime(), SQueueParameters::ReadReaderHosts(), SQueueParameters::ReadReaderTimeout(), SQueueParameters::ReadReadFailedRetries(), SQueueParameters::ReadReadTimeout(), SQueueParameters::ReadRunTimeout(), SQueueParameters::ReadSubmHosts(), SQueueParameters::ReadTimeout(), SQueueParameters::ReadWnodeHosts(), and SQueueParameters::ReadWnodeTimeout().

◆ NS_ValidateBool()

bool NS_ValidateBool ( const IRegistry reg,
const string section,
const string entry,
vector< string > &  warnings 
)

◆ NS_ValidateClasses()

static TQueueParams NS_ValidateClasses ( const IRegistry reg,
vector< string > &  warnings 
)
static

◆ NS_ValidateConfigFile()

void NS_ValidateConfigFile ( const IRegistry reg,
vector< string > &  warnings,
bool  throw_port_exception,
bool decrypting_error 
)

◆ NS_ValidateDataSize()

bool NS_ValidateDataSize ( const IRegistry reg,
const string section,
const string entry,
vector< string > &  warnings 
)

◆ NS_ValidateDouble()

bool NS_ValidateDouble ( const IRegistry reg,
const string section,
const string entry,
vector< string > &  warnings 
)

◆ NS_ValidateInt()

bool NS_ValidateInt ( const IRegistry reg,
const string section,
const string entry,
vector< string > &  warnings 
)

◆ NS_ValidateQueues()

static void NS_ValidateQueues ( const IRegistry reg,
const TQueueParams qclasses,
list< string > &  queues,
vector< string > &  warnings 
)
static

◆ NS_ValidateQueuesAndClasses()

static void NS_ValidateQueuesAndClasses ( const IRegistry reg,
list< string > &  queues,
vector< string > &  warnings 
)
static

Definition at line 467 of file ns_util.cpp.

References NS_ValidateClasses(), and NS_ValidateQueues().

Referenced by NS_ValidateConfigFile().

◆ NS_ValidateRegistrySettings()

static void NS_ValidateRegistrySettings ( const IRegistry reg,
const string section,
const string name,
unsigned int  default_max,
unsigned int  default_high_mark_percentage,
unsigned int  default_low_mark_percentage,
unsigned int  default_high_removal,
unsigned int  default_low_removal,
unsigned int  default_dirt_percentage,
vector< string > &  warnings 
)
static

Definition at line 648 of file ns_util.cpp.

References g_ValidPrefix, IRegistry::GetInt(), NS_RegValName(), NS_ValidateInt(), ok, and val.

Referenced by NS_ValidateServerSection().

◆ NS_ValidateServerSection()

static void NS_ValidateServerSection ( const IRegistry reg,
vector< string > &  warnings,
bool  throw_port_exception,
bool decrypting_error 
)
static

◆ NS_ValidateServiceToQueueSection()

static void NS_ValidateServiceToQueueSection ( const IRegistry reg,
const list< string > &  queues,
vector< string > &  warnings 
)
static

◆ NS_ValidateString()

bool NS_ValidateString ( const IRegistry reg,
const string section,
const string entry,
vector< string > &  warnings 
)

Variable Documentation

◆ s_ErrorGettingChecksum

const string s_ErrorGettingChecksum = "error detected"
static

Definition at line 602 of file ns_util.cpp.

Referenced by NS_GetConfigFileChecksum().

Modified on Sun Apr 14 05:27:41 2024 by modify_doxy.py rev. 669887