SWC-DB  v0.5.12 C++ documentations
SWC-DB© (Super Wide Column Database) - High Performance Scalable Database (https://github.com/kashirin-alex/swc-db)
SWC::Comm::server::SerializedServer Class Referencefinal

#include <swcdb/core/comm/SerializedServer.h>

+ Collaboration diagram for SWC::Comm::server::SerializedServer:

Public Types

typedef std::shared_ptr< SerializedServerPtr
 

Public Member Functions

 SerializedServer (const Config::Settings &settings, std::string &&name, bool concurrency_relative, uint32_t reactors, uint32_t workers, uint16_t port, AppContext::Ptr app_ctx)
 
 SerializedServer (SerializedServer &&)=delete
 
 SerializedServer (const SerializedServer &)=delete
 
SerializedServeroperator= (SerializedServer &&)=delete
 
SerializedServeroperator= (const SerializedServer &)=delete
 
void run ()
 
std::shared_ptr< IoContext::ExecutorWorkGuardstop_accepting ()
 
void shutdown ()
 
void connection_add (const ConnHandlerPtr &conn)
 
void connection_del (const ConnHandlerPtr &conn)
 
 ~SerializedServer () noexcept
 

Private Attributes

const std::string m_appname
 
Core::AtomicBool m_run
 
Core::Vector< IoContextPtrm_io_contexts
 
Core::Vector< Acceptor::Ptrm_acceptors
 
Core::MutexSptd m_mutex
 
Core::Vector< ConnHandlerPtrm_conns
 
ConfigSSLm_ssl_cfg
 

Detailed Description

Definition at line 59 of file SerializedServer.h.

Member Typedef Documentation

◆ Ptr

Definition at line 62 of file SerializedServer.h.

Constructor & Destructor Documentation

◆ SerializedServer() [1/3]

◆ SerializedServer() [2/3]

SWC::Comm::server::SerializedServer::SerializedServer ( SerializedServer &&  )
delete

◆ SerializedServer() [3/3]

SWC::Comm::server::SerializedServer::SerializedServer ( const SerializedServer )
delete

◆ ~SerializedServer()

SWC::Comm::server::SerializedServer::~SerializedServer ( )
noexcept

Definition at line 307 of file SerializedServer.cc.

References m_ssl_cfg.

Member Function Documentation

◆ connection_add()

void SWC::Comm::server::SerializedServer::connection_add ( const ConnHandlerPtr conn)

Definition at line 289 of file SerializedServer.cc.

References m_conns, m_mutex, and SWC::Core::Vector< T, SizeT, GROW_SZ >::push_back().

+ Here is the call graph for this function:

◆ connection_del()

void SWC::Comm::server::SerializedServer::connection_del ( const ConnHandlerPtr conn)

Definition at line 296 of file SerializedServer.cc.

References SWC::Core::Vector< T, SizeT, GROW_SZ >::cbegin(), SWC::Core::Vector< T, SizeT, GROW_SZ >::cend(), SWC::Core::Vector< T, SizeT, GROW_SZ >::erase(), m_conns, and m_mutex.

+ Here is the call graph for this function:

◆ operator=() [1/2]

SerializedServer& SWC::Comm::server::SerializedServer::operator= ( const SerializedServer )
delete

◆ operator=() [2/2]

SerializedServer& SWC::Comm::server::SerializedServer::operator= ( SerializedServer &&  )
delete

◆ run()

SWC_SHOULD_NOT_INLINE void SWC::Comm::server::SerializedServer::run ( )

Definition at line 245 of file SerializedServer.cc.

References SWC::LOG_INFO, m_acceptors, m_appname, m_io_contexts, and SWC_LOGF.

◆ shutdown()

void SWC::Comm::server::SerializedServer::shutdown ( )

Definition at line 269 of file SerializedServer.cc.

References SWC::Core::Vector< T, SizeT, GROW_SZ >::cbegin(), SWC::Core::Vector< T, SizeT, GROW_SZ >::cend(), SWC::Core::Vector< T, SizeT, GROW_SZ >::erase(), SWC::LOG_INFO, m_appname, m_conns, m_mutex, m_run, SWC::Core::AtomicBase< T, OrderT >::store(), and SWC_LOGF.

+ Here is the call graph for this function:

◆ stop_accepting()

std::shared_ptr< IoContext::ExecutorWorkGuard > SWC::Comm::server::SerializedServer::stop_accepting ( )

Definition at line 256 of file SerializedServer.cc.

References SWC::Core::Vector< T, SizeT, GROW_SZ >::back(), SWC::Core::Vector< T, SizeT, GROW_SZ >::cbegin(), SWC::Core::Vector< T, SizeT, GROW_SZ >::cend(), SWC::Core::Vector< T, SizeT, GROW_SZ >::erase(), SWC::LOG_INFO, m_acceptors, m_appname, m_io_contexts, and SWC_LOGF.

+ Here is the call graph for this function:

Member Data Documentation

◆ m_acceptors

Core::Vector<Acceptor::Ptr> SWC::Comm::server::SerializedServer::m_acceptors
private

Definition at line 94 of file SerializedServer.h.

Referenced by run(), SerializedServer(), and stop_accepting().

◆ m_appname

const std::string SWC::Comm::server::SerializedServer::m_appname
private

Definition at line 91 of file SerializedServer.h.

Referenced by run(), SerializedServer(), shutdown(), and stop_accepting().

◆ m_conns

Core::Vector<ConnHandlerPtr> SWC::Comm::server::SerializedServer::m_conns
private

Definition at line 97 of file SerializedServer.h.

Referenced by connection_add(), connection_del(), and shutdown().

◆ m_io_contexts

Core::Vector<IoContextPtr> SWC::Comm::server::SerializedServer::m_io_contexts
private

Definition at line 93 of file SerializedServer.h.

Referenced by run(), SerializedServer(), and stop_accepting().

◆ m_mutex

Core::MutexSptd SWC::Comm::server::SerializedServer::m_mutex
private

Definition at line 96 of file SerializedServer.h.

Referenced by connection_add(), connection_del(), and shutdown().

◆ m_run

Core::AtomicBool SWC::Comm::server::SerializedServer::m_run
private

Definition at line 92 of file SerializedServer.h.

Referenced by shutdown().

◆ m_ssl_cfg

ConfigSSL* SWC::Comm::server::SerializedServer::m_ssl_cfg
private

Definition at line 98 of file SerializedServer.h.

Referenced by SerializedServer(), and ~SerializedServer().


The documentation for this class was generated from the following files: