A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/ns__server_8cpp_source.html below:

NCBI C++ ToolKit: src/app/netschedule/ns_server.cpp Source File

50

: m_BackgroundHost(this),

64

m_RefuseSubmits(

false

),

75

m_NodeID(

"not_initialized"

),

76

m_SessionID(

"s"

+ x_GenerateGUID()),

77

m_StartIDs(dbpath, diskless),

78

m_AnybodyCanReconfigure(

false

),

112

changes.

SetByKey

(

"log"

, values);

121

changes.

SetByKey

(

"log_batch_each_job"

, values);

130

changes.

SetByKey

(

"log_notification_thread"

, values);

139

changes.

SetByKey

(

"log_cleaning_thread"

, values);

148

changes.

SetByKey

(

"log_execution_watcher_thread"

, values);

157

changes.

SetByKey

(

"log_statistics_thread"

, values);

165

changes.

SetByKey

(

"stat_interval"

, values);

173

changes.

SetByKey

(

"job_counters_interval"

, values);

181

changes.

SetByKey

(

"max_client_data"

, values);

186  if

(accepted_hosts.

GetSize

() > 0)

187

changes.

SetByKey

(

"admin_host"

, accepted_hosts);

192  if

(admin_diff.

GetSize

() > 0)

193

changes.

SetByKey

(

"admin_client_name"

, admin_diff);

195  CJsonNode

state_transition_perf_log_queues_diff =

199  if

(state_transition_perf_log_queues_diff.

GetSize

() > 0)

200

changes.

SetByKey

(

"state_transition_perf_log_queues"

,

201

state_transition_perf_log_queues_diff);

203  CJsonNode

state_transition_perf_log_classes_diff =

207  if

(state_transition_perf_log_classes_diff.

GetSize

() > 0)

208

changes.

SetByKey

(

"state_transition_perf_log_classes"

,

209

state_transition_perf_log_classes_diff);

215

changes.

SetByKey

(

"network_timeout"

, values);

223

changes.

SetByKey

(

"reserve_dump_space"

, values);

237

changes.

SetByKey

(

"max_connections"

, values);

246

what_changed.

SetByKey

(

"server_changes"

, changes);

248  #if defined(_DEBUG) && !defined(NDEBUG) 294  const string

section =

"service_to_queue"

;

302  for

