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

#include <swcdb/ranger/AppContext.h>

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

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
 

Static Public Member Functions

static SWC_SHOULD_NOT_INLINE Ptr make ()
 

Private Attributes

Comm::Protocol::Mngr::Req::RgrMngId::Ptr id_mngr
 
Comm::server::SerializedServer::Ptr m_srv
 
Metric::Reporting::Ptr m_metrics
 
std::shared_ptr< Comm::IoContext::ExecutorWorkGuardm_guard
 

Additional Inherited Members

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

Detailed Description

Definition at line 39 of file AppContext.h.

Member Typedef Documentation

◆ Ptr

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

Definition at line 41 of file AppContext.h.

Constructor & Destructor Documentation

◆ AppContext()

SWC::Ranger::AppContext::AppContext ( )
inline

Definition at line 97 of file AppContext.h.

Referenced by make().

+ Here is the caller graph for this function:

◆ ~AppContext()

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

Reimplemented from SWC::Comm::AppContext.

Definition at line 128 of file AppContext.h.

Member Function Documentation

◆ handle()

◆ handle_disconnect()

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

Implements SWC::Comm::AppContext.

Definition at line 136 of file AppContext.h.

References m_metrics, and m_srv.

◆ handle_established()

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

Implements SWC::Comm::AppContext.

Definition at line 130 of file AppContext.h.

References m_metrics, and m_srv.

◆ init()

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

Reimplemented from SWC::Comm::AppContext.

Definition at line 107 of file AppContext.h.

References SWC::DB::RgrData::endpoints, id_mngr, SWC::Env::Rgr::io(), m_metrics, SWC::Env::Rgr::rgr_data(), shutting_down(), and SWC::Env::Rgr::start().

+ Here is the call graph for this function:

◆ make()

static SWC_SHOULD_NOT_INLINE Ptr SWC::Ranger::AppContext::make ( )
inlinestatic

Definition at line 44 of file AppContext.h.

References AppContext(), SWC::FS::fs_type(), SWC::Env::Rgr::init(), SWC::Env::Clients::init(), SWC::Env::FsInterface::init(), SWC::Env::Rgr::io(), SWC::client::Clients::make(), SWC::Comm::IoContext::make(), and SWC::Env::Config::settings().

Referenced by SWC::Ranger::make_service().

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

◆ net_accepted()

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

Reimplemented from SWC::Comm::AppContext.

Definition at line 255 of file AppContext.h.

References m_metrics.

◆ net_bytes_received()

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

Reimplemented from SWC::Comm::AppContext.

Definition at line 249 of file AppContext.h.

References m_metrics.

◆ net_bytes_sent()

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

Reimplemented from SWC::Comm::AppContext.

Definition at line 243 of file AppContext.h.

References m_metrics.

◆ set_srv()

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

Definition at line 124 of file AppContext.h.

References m_srv.

◆ shutting_down()

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

Definition at line 261 of file AppContext.h.

References id_mngr, SWC::Env::Rgr::io(), SWC::LOG_INFO, m_guard, m_srv, shutting_down(), SWC::Env::Rgr::shuttingdown(), SWC_CAN_INLINE, SWC_LOG, SWC_LOGF, and SWC_QUICK_EXIT.

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::Ranger::AppContext::stop ( )
inlineoverridevirtual

Reimplemented from SWC::Comm::AppContext.

Definition at line 298 of file AppContext.h.

References SWC::Env::Clients::get(), id_mngr, SWC::Env::FsInterface::interface(), SWC::Env::Rgr::io(), m_guard, m_metrics, m_srv, SWC::Env::Clients::reset(), SWC::Env::FsInterface::reset(), SWC::Env::Rgr::reset(), and SWC::Env::Rgr::wait_if_in_process().

+ Here is the call graph for this function:

Member Data Documentation

◆ id_mngr

Comm::Protocol::Mngr::Req::RgrMngId::Ptr SWC::Ranger::AppContext::id_mngr
private

Definition at line 329 of file AppContext.h.

Referenced by handle(), init(), shutting_down(), and stop().

◆ m_guard

std::shared_ptr<Comm::IoContext::ExecutorWorkGuard> SWC::Ranger::AppContext::m_guard
private

Definition at line 332 of file AppContext.h.

Referenced by shutting_down(), and stop().

◆ m_metrics

Metric::Reporting::Ptr SWC::Ranger::AppContext::m_metrics
private

◆ m_srv

Comm::server::SerializedServer::Ptr SWC::Ranger::AppContext::m_srv
private

Definition at line 330 of file AppContext.h.

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


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