NCBI C++ ToolKit
Namespaces | Functions | Variables
server_core.cpp File Reference
#include "task_server_pch.hpp"
#include <corelib/metareg.hpp>
#include <corelib/ncbifile.hpp>
#include "server_core.hpp"
#include "threads_man.hpp"
#include "sockets_man.hpp"
#include "timers.hpp"
#include "logging.hpp"
#include "time_man.hpp"
#include "memory_man.hpp"
#include <string.h>
+ Include dependency graph for server_core.cpp:

Go to the source code of this file.

Go to the SVN repository for this file.

Namespaces

 boost
 

Functions

void boost::assertion_failed (char const *expr, char const *func, char const *file, long line)
 
static bool s_IsReadyForShutdown (void)
 
void TrackShuttingDown (void)
 
static void s_TermHandler (int)
 
static void s_InitSignals (void)
 
static bool s_LoadConfFile (CNcbiRegistry *&reg)
 
static void s_ConfigureTaskServer (const CNcbiRegistry *reg, CTempString section)
 
static bool s_ReadConfiguration (void)
 
string GetConfName (void)
 
void ExtractFileName (const char *file, const char *&file_name, size_t &name_size)
 
static bool s_ProcessParameters (int &argc, const char **argv)
 

Variables

EServerState s_SrvState = eSrvNotInitialized
 
static EServerState s_SeenSDState = eSrvRunning
 
static CSrvTime s_ShutdownStartTime
 
static int s_ShutdownTO = 0
 
static int s_SlowShutdownTO = 10
 
static int s_FastShutdownTO = 2
 
static int s_AbortShutdownTO = 0
 
static CNcbiRegistrys_Registry = NULL
 
static string s_ConfName
 
string s_AppBaseName
 
static CMiniMutex s_SDListLock
 
static TShutdownList s_ShutdownList
 
static const char kSection [] = "task_server"
 

Function Documentation

◆ ExtractFileName()

void ExtractFileName ( const char *  file,
const char *&  file_name,
size_t &  name_size 
)

Definition at line 265 of file server_core.cpp.

References file, and file_name.

Referenced by s_ProcessParameters(), CSrvDiagMsg::StartSrvLog(), and SDiagMessage::Write().

◆ GetConfName()

string GetConfName ( void  )

◆ s_ConfigureTaskServer()

static void s_ConfigureTaskServer ( const CNcbiRegistry reg,
CTempString  section 
)
static

◆ s_InitSignals()

static void s_InitSignals ( void  )
static

Definition at line 142 of file server_core.cpp.

References NULL, and s_TermHandler().

Referenced by CTaskServer::Initialize().

◆ s_IsReadyForShutdown()

static bool s_IsReadyForShutdown ( void  )
static

◆ s_LoadConfFile()

static bool s_LoadConfFile ( CNcbiRegistry *&  reg)
static

◆ s_ProcessParameters()

static bool s_ProcessParameters ( int argc,
const char **  argv 
)
static

◆ s_ReadConfiguration()

static bool s_ReadConfiguration ( void  )
static

◆ s_TermHandler()

static void s_TermHandler ( int  )
static

Definition at line 136 of file server_core.cpp.

References eSrvFastShutdown, and CTaskServer::RequestShutdown().

Referenced by s_InitSignals().

◆ TrackShuttingDown()

void TrackShuttingDown ( void  )

Variable Documentation

◆ kSection

const char kSection[] = "task_server"
static

◆ s_AbortShutdownTO

int s_AbortShutdownTO = 0
static

◆ s_AppBaseName

string s_AppBaseName

◆ s_ConfName

string s_ConfName
static

Definition at line 76 of file server_core.cpp.

Referenced by GetConfName(), s_LoadConfFile(), and s_ProcessParameters().

◆ s_FastShutdownTO

int s_FastShutdownTO = 2
static

◆ s_Registry

CNcbiRegistry* s_Registry = NULL
static

◆ s_SDListLock

CMiniMutex s_SDListLock
static

Definition at line 78 of file server_core.cpp.

Referenced by CTaskServer::AddShutdownCallback(), and s_IsReadyForShutdown().

◆ s_SeenSDState

EServerState s_SeenSDState = eSrvRunning
static

Definition at line 69 of file server_core.cpp.

Referenced by TrackShuttingDown().

◆ s_ShutdownList

TShutdownList s_ShutdownList
static

Definition at line 79 of file server_core.cpp.

Referenced by CTaskServer::AddShutdownCallback(), and s_IsReadyForShutdown().

◆ s_ShutdownStartTime

CSrvTime s_ShutdownStartTime
static

Definition at line 70 of file server_core.cpp.

Referenced by TrackShuttingDown().

◆ s_ShutdownTO

int s_ShutdownTO = 0
static

Definition at line 71 of file server_core.cpp.

Referenced by CTaskServer::RequestShutdown(), and TrackShuttingDown().

◆ s_SlowShutdownTO

int s_SlowShutdownTO = 10
static

◆ s_SrvState

Modified on Fri Sep 20 14:57:24 2024 by modify_doxy.py rev. 669887