userver: storages::mongo::PoolSettings Struct Reference
Loading...
Searching...
No Matches
storages::mongo::PoolSettings Struct Referencefinal

#include <userver/storages/mongo/pool_config.hpp>

Detailed Description

Mongo connection pool options.

Dynamic option MONGO_CONNECTION_POOL_SETTINGS

Definition at line 27 of file pool_config.hpp.

Public Member Functions

void Validate (const std::string &pool_id) const
 

Public Attributes

size_t initial_size = kDefaultInitialSize
 Initial connection count.
 
size_t max_size = kDefaultMaxSize
 Total connections limit.
 
size_t idle_limit = kDefaultIdleLimit
 Idle connections limit.
 
size_t connecting_limit = kDefaultConnectingLimit
 Establishing connections limit.
 

Static Public Attributes

static constexpr size_t kDefaultInitialSize = 16
 Default initial connection count.
 
static constexpr size_t kDefaultMaxSize = 128
 Default total connections limit.
 
static constexpr size_t kDefaultIdleLimit = 64
 Default idle connections limit.
 
static constexpr size_t kDefaultConnectingLimit = 8
 Default establishing connections limit.
 

Member Function Documentation

◆ Validate()

void storages::mongo::PoolSettings::Validate ( const std::string & pool_id) const
Exceptions
InvalidConfigExceptionif pool settings are invalid

Member Data Documentation

◆ connecting_limit

size_t storages::mongo::PoolSettings::connecting_limit = kDefaultConnectingLimit

Establishing connections limit.

Definition at line 44 of file pool_config.hpp.

◆ idle_limit

size_t storages::mongo::PoolSettings::idle_limit = kDefaultIdleLimit

Idle connections limit.

Definition at line 42 of file pool_config.hpp.

◆ initial_size

size_t storages::mongo::PoolSettings::initial_size = kDefaultInitialSize

Initial connection count.

Definition at line 38 of file pool_config.hpp.

◆ kDefaultConnectingLimit

constexpr size_t storages::mongo::PoolSettings::kDefaultConnectingLimit = 8
staticconstexpr

Default establishing connections limit.

Definition at line 35 of file pool_config.hpp.

◆ kDefaultIdleLimit

constexpr size_t storages::mongo::PoolSettings::kDefaultIdleLimit = 64
staticconstexpr

Default idle connections limit.

Definition at line 33 of file pool_config.hpp.

◆ kDefaultInitialSize

constexpr size_t storages::mongo::PoolSettings::kDefaultInitialSize = 16
staticconstexpr

Default initial connection count.

Definition at line 29 of file pool_config.hpp.

◆ kDefaultMaxSize

constexpr size_t storages::mongo::PoolSettings::kDefaultMaxSize = 128
staticconstexpr

Default total connections limit.

Definition at line 31 of file pool_config.hpp.

◆ max_size

size_t storages::mongo::PoolSettings::max_size = kDefaultMaxSize

Total connections limit.

Definition at line 40 of file pool_config.hpp.


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