1 #ifndef NETSCHEDULE_SERVER__HPP
2 #define NETSCHEDULE_SERVER__HPP
160 const string & qname,
161 const string & qclass,
162 const string & description);
164 const string & qname);
181 const string & class_name)
const;
193 const string & user);
195 const string & user);
197 const string & message);
300 #if defined(_DEBUG) && !defined(NDEBUG)
Pool of recycled CCompoundID objects.
unsigned int Get(const string &qname)
void Set(const string &qname, unsigned int value)
void Serialize(void) const
Host for background threads.
NetScheduler threaded server.
const CNetScheduleAccessList & GetAdminHosts(void) const
unsigned int GetReserveDumpSpace(void) const
unsigned int m_MaxClientData
string ResolveService(const string &service) const
string GetSessionID(void) const
string GetQueueNames(const string &sep) const
CFastMutex m_ServicesLock
string GetDebugGarbage(void) const
string GetDiskConfigFileChecksum(void) const
unsigned int m_ReserveDumpSpace
void SetJobsStartID(const string &qname, unsigned int value)
SErrorEmulatorParameter GetDebugConnDropBeforeWrite(void) const
unsigned GetHostNetAddr() const
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)
SErrorEmulatorParameter GetDebugFDCount(void) const
unsigned int m_JobCountersInterval
bool m_AnybodyCanReconfigure
unsigned GetInactivityTimeout(void) const
static CNetScheduleServer * GetInstance(void)
CNetScheduleBackgroundHost m_BackgroundHost
unsigned GetScanBatchSize(void) const
string SerializeAlerts(void) const
unsigned int m_ScanBatchSize
string GetStateTransitionPerfLogClasses(void) const
string GetNodeID(void) const
bool AdminHostValid(unsigned host) const
bool GetRefuseSubmits() const
unsigned int DecrementCurrentSubmitsCounter(void)
unsigned int m_StatInterval
void SetAnybodyCanReconfigure(bool val)
static CNetScheduleServer * sm_netschedule_server
CJsonNode x_SetAdminClientNames(const string &client_names)
SErrorEmulatorParameter GetDebugConnDropAfterWrite(void) const
void RegisterAlert(EAlertType alert_type, const string &message)
unsigned int GetJobsStartID(const string &qname)
bool m_LogCleaningThreadFlag
SErrorEmulatorParameter debug_write_delay
const bool & IsLogNotificationThread() const
SNSRegistryParameters m_ScopeRegistrySettings
string GetStateTransitionPerfLogQueues(void) const
vector< string > m_AdminClientNames
unsigned int m_DeleteBatchSize
void SetDrainShutdown(void)
vector< string > GetRefuseSubmitQueues(void) const
unsigned int IncrementCurrentSubmitsCounter(void)
string m_DiskConfigFileChecksum
enum EAlertAckResult AcknowledgeAlert(const string &id, const string &user)
string PrintTransitionCounters(void)
const bool & IsLogExecutionWatcherThread() const
CNetScheduleServer(const string &dbpath, bool diskless)
NetScheduler threaded server implementation.
SNSRegistryParameters GetAffRegistrySettings(void) const
void CreateDynamicQueue(const CNSClientId &client, const string &qname, const string &qclass, const string &description)
const unsigned int & GetJobCountersInterval() const
const unsigned int & GetStatInterval() const
const bool & IsLogBatchEachJob() const
SErrorEmulatorParameter GetDebugWriteDelay(void) const
SNSRegistryParameters m_AffRegistrySettings
bool m_LogBatchEachJobFlag
unsigned int m_InactivityTimeout
CJsonNode SetNSParameters(const SNS_Parameters &new_params, bool limited)
CNetScheduleAccessList m_AdminHosts
unsigned int GetMaxClientData(void) const
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.
const bool & IsLogCleaningThread() const
CQueueDataBase * m_QueueDB
SQueueParameters QueueInfo(const string &qname) const
unsigned GetMarkdelBatchSize(void) const
bool m_LogStatisticsThreadFlag
void SetDiskConfigFileChecksum(const string &checksum)
unsigned GetDeleteBatchSize(void) const
string GetServiceToQueueSectionConfig(void) const
void AddDefaultListener(IServer_ConnectionFactory *factory)
unsigned CountActiveJobs() const
SErrorEmulatorParameter debug_mem_count
bool GetUseHostname(void) const
virtual void Exit()
Cleanup the server.
void LoadJobsStartIDs(void)
map< string, int > GetPauseQueues(void) const
CRWLock m_STPerfLogQCLock
string x_GenerateGUID(void) const
unsigned int Configure(const IRegistry ®, CJsonNode &diff)
SErrorEmulatorParameter GetDebugMemCount(void) const
const CTime & GetStartTime(void) const
bool WasDBDrained(void) const
virtual ~CNetScheduleServer()
bool IsAdminClientName(const string &name) const
CAtomicCounter m_CurrentSubmitsCounter
bool IsDrainShutdown(void) const
bool ShouldPerfLogTransitions(const string &queue_name, const string &class_name) const
SErrorEmulatorParameter debug_reply_with_garbage
SErrorEmulatorParameter GetDebugReplyWithGarbage(void) const
double GetPurgeTimeout(void) const
void SetRefuseSubmits(bool val)
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
CCompoundIDPool GetCompoundIDPool(void) const
const bool & IsLogStatisticsThread() const
string GetRAMConfigFileChecksum(void) const
string GetDataPath(void) const
CJsonNode ReadServicesConfig(const CNcbiRegistry ®)
unsigned int GetCurrentSubmitsCounter(void)
string PrintJobsStat(const CNSClientId &client)
SErrorEmulatorParameter debug_conn_drop_before_write
SErrorEmulatorParameter debug_conn_drop_after_write
bool AnybodyCanReconfigure(void) const
bool GetDiskless(void) const
void SetRAMConfigFileChecksum(const string &checksum)
const bool & IsLog() const
SNSRegistryParameters GetScopeRegistrySettings(void) const
unsigned int m_MarkdelBatchSize
bool m_LogNotificationThreadFlag
string GetQueueConfig(void) const
string GetQueueClassesConfig(void) const
void SerializeJobsStartIDs(void)
CRWLock m_AdminClientsLock
vector< string > m_StateTransitionPerfLogClasses
CRef< CQueue > OpenQueue(const string &name)
CCompoundIDPool m_CompoundIDPool
SNSRegistryParameters GetGroupRegistrySettings(void) const
vector< string > m_StateTransitionPerfLogQueues
CBackgroundHost & GetBackgroundHost()
IServer_ConnectionFactory::
TValue Add(int delta) THROWS_NONE
Atomically add value (=delta), and return new counter value.
TValue Get(void) const THROWS_NONE
Get atomic counter value.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
const GenericPointer< typename T::ValueType > T2 value
const unsigned int kSubmitCounterInitialValue
Framework to create multithreaded network servers with thread-per-request scheduling.
static CNamedPipeClient * client