Horizon Official Technical Documentation
|
|
#include <Server.hpp>
Public Member Functions | |
DatabaseProcess () | |
DatabaseProcess (Kernel *kernel) | |
~DatabaseProcess () | |
void | initialize (int segment_number=1) override |
void | reinitialize () |
void | initialize (boost::asio::io_context &io_context, int segment_number, std::string host, int port, std::string user, std::string pass, std::string database) |
void | finalize () override |
std::shared_ptr< boost::mysql::tcp_ssl_connection > | get_connection () |
bool | is_initialized () override |
bool | is_finalized () override |
![]() | |
KernelComponent (Kernel *kernel, Horizon::System::runtime_module_type module_type) | |
virtual void | initialize (int segment_number=1) |
virtual void | finalize () |
virtual bool | is_initialized () |
virtual bool | is_finalized () |
void | set_segment_number (int64_t segment_number) |
int64_t | get_segment_number () |
void | system_routine_queue_push (std::shared_ptr< Horizon::System::RuntimeContext > context) |
void | system_routine_queue_push (std::shared_ptr< Horizon::System::RuntimeContextChain > context) |
void | system_routine_process_queue () |
void | system_routine_register (Horizon::System::runtime_module_type module_t, Horizon::System::runtime_synchronization_method sync_t, std::shared_ptr< Horizon::System::RuntimeContext > context) |
const std::string | get_uuid_string () |
const std::string | get_type_string () |
Horizon::System::SystemRoutineManager & | get_system_routine_manager () |
Kernel * | get_kernel () |
void | set_thread_cpu_id (int cpu_id) |
int | get_thread_cpu_id () |
void | set_thread_update_rate (double rate) |
double | get_thread_update_rate () |
void | set_total_execution_time (int time) |
int | get_total_execution_time () |
void | calculate_and_set_cpu_load () |
Protected Attributes | |
boost::asio::io_context * | _io_context |
std::shared_ptr< boost::asio::ssl::context > | _ssl_ctx {nullptr} |
std::shared_ptr< boost::mysql::tcp_ssl_connection > | _connection {nullptr} |
std::string | _host |
int | _port |
std::string | _user |
std::string | _pass |
std::string | _database |
std::atomic< bool > | _is_initialized {false} |
std::atomic< bool > | _is_finalized {false} |
|
inline |
|
inline |
|
inline |
References _connection, and _ssl_ctx.
|
inlineoverridevirtual |
Reimplemented from KernelComponent.
References _connection, and _is_finalized.
std::shared_ptr< boost::mysql::tcp_ssl_connection > DatabaseProcess::get_connection | ( | ) |
References _connection, HLog, and reinitialize().
void DatabaseProcess::initialize | ( | boost::asio::io_context & | io_context, |
int | segment_number, | ||
std::string | host, | ||
int | port, | ||
std::string | user, | ||
std::string | pass, | ||
std::string | database | ||
) |
References _connection, _database, _host, _io_context, _is_initialized, _pass, _port, _ssl_ctx, _user, KernelComponent::calculate_and_set_cpu_load(), KernelComponent::get_thread_cpu_id(), HLog, KernelComponent::set_segment_number(), and KernelComponent::set_thread_cpu_id().
|
inlineoverridevirtual |
Reimplemented from KernelComponent.
References _is_initialized, HLog, and KernelComponent::set_segment_number().
Referenced by BOOST_AUTO_TEST_CASE(), and reinitialize().
|
inlineoverridevirtual |
|
inlineoverridevirtual |
|
inline |
References _connection, _database, _host, _io_context, _is_finalized, _is_initialized, _pass, _port, _ssl_ctx, _user, KernelComponent::get_segment_number(), and initialize().
Referenced by get_connection().
|
protected |
Referenced by finalize(), get_connection(), initialize(), reinitialize(), and ~DatabaseProcess().
|
protected |
Referenced by initialize(), and reinitialize().
|
protected |
Referenced by initialize(), and reinitialize().
|
protected |
Referenced by initialize(), and reinitialize().
|
protected |
Referenced by finalize(), is_finalized(), and reinitialize().
|
protected |
Referenced by initialize(), is_initialized(), and reinitialize().
|
protected |
Referenced by initialize(), and reinitialize().
|
protected |
Referenced by initialize(), and reinitialize().
|
protected |
Referenced by initialize(), reinitialize(), and ~DatabaseProcess().
|
protected |
Referenced by initialize(), and reinitialize().