(list<string>::const_iterator k =

entries

.begin();

304  string

service_name = *k;

305  string

qname = reg.

Get

(

"service_to_queue"

, service_name);

314

new_services[service_name] = qname;

323

k != new_services.

end

(); ++k) {

333  if

(found->second != k->second) {

337

changed_items.

SetByKey

(k->first, vals);

344  for

(found = new_services.

begin

(); found != new_services.

end

(); ++found)

348  if

(found == new_services.

end

())

354

diff.

SetByKey

(

"services_added"

, new_items);

356  if

(deleted_items.

GetSize

() > 0)

357

diff.

SetByKey

(

"services_deleted"

, deleted_items);

359  if

(changed_items.

GetSize

() > 0)

360

diff.

SetByKey

(

"services_changed"

, changed_items);

412  const string

& qname,

413  const string

& qclass,

414  const string

& description)

491  output

=

"\n[service_to_queue]"

;

495  output

+= k->first +

"=\""

+ k->second +

"\""

;

559  for

(vector<string>::const_iterator

575  for

(vector<string>::const_iterator

588  const string

& class_name)

const 591  for

(vector<string>::const_iterator

600  if

(!class_name.empty()) {

601  for

(vector<string>::const_iterator

644  const string

& message)

665  if

(node_id_file.

Exists

()) {

709  ctx

->SetRequestID();

715

extra.

Print

(

"_type"

,

"cmd"

)

716

.

Print

(

"_queue"

,

""

)

717

.

Print

(

"cmd"

,

"SHUTDOWN"

)

721  ctx

->SetRequestStatus(200);

736  Int8

current_time = time(0);

738  return

to_string((pid << 32) | current_time);

749

vector<string> old = to;

754  sort

(to.begin(), to.end());

760  for

(vector<string>::const_iterator k = old.begin();

763  for

(vector<string>::const_iterator k = to.begin();

Class for support low level input/output for files.

void AppendBoolean(bool value)

For an array node, add a boolean node at the end of the array.

size_t GetSize() const

For a container node (that is, either an array or an object), return the number of elements in the co...

static CJsonNode NewArrayNode()

Create a new JSON array node.

void AppendInteger(Int8 value)

For an array node, add a integer node at the end of the array.

void AppendString(const string &value)

For an array node, add a string node at the end of the array.

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.

void Append(CJsonNode::TInstance value)

For an array node, add a new element at the end of the array.

string GetURLEncoded(void) const

string Serialize(void) const

enum EAlertAckResult Acknowledge(const string &alert_id, const string &user)

void Register(enum EAlertType alert_type, const string &message)

bool IsAllowed(unsigned int ha) const

CJsonNode SetHosts(const string &host_names)

NetScheduler threaded server.

unsigned int m_MaxClientData

string ResolveService(const string &service) const

string GetQueueNames(const string &sep) const

CFastMutex m_ServicesLock

unsigned int m_ReserveDumpSpace

void GetServices(map< string, string > &services) const

map< string, string > m_Services

string GetAdminClientNames(void) const

CJsonNode x_SetFromList(const string &from, vector< string > &to, CRWLock &lock)

unsigned int m_JobCountersInterval

static CNetScheduleServer * GetInstance(void)

string SerializeAlerts(void) const

unsigned int m_ScanBatchSize

string GetStateTransitionPerfLogClasses(void) const

bool AdminHostValid(unsigned host) const

unsigned int m_StatInterval

static CNetScheduleServer * sm_netschedule_server

void RegisterAlert(EAlertType alert_type, const string &message)

bool m_LogCleaningThreadFlag

SErrorEmulatorParameter debug_write_delay

SNSRegistryParameters m_ScopeRegistrySettings

string GetStateTransitionPerfLogQueues(void) const

vector< string > m_AdminClientNames

unsigned int m_DeleteBatchSize

vector< string > GetRefuseSubmitQueues(void) const

string m_DiskConfigFileChecksum

enum EAlertAckResult AcknowledgeAlert(const string &id, const string &user)

string PrintTransitionCounters(void)

CNetScheduleServer(const string &dbpath, bool diskless)

NetScheduler threaded server implementation.

void CreateDynamicQueue(const CNSClientId &client, const string &qname, const string &qclass, const string &description)

SNSRegistryParameters m_AffRegistrySettings

bool m_LogBatchEachJobFlag

unsigned int m_InactivityTimeout

CJsonNode SetNSParameters(const SNS_Parameters &new_params, bool limited)

CNetScheduleAccessList m_AdminHosts

string GetAlerts(void) const

string GetQueueClassesInfo(void) const

void SetShutdownFlag(int signum=0, bool db_was_drained=false)

SErrorEmulatorParameter debug_fd_count

string GetQueueInfo(void) const

void SetQueueDB(CQueueDataBase *qdb)

virtual bool ShutdownRequested(void)

Runs synchronously between iterations.

CQueueDataBase * m_QueueDB

SQueueParameters QueueInfo(const string &qname) const

bool m_LogStatisticsThreadFlag

void SetDiskConfigFileChecksum(const string &checksum)

string GetServiceToQueueSectionConfig(void) const

void AddDefaultListener(IServer_ConnectionFactory *factory)

unsigned CountActiveJobs() const

SErrorEmulatorParameter debug_mem_count

virtual void Exit()

Cleanup the server.

map< string, int > GetPauseQueues(void) const

CRWLock m_STPerfLogQCLock

string x_GenerateGUID(void) const

unsigned int Configure(const IRegistry &reg, CJsonNode &diff)

virtual ~CNetScheduleServer()

bool IsAdminClientName(const string &name) const

CAtomicCounter m_CurrentSubmitsCounter

bool ShouldPerfLogTransitions(const string &queue_name, const string &class_name) const

SErrorEmulatorParameter debug_reply_with_garbage

SNSRegistryParameters m_GroupRegistrySettings

void DeleteDynamicQueue(const CNSClientId &client, const string &qname)

bool m_LogExecutionWatcherThreadFlag

string GetLinkedSectionConfig(void) const

void InitNodeID(const string &db_path)

string m_RAMConfigFileChecksum

string GetDataPath(void) const

CJsonNode ReadServicesConfig(const CNcbiRegistry &reg)

string PrintJobsStat(const CNSClientId &client)

SErrorEmulatorParameter debug_conn_drop_before_write

SErrorEmulatorParameter debug_conn_drop_after_write

void SetRAMConfigFileChecksum(const string &checksum)

const bool & IsLog() const

unsigned int m_MarkdelBatchSize

bool m_LogNotificationThreadFlag

string GetQueueConfig(void) const

string GetQueueClassesConfig(void) const

CRWLock m_AdminClientsLock

vector< string > m_StateTransitionPerfLogClasses

CRef< CQueue > OpenQueue(const string &name)

vector< string > m_StateTransitionPerfLogQueues

string PrintJobsStat(const CNSClientId &client)

SQueueParameters QueueInfo(const string &qname) const

string GetQueueConfig(void) const

time_t Configure(const IRegistry &reg, CJsonNode &diff)

void CreateDynamicQueue(const CNSClientId &client, const string &qname, const string &qclass, const string &description="")

string GetDataPath(void) const

string GetQueueInfo(void) const

void DeleteDynamicQueue(const CNSClientId &client, const string &qname)

map< string, int > GetPauseQueues(void) const

string GetQueueClassesConfig(void) const

bool QueueExists(const string &qname) const

vector< string > GetRefuseSubmitQueues(void) const

string GetQueueNames(const string &sep) const

string PrintTransitionCounters(void)

string GetLinkedSectionConfig(void) const

unsigned int CountActiveJobs(void) const

CRef< CQueue > OpenQueue(const string &name)

string GetQueueClassesInfo(void) const

IServer_ConnectionFactory::

container_type::const_iterator const_iterator

const_iterator begin() const

const_iterator end() const

static SQLCHAR output[256]

void Set(TValue new_value) THROWS_NONE

Set atomic counter value.

void PrintRequestStop(void)

Print request stop message (for request-driven applications)

CDiagContext_Extra & Print(const string &name, const string &value)

The method does not print the argument, but adds it to the string.

CDiagContext & GetDiagContext(void)

Get diag context instance.

static void SetRequestContext(CRequestContext *ctx)

Shortcut to CDiagContextThreadData::GetThreadData().SetRequestContext()

void PrintRequestStart(const string &message)

Print request start message (for request-driven applications)

void Flush(void)

Print the message and reset object.

static string MakePath(const string &dir=kEmptyStr, const string &base=kEmptyStr, const string &ext=kEmptyStr)

Assemble a path from basic components.

static string AddTrailingPathSeparator(const string &path)

Add trailing path separator, if needed.

const string & GetPath(void) const

Get entry path.

virtual bool Exists(void) const

Check existence of file.

@ eRead

File can be read.

@ eReadWrite

File can be read and written.

@ eOpen

Open an existing file, or create a new one.

@ eCreate

Create a new file, or truncate an existing one.

int64_t Int8

8-byte (64-bit) signed integer

static TPid GetPid(void)

Get process identifier (pid) for the current process.

virtual const string & Get(const string &section, const string &name, TFlags flags=0) const

Get the parameter value.

virtual void EnumerateEntries(const string &section, list< string > *entries, TFlags flags=fAllLayers) const

Enumerate parameter names for a specified section.

static CNCBI_IPAddr gethostbyname(const string &host, ESwitch log=eOff)

Return 0 or empty address on error.

static string gethostname(ESwitch log=eOff)

Return empty string on error.

static string ntoa(const CNCBI_IPAddr &addr)

BSD-like API.

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 list< string > & Split(const CTempString str, const CTempString delim, list< string > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL)

Split a string using specified delimiters.

static void TruncateSpacesInPlace(string &str, ETrunc where=eTrunc_Both)

Truncate whitespace in a string (in-place)

@ fSplit_MergeDelimiters

Merge adjacent delimiters.

@ eTrunc_End

Truncate trailing whitespace only.

void GetParameters(SServer_Parameters *params)

void AddListener(IServer_ConnectionFactory *factory, unsigned short port)

Register a listener.

unsigned short m_Port

TCP port to listen on.

void SetParameters(const SServer_Parameters &new_params)

unsigned int max_connections

Maximum # of open connections.

CTime GetFastLocalTime(void)

Quick and dirty getter of local time.

constexpr auto sort(_Init &&init)

const bool default_log_batch_each_job

const double default_purge_timeout

const unsigned int default_stat_interval

const bool default_log_cleaning_thread

const bool default_log_execution_watcher_thread

const unsigned int default_max_client_data

const bool default_log_notification_thread

const unsigned int default_markdel_batch_size

const bool default_is_log

const unsigned int default_reserve_dump_space

const unsigned int default_del_batch_size

const unsigned int default_job_counters_interval

const bool default_log_statistics_thread

const bool default_use_hostname

const unsigned int default_scan_batch_size

const unsigned int default_network_timeout

const unsigned int kSubmitCounterInitialValue

const string kNodeIDFileName("NODE_ID")

Defines CRequestContext class for NCBI C++ diagnostic API.

static CNamedPipeClient * client

SNSRegistryParameters group_reg

string state_transition_perf_log_classes

unsigned int del_batch_size

SErrorEmulatorParameter debug_mem_count

string state_transition_perf_log_queues

SErrorEmulatorParameter debug_fd_count

unsigned int stat_interval

unsigned int markdel_batch_size

SErrorEmulatorParameter debug_write_delay

bool log_notification_thread

unsigned int reserve_dump_space

SNSRegistryParameters affinity_reg

SErrorEmulatorParameter debug_conn_drop_after_write

SErrorEmulatorParameter debug_conn_drop_before_write

unsigned int scan_batch_size

string admin_client_names

SErrorEmulatorParameter debug_reply_with_garbage

unsigned int job_counters_interval

SNSRegistryParameters scope_reg

unsigned int max_client_data

bool log_statistics_thread

bool log_execution_watcher_thread

static wxAcceleratorEntry entries[3]


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