userver
C++ Async Framework
Loading...
Searching...
No Matches
pool_strategy.hpp
Go to the documentation of this file.
1
#
pragma
once
2
3
/// @file userver/storages/sqlite/infra/strategy/pool_strategy.hpp
4
/// @brief @copybrief storages::sqlite::infra::strategy::PoolStrategyBase
5
6
#
include
<
memory
>
7
8
#
include
<
userver
/
engine
/
async
.
hpp
>
9
#
include
<
userver
/
engine
/
task
/
task_processor_fwd
.
hpp
>
10
#
include
<
userver
/
utils
/
statistics
/
writer
.
hpp
>
11
12
#
include
<
userver
/
storages
/
sqlite
/
operation_types
.
hpp
>
13
#
include
<
userver
/
storages
/
sqlite
/
options
.
hpp
>
14
#
include
<
userver
/
storages
/
sqlite
/
sqlite_fwd
.
hpp
>
15
16
USERVER_NAMESPACE_BEGIN
17
18
namespace
storages::sqlite::infra::strategy {
19
20
/// @brief Selects read-only vs read-write SQLite pool for an operation
21
class
PoolStrategyBase
{
22
public
:
23
virtual
~PoolStrategyBase();
24
25
static
std::unique_ptr<
PoolStrategyBase
> Create(
26
const
settings::
SQLiteSettings
& settings,
27
engine::TaskProcessor& blocking_task_processor
28
);
29
30
Pool& SelectPool(
OperationType
operation_type)
const
;
31
32
virtual
void
WriteStatistics(
utils
::
statistics
::Writer& writer)
const
= 0;
33
34
protected
:
35
virtual
Pool& GetReadOnly()
const
= 0;
36
virtual
Pool& GetReadWrite()
const
= 0;
37
};
38
39
}
// namespace storages::sqlite::infra::strategy
40
41
USERVER_NAMESPACE_END
userver
storages
sqlite
infra
strategy
pool_strategy.hpp
Generated on Thu May 21 2026 16:22:06 for userver by
Doxygen
1.13.2