20 : buffer_pool_(DEFAULT_BUFFER_POOL_SIZE)
21 , pdv_pool_(DEFAULT_PDV_POOL_SIZE)
22 , p_data_pool_(DEFAULT_PDATA_POOL_SIZE) {}
31 auto buffer = buffer_pool_.acquire();
39 auto pdv = pdv_pool_.acquire();
40 pdv->context_id = context_id;
41 pdv->is_command = is_command;
42 pdv->is_last = is_last;
49 auto p_data = p_data_pool_.acquire();
tracked_pdu_pool< p_data_tf_pdu > p_data_pool_
auto acquire_p_data_tf() -> tracked_pdu_pool< p_data_tf_pdu >::unique_ptr_type
Acquire a p_data_tf_pdu from the pool.
void reserve_buffers(std::size_t count)
Reserve capacity in buffer pool.
tracked_pdu_pool< presentation_data_value > pdv_pool_
auto pdv_statistics() const noexcept -> const pdu_pool_statistics &
Get PDV pool statistics.
auto acquire_buffer() -> tracked_pdu_pool< pooled_buffer >::unique_ptr_type
Acquire a byte buffer from the pool.
auto buffer_statistics() const noexcept -> const pdu_pool_statistics &
Get buffer pool statistics.
void reset_statistics()
Reset all statistics.
tracked_pdu_pool< pooled_buffer > buffer_pool_
void reserve_pdvs(std::size_t count)
Reserve capacity in PDV pool.
void clear_all()
Clear all pools.
static auto get() noexcept -> pdu_buffer_pool &
Get the global PDU buffer pool instance.
auto acquire_pdv(uint8_t context_id=0, bool is_command=false, bool is_last=true) -> tracked_pdu_pool< presentation_data_value >::unique_ptr_type
Acquire a presentation_data_value from the pool.
auto p_data_statistics() const noexcept -> const pdu_pool_statistics &
Get P-DATA-TF pool statistics.
std::unique_ptr< T, std::function< void(T *)> > unique_ptr_type
Object pooling for PDU buffers and network data structures.
Statistics for PDU buffer pool usage monitoring.
void reset() noexcept
Reset all statistics.