lintel 0.2.0
Loading...
Searching...
No Matches
Public Attributes | List of all members
lintel::db::PoolSettings Struct Reference

#include <ConnectionPool.h>

Public Attributes

std::size_t maxConnections = 0
 
std::chrono::milliseconds acquireTimeout { 5000 }
 

Detailed Description

Tuning of a ConnectionPool.

maxConnections encodes three operating modes with one implementation:

value behaviour
0 no pool; acquire() fails, the registry keeps no entry
1 one persistent connection, serialized between callers (SQLite default)
N>1 bounded pool (PostgreSQL default, parallel HTTP threads)

Member Data Documentation

◆ acquireTimeout

std::chrono::milliseconds lintel::db::PoolSettings::acquireTimeout { 5000 }

Time ConnectionPool::acquire waits for a free connection before it throws.

◆ maxConnections

std::size_t lintel::db::PoolSettings::maxConnections = 0

Maximum number of connections held by the pool (0 = pooling disabled).


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