Joedb 10.5.0
The Journal-Only Embedded Database
Loading...
Searching...
No Matches
joedb::asio::Server Class Referenceabstract

Superclass for asio servers. More...

#include <joedb/asio/Server.h>

Inheritance diagram for joedb::asio::Server:
Collaboration diagram for joedb::asio::Server:

Classes

class  Session

Public Member Functions

 Server (Logger &logger, int log_level, int thread_count, std::string endpoint_path)
int get_log_level () const
const std::string & get_endpoint_path () const
bool is_started () const noexcept
void start ()
void stop ()
void join ()
void run ()
virtual void cleanup_after_join ()
virtual ~Server ()
Public Member Functions inherited from joedb::Logger
virtual ~Logger ()=default

Protected Member Functions

void log (beman::cstring_view message) noexcept override
virtual std::unique_ptr< Session > new_session (boost::asio::local::stream_protocol::socket &&socket)=0

Protected Attributes

Logger & logger
const int log_level
const int thread_count
boost::asio::thread_pool thread_pool
bool started
const std::string endpoint_path
boost::asio::local::stream_protocol::endpoint endpoint
boost::asio::local::stream_protocol::acceptor acceptor
boost::asio::signal_set interrupt_signals

Additional Inherited Members

Static Public Attributes inherited from joedb::Logger
static Logger dummy_logger

Detailed Description

Definition at line 18 of file Server.h.

Constructor & Destructor Documentation

◆ Server()

joedb::asio::Server::Server ( Logger & logger,
int log_level,
int thread_count,
std::string endpoint_path )

Definition at line 124 of file Server.cpp.

◆ ~Server()

joedb::asio::Server::~Server ( )
virtual

Reimplemented in joedb::Server.

Definition at line 192 of file Server.cpp.

Member Function Documentation

◆ cleanup_after_join()

void joedb::asio::Server::cleanup_after_join ( )
virtual

Reimplemented in joedb::Server.

Definition at line 188 of file Server.cpp.

◆ get_endpoint_path()

const std::string & joedb::asio::Server::get_endpoint_path ( ) const
inline

Definition at line 86 of file Server.h.

◆ get_log_level()

int joedb::asio::Server::get_log_level ( ) const
inline

Definition at line 81 of file Server.h.

◆ is_started()

bool joedb::asio::Server::is_started ( ) const
inlinenoexcept

Definition at line 91 of file Server.h.

◆ join()

void joedb::asio::Server::join ( )

Definition at line 180 of file Server.cpp.

◆ log()

void joedb::asio::Server::log ( beman::cstring_view message)
overrideprotectedvirtualnoexcept

Reimplemented from joedb::Logger.

Definition at line 11 of file Server.cpp.

◆ new_session()

virtual std::unique_ptr< Session > joedb::asio::Server::new_session ( boost::asio::local::stream_protocol::socket && socket)
protectedpure virtual

Implemented in joedb::rpc::Server.

◆ run()

void joedb::asio::Server::run ( )
inline

Definition at line 97 of file Server.h.

◆ start()

void joedb::asio::Server::start ( )

Definition at line 163 of file Server.cpp.

◆ stop()

void joedb::asio::Server::stop ( )

Definition at line 174 of file Server.cpp.

Member Data Documentation

◆ acceptor

boost::asio::local::stream_protocol::acceptor joedb::asio::Server::acceptor
protected

Definition at line 31 of file Server.h.

◆ endpoint

boost::asio::local::stream_protocol::endpoint joedb::asio::Server::endpoint
protected

Definition at line 30 of file Server.h.

◆ endpoint_path

const std::string joedb::asio::Server::endpoint_path
protected

Definition at line 29 of file Server.h.

◆ interrupt_signals

boost::asio::signal_set joedb::asio::Server::interrupt_signals
protected

Definition at line 32 of file Server.h.

◆ log_level

const int joedb::asio::Server::log_level
protected

Definition at line 22 of file Server.h.

◆ logger

Logger& joedb::asio::Server::logger
protected

Definition at line 21 of file Server.h.

◆ started

bool joedb::asio::Server::started
protected

Definition at line 27 of file Server.h.

◆ thread_count

const int joedb::asio::Server::thread_count
protected

Definition at line 25 of file Server.h.

◆ thread_pool

boost::asio::thread_pool joedb::asio::Server::thread_pool
protected

Definition at line 26 of file Server.h.


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