Database System 0.1.0
Advanced C++20 Database System with Multi-Backend Support
Loading...
Searching...
No Matches
database::integrated::pool_config Struct Reference

Connection pool configuration. More...

#include <configuration.h>

Collaboration diagram for database::integrated::pool_config:
Collaboration graph

Public Attributes

std::string pool_name { "default_pool" }
 Unique name for this pool (for logging and monitoring)
 
std::size_t min_connections { 2 }
 Minimum number of connections to maintain.
 
std::size_t max_connections { 10 }
 Maximum number of connections allowed.
 
std::chrono::seconds connection_timeout { 30 }
 Timeout for acquiring a connection from the pool.
 
std::chrono::seconds idle_timeout { 300 }
 Time before an idle connection is closed.
 
bool enable_health_checks { true }
 Enable periodic health checks on connections.
 
std::chrono::seconds health_check_interval { 60 }
 Interval between health checks.
 
bool enable_priority_queue { false }
 Enable priority-based connection acquisition.
 

Detailed Description

Connection pool configuration.

Controls the behavior of the database connection pool including sizing, timeouts, and health checking.

Examples
/home/runner/work/database_system/database_system/database/integrated/core/configuration.h.

Definition at line 90 of file configuration.h.

Member Data Documentation

◆ connection_timeout

std::chrono::seconds database::integrated::pool_config::connection_timeout { 30 }

◆ enable_health_checks

bool database::integrated::pool_config::enable_health_checks { true }

Enable periodic health checks on connections.

Examples
/home/runner/work/database_system/database_system/database/integrated/core/configuration.h.

Definition at line 108 of file configuration.h.

108{ true };

Referenced by test_default_values().

◆ enable_priority_queue

bool database::integrated::pool_config::enable_priority_queue { false }

◆ health_check_interval

std::chrono::seconds database::integrated::pool_config::health_check_interval { 60 }

Interval between health checks.

Examples
/home/runner/work/database_system/database_system/database/integrated/core/configuration.h.

Definition at line 111 of file configuration.h.

111{ 60 };

◆ idle_timeout

std::chrono::seconds database::integrated::pool_config::idle_timeout { 300 }

Time before an idle connection is closed.

Examples
/home/runner/work/database_system/database_system/database/integrated/core/configuration.h.

Definition at line 105 of file configuration.h.

105{ 300 }; // 5 minutes

Referenced by database::integrated::unified_db_config::set_timeouts(), and test_default_values().

◆ max_connections

◆ min_connections

◆ pool_name

std::string database::integrated::pool_config::pool_name { "default_pool" }

Unique name for this pool (for logging and monitoring)

Examples
/home/runner/work/database_system/database_system/database/integrated/core/configuration.h.

Definition at line 93 of file configuration.h.

93{ "default_pool" };

Referenced by database::integrated::unified_db_config::set_pool_name(), and test_default_values().


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