BDB_ENV_KEEPER_VERSION \
59" build " __DATE__ " " __TIME__
92 virtual void OnOpen(
void);
110 stringret(
size,
'\0');
122 if(
cmd==
"VERSION") {
127 if(
cmd==
"SHUT"||
cmd==
"SHUTDOWN") {
128 string msg=
"Shutdown initiated.\n";
132 string msg=
"Incorrect command.\n";
159 virtual void Init(
void);
160 virtual int Run(
void);
168arg_desc->SetUsageContext(
GetArguments().GetProgramBasename(),
169 "BDB Environment Keeper");
194 #if defined(NCBI_OS_UNIX) 202 #if defined(NCBI_OS_UNIX) 204 LOG_POST(
"Entering UNIX daemon mode...");
220 unsigned shortport =
239 if(
env->IsTransactional()) {
240 env->ForceTransactionCheckpoint();
244 if(
env->CheckRemove()) {
246<<
"Environment has been unmounted and deleted.");
249<<
"Environment still in use. Cannot delete it.");
261 int main(
intargc,
const char* argv[])
Wrapper around Berkeley DB environment structure.
static string s_ReadStrFromBUF(BUF buf)
static CBDBEnvKeeperServer * s_server
int main(int argc, const char *argv[])
void Server_SignalHandler(int signum)
#define BDB_ENV_KEEPER_FULL_VERSION
static STimeout kAcceptTimeout
virtual int Run(void)
Run the application.
virtual void Init(void)
Initialize the application.
IServer_ConnectionHandler * Create(void)
CBDBEnvKeeperServer * m_Server
CBDBEnvKeeperConnectionFactory(CBDBEnvKeeperServer *server)
Actual event (command) responder (session state machine)
virtual void OnWrite(void)
The client is ready to receive data.
virtual void OnMessage(BUF buf)
CBDBEnvKeeperConnectionHandler(CBDBEnvKeeperServer *server)
virtual void OnOpen(void)
Runs in response to an external event [asynchronous].
CBDBEnvKeeperServer * m_Server
virtual bool ShutdownRequested(void)
Runs synchronously between iterations.
volatile bool m_ShutdownRequested
void RequestShutdown(void)
IServer_ConnectionFactory::
IServer_ConnectionHandler::
IServer_LineMessageHandler::
const CNcbiRegistry & GetConfig(void) const
Get the application's cached configuration parameters (read-only).
int AppMain(int argc, const char *const *argv, const char *const *envp=0, EAppDiagStream diag=eDS_Default, const char *conf=NcbiEmptyCStr, const string &name=NcbiEmptyString)
Main function (entry point) for the NCBI application.
virtual void SetupArgDescriptions(CArgDescriptions *arg_desc)
Setup the command line argument descriptions.
const CNcbiArguments & GetArguments(void) const
Get the application's cached unprocessed command-line arguments.
CBDB_Env * BDB_CreateEnv(const CNcbiRegistry ®, const string §ion_name)
Create and configure BDB environment using CNcbiRegistry as a parameter container.
size_t BUF_Read(BUF buf, void *data, size_t size)
#define ERR_POST(message)
Error posting with file, line number information but without error codes.
#define LOG_POST(message)
This macro is deprecated and it's strongly recomended to move in all projects (except tests) to macro...
void Warning(CExceptionArgs_Base &args)
void Info(CExceptionArgs_Base &args)
static TPid Daemonize(const char *logfile=0, TDaemonFlags flags=0)
Go daemon.
@ fDF_KeepCWD
Don't change CWD to "/".
virtual bool GetBool(const string §ion, const string &name, bool default_value, TFlags flags=0, EErrAction err_action=eThrow) const
Get boolean value of specified parameter name.
virtual int GetInt(const string §ion, const string &name, int default_value, TFlags flags=0, EErrAction err_action=eThrow) const
Get integer value of specified parameter name.
@ eReturn
Return default value.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
EIO_Status Close(void)
Close socket.
void DisableOSSendDelay(bool on_off=true)
EIO_Status Write(const void *buf, size_t size, size_t *n_written=0, EIO_WriteMethod how=eIO_WritePersist)
Write to socket.
const STimeout * accept_timeout
Maximum t between exit checks.
void AddListener(IServer_ConnectionFactory *factory, unsigned short port)
Register a listener.
void SetParameters(const SServer_Parameters &new_params)
unsigned int max_threads
Maximum simultaneous threads.
void Run(void)
Enter the main loop.
CSocket & GetSocket(void)
Get underlying socket.
unsigned int init_threads
Number of initial threads.
const struct ncbi::grid::netcache::search::fields::SIZE size
Defines process management classes.
Defines the CNcbiApplication and CAppException classes for creating NCBI applications.
Defines command line argument related classes.
Defines unified interface to application:
Framework to create multithreaded network servers with thread-per-request scheduling.
static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
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