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::FsBroker::AppContext Class Referencefinal

#include <swcdb/fsbroker/AppContext.h>

+ Inheritance diagram for SWC::FsBroker::AppContext:
+ Collaboration diagram for SWC::FsBroker::AppContext:

Classes

struct  CommandHandler
 

Public Types

typedef std::shared_ptr< AppContextPtr
 
- Public Types inherited from SWC::Comm::AppContext
typedef std::shared_ptr< AppContextPtr
 

Public Member Functions

 AppContext ()
 
void init (const std::string &host, const Comm::EndPoints &endpoints) override
 
void set_srv (Comm::server::SerializedServer::Ptr srv)
 
virtual ~AppContext () noexcept
 
void handle_established (Comm::ConnHandlerPtr conn) override
 
void handle_disconnect (Comm::ConnHandlerPtr conn) noexcept override
 
void handle (Comm::ConnHandlerPtr conn, const Comm::Event::Ptr &ev) override
 
void net_bytes_sent (const Comm::ConnHandlerPtr &conn, size_t b) noexcept override
 
void net_bytes_received (const Comm::ConnHandlerPtr &conn, size_t b) noexcept override
 
void net_accepted (const Comm::EndPoint &endpoint, bool secure) noexcept override
 
void shutting_down (const std::error_code &ec, const int &sig)
 
void stop () override
 
- Public Member Functions inherited from SWC::Comm::AppContext
SWC_CAN_INLINE AppContext (Config::Property::Value_enum_g::Ptr a_cfg_encoder) noexcept
 
 AppContext (AppContext &&)=delete
 
 AppContext (const AppContext &)=delete
 
AppContextoperator= (AppContext &&)=delete
 
AppContextoperator= (const AppContext &)=delete
 

Private Attributes

Comm::server::SerializedServer::Ptr m_srv = nullptr
 
Metric::Reporting::Ptr m_metrics = nullptr
 

Additional Inherited Members

- Public Attributes inherited from SWC::Comm::AppContext
const Config::Property::Value_enum_g::Ptr cfg_encoder
 

Detailed Description

Definition at line 43 of file AppContext.h.

Member Typedef Documentation

◆ Ptr

typedef std::shared_ptr<AppContext> SWC::FsBroker::AppContext::Ptr

Definition at line 99 of file AppContext.h.

Constructor & Destructor Documentation

◆ AppContext()

SWC::FsBroker::AppContext::AppContext ( )
inline

Definition at line 101 of file AppContext.h.

References SWC::FS::BROKER, SWC::FS::fs_type(), SWC::Env::FsBroker::init(), SWC::Env::Clients::init(), SWC::Env::FsInterface::init(), SWC::Env::IoCtx::init(), SWC::Env::IoCtx::io(), SWC::client::Clients::make(), SWC::Env::Config::settings(), and SWC_ASSERT.

+ Here is the call graph for this function:

◆ ~AppContext()

virtual SWC::FsBroker::AppContext::~AppContext ( )
inlinevirtualnoexcept

Reimplemented from SWC::Comm::AppContext.

Definition at line 165 of file AppContext.h.

Member Function Documentation

◆ handle()

void SWC::FsBroker::AppContext::handle ( Comm::ConnHandlerPtr  conn,
const Comm::Event::Ptr ev 
)
inlineoverridevirtual

Implements SWC::Comm::AppContext.

Definition at line 179 of file AppContext.h.

References SWC::Env::FsBroker::can_process(), SWC::Env::FsBroker::in_process(), m_metrics, SWC::Comm::Protocol::FsBroker::MAX_CMD, SWC::Comm::Protocol::Common::Handler::not_implemented(), and SWC::Env::IoCtx::post().

+ Here is the call graph for this function:

◆ handle_disconnect()

void SWC::FsBroker::AppContext::handle_disconnect ( Comm::ConnHandlerPtr  conn)
inlineoverridevirtualnoexcept

Implements SWC::Comm::AppContext.

Definition at line 173 of file AppContext.h.

References m_metrics, and m_srv.

◆ handle_established()

void SWC::FsBroker::AppContext::handle_established ( Comm::ConnHandlerPtr  conn)
inlineoverridevirtual

Implements SWC::Comm::AppContext.

Definition at line 167 of file AppContext.h.

References m_metrics, and m_srv.

◆ init()

void SWC::FsBroker::AppContext::init ( const std::string &  host,
const Comm::EndPoints endpoints 
)
inlineoverridevirtual

Reimplemented from SWC::Comm::AppContext.

Definition at line 149 of file AppContext.h.

References SWC::Env::IoCtx::io(), m_metrics, SWC::Env::FsBroker::metrics_track(), and shutting_down().

+ Here is the call graph for this function:

◆ net_accepted()

void SWC::FsBroker::AppContext::net_accepted ( const Comm::EndPoint endpoint,
bool  secure 
)
inlineoverridevirtualnoexcept

Reimplemented from SWC::Comm::AppContext.

Definition at line 214 of file AppContext.h.

References m_metrics.

◆ net_bytes_received()

void SWC::FsBroker::AppContext::net_bytes_received ( const Comm::ConnHandlerPtr conn,
size_t  b 
)
inlineoverridevirtualnoexcept

Reimplemented from SWC::Comm::AppContext.

Definition at line 208 of file AppContext.h.

References m_metrics.

◆ net_bytes_sent()

void SWC::FsBroker::AppContext::net_bytes_sent ( const Comm::ConnHandlerPtr conn,
size_t  b 
)
inlineoverridevirtualnoexcept

Reimplemented from SWC::Comm::AppContext.

Definition at line 202 of file AppContext.h.

References m_metrics.

◆ set_srv()

void SWC::FsBroker::AppContext::set_srv ( Comm::server::SerializedServer::Ptr  srv)
inline

Definition at line 161 of file AppContext.h.

References m_srv.

◆ shutting_down()

void SWC::FsBroker::AppContext::shutting_down ( const std::error_code &  ec,
const int &  sig 
)
inline

Definition at line 220 of file AppContext.h.

References SWC::Env::IoCtx::io(), SWC::LOG_INFO, shutting_down(), SWC_CAN_INLINE, and SWC_LOGF.

Referenced by init(), and shutting_down().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ stop()

void SWC::FsBroker::AppContext::stop ( )
inlineoverridevirtual

Reimplemented from SWC::Comm::AppContext.

Definition at line 247 of file AppContext.h.

References SWC::Env::Clients::get(), SWC::Env::FsInterface::interface(), SWC::Env::IoCtx::io(), m_metrics, m_srv, SWC::Env::IoCtx::reset(), SWC::Env::Clients::reset(), SWC::Env::FsInterface::reset(), SWC::Env::FsBroker::reset(), and SWC::Env::FsBroker::shuttingdown().

+ Here is the call graph for this function:

Member Data Documentation

◆ m_metrics

Metric::Reporting::Ptr SWC::FsBroker::AppContext::m_metrics = nullptr
private

◆ m_srv

Comm::server::SerializedServer::Ptr SWC::FsBroker::AppContext::m_srv = nullptr
private

Definition at line 279 of file AppContext.h.

Referenced by handle_disconnect(), handle_established(), set_srv(), and stop().


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