NCBI C++ ToolKit
Public Member Functions | Private Attributes | List of all members
CBDBEnvKeeperServer Class Reference

Search Toolkit Book for CBDBEnvKeeperServer

Main server class. More...

+ Inheritance diagram for CBDBEnvKeeperServer:
+ Collaboration diagram for CBDBEnvKeeperServer:

Public Member Functions

 CBDBEnvKeeperServer ()
 
virtual bool ShutdownRequested (void)
 Runs synchronously between iterations. More...
 
void RequestShutdown (void)
 
- Public Member Functions inherited from CServer
 CServer (void)
 
virtual ~CServer ()
 
void AddListener (IServer_ConnectionFactory *factory, unsigned short port)
 Register a listener. More...
 
bool RemoveListener (unsigned short port)
 Removes a listener. More...
 
void SetParameters (const SServer_Parameters &new_params)
 
void GetParameters (SServer_Parameters *params)
 
void StartListening (void)
 Start listening before the main loop. More...
 
void Run (void)
 Enter the main loop. More...
 
void SubmitRequest (const CRef< CStdRequest > &request)
 Submit request to be executed by the server thread pool. More...
 
void DeferConnectionProcessing (IServer_ConnectionBase *conn)
 Mark connection as deferred for processing, i.e. More...
 
void DeferConnectionProcessing (CSocket *sock)
 
void CloseConnection (CSocket *sock)
 Close connection. More...
 
void AddConnectionToPool (CServer_Connection *conn)
 Add externally created connection to the connection pool which server polls on. More...
 
void RemoveConnectionFromPool (CServer_Connection *conn)
 Remove externally created connection from pool. More...
 
void WakeUpPollCycle (void)
 Force poll cycle to make another iteration. More...
 
void SetCustomThreadSuffix (const string &suffix)
 Set custom suffix to use on all threads in the server's pool. More...
 
vector< unsigned short > GetListenerPorts (void)
 Provides a list of ports on which the server is listening. More...
 

Private Attributes

volatile bool m_ShutdownRequested
 

Additional Inherited Members

- Protected Member Functions inherited from CServer
virtual void Init ()
 Initialize the server. More...
 
virtual void Exit ()
 Cleanup the server. More...
 
virtual void ProcessTimeout (void)
 Runs synchronously when no socket activity has occurred in a while (as determined by m_AcceptTimeout). More...
 
- Protected Member Functions inherited from CConnIniter
 CConnIniter (void)
 

Detailed Description

Main server class.

Definition at line 64 of file bdb_env_keeper.cpp.

Constructor & Destructor Documentation

◆ CBDBEnvKeeperServer()

CBDBEnvKeeperServer::CBDBEnvKeeperServer ( )
inline

Definition at line 67 of file bdb_env_keeper.cpp.

Member Function Documentation

◆ RequestShutdown()

void CBDBEnvKeeperServer::RequestShutdown ( void  )
inline

◆ ShutdownRequested()

virtual bool CBDBEnvKeeperServer::ShutdownRequested ( void  )
inlinevirtual

Runs synchronously between iterations.

Returns
whether to shut down service and return from Run.

Reimplemented from CServer.

Definition at line 70 of file bdb_env_keeper.cpp.

References m_ShutdownRequested.

Referenced by Server_SignalHandler().

Member Data Documentation

◆ m_ShutdownRequested

volatile bool CBDBEnvKeeperServer::m_ShutdownRequested
private

Definition at line 73 of file bdb_env_keeper.cpp.

Referenced by RequestShutdown(), and ShutdownRequested().


The documentation for this class was generated from the following file:
Modified on Wed Apr 17 13:10:07 2024 by modify_doxy.py rev. 669887