Lightweight 0.20260303.0
Loading...
Searching...
No Matches
Lightweight::PoolConfig Struct Reference

#include <Pool.hpp>

Public Attributes

size_t initialSize {}
 Initial number of data mappers to pre-create and store in the pool, must be less than or equal to maxSize.
 
size_t maxSize {}
 
GrowthStrategy growthStrategy { GrowthStrategy::BoundedWait }
 

Detailed Description

Structure to hold the configuration of the pool, including the initial size, maximum size and growth strategy. Structure is used as a template parameter for the Pool class to configure its behavior at compile time.

Definition at line 36 of file Pool.hpp.

Member Data Documentation

◆ initialSize

size_t Lightweight::PoolConfig::initialSize {}

Initial number of data mappers to pre-create and store in the pool, must be less than or equal to maxSize.

Definition at line 39 of file Pool.hpp.

◆ maxSize

size_t Lightweight::PoolConfig::maxSize {}

Maximum number of data mappers that can exist in the pool, must be greater than or equal to initialSize this is used for the Bounded* strategies to determine when to block or when to stop accepting returned data mappers, for the UnboundedGrow strategy this is ignored

Definition at line 43 of file Pool.hpp.

◆ growthStrategy

GrowthStrategy Lightweight::PoolConfig::growthStrategy { GrowthStrategy::BoundedWait }

Strategy to determine how the pool should grow when there are no idle data mappers available, default is BoundedWait which blocks until a data mapper is returned to the pool

Definition at line 46 of file Pool.hpp.


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