fb-cpp 0.0.2
A modern C++ wrapper for the Firebird database API
Loading...
Searching...
No Matches
fbcpp::AttachmentPoolOptions Class Referencefinal

Represents options used when creating an AttachmentPool object. More...

#include <AttachmentPool.h>

Public Member Functions

const AttachmentOptionsgetAttachmentOptions () const
 Returns the options used to create each pooled Attachment.
 
AttachmentPoolOptionssetAttachmentOptions (const AttachmentOptions &value)
 Sets the options used to create each pooled Attachment.
 
std::size_t getMinSize () const
 Returns the minimum number of connections kept warm by the pool.
 
AttachmentPoolOptionssetMinSize (std::size_t value)
 Sets the minimum number of connections kept warm by the pool.
 
std::size_t getMaxSize () const
 Returns the maximum number of connections the pool may create.
 
AttachmentPoolOptionssetMaxSize (std::size_t value)
 Sets the maximum number of connections the pool may create.
 
std::chrono::milliseconds getAcquireTimeout () const
 Returns how long acquire() waits for a connection to become available before throwing.
 
AttachmentPoolOptionssetAcquireTimeout (std::chrono::milliseconds value)
 Sets how long acquire() waits for a connection to become available before throwing.
 
const std::optional< std::chrono::milliseconds > & getIdleTimeout () const
 Returns the maximum time a connection may stay idle in the pool before being closed.
 
AttachmentPoolOptionssetIdleTimeout (std::chrono::milliseconds value)
 Sets the maximum time a connection may stay idle in the pool before being closed.
 
const std::optional< std::chrono::milliseconds > & getMaxLifetime () const
 Returns the maximum lifetime of a connection, regardless of usage.
 
AttachmentPoolOptionssetMaxLifetime (std::chrono::milliseconds value)
 Sets the maximum lifetime of a connection, regardless of usage.
 
bool getValidateOnAcquire () const
 Returns whether a connection is validated (via ping) before being handed out by acquire().
 
AttachmentPoolOptionssetValidateOnAcquire (bool value)
 Sets whether a connection is validated (via ping) before being handed out by acquire().
 
bool getSessionResetOnRelease () const
 Returns whether a connection has its session reset (via ALTER SESSION RESET) before being returned to the pool.
 
AttachmentPoolOptionssetSessionResetOnRelease (bool value)
 Sets whether a connection has its session reset (via ALTER SESSION RESET) before being returned to the pool.
 

Detailed Description

Represents options used when creating an AttachmentPool object.

Definition at line 52 of file AttachmentPool.h.

Member Function Documentation

◆ getAcquireTimeout()

std::chrono::milliseconds fbcpp::AttachmentPoolOptions::getAcquireTimeout ( ) const
inline

Returns how long acquire() waits for a connection to become available before throwing.

Definition at line 111 of file AttachmentPool.h.

◆ getAttachmentOptions()

const AttachmentOptions & fbcpp::AttachmentPoolOptions::getAttachmentOptions ( ) const
inline

Returns the options used to create each pooled Attachment.

Definition at line 58 of file AttachmentPool.h.

◆ getIdleTimeout()

const std::optional< std::chrono::milliseconds > & fbcpp::AttachmentPoolOptions::getIdleTimeout ( ) const
inline

Returns the maximum time a connection may stay idle in the pool before being closed.

Definition at line 128 of file AttachmentPool.h.

◆ getMaxLifetime()

const std::optional< std::chrono::milliseconds > & fbcpp::AttachmentPoolOptions::getMaxLifetime ( ) const
inline

Returns the maximum lifetime of a connection, regardless of usage.

Definition at line 146 of file AttachmentPool.h.

◆ getMaxSize()

std::size_t fbcpp::AttachmentPoolOptions::getMaxSize ( ) const
inline

Returns the maximum number of connections the pool may create.

Definition at line 94 of file AttachmentPool.h.

◆ getMinSize()

std::size_t fbcpp::AttachmentPoolOptions::getMinSize ( ) const
inline

Returns the minimum number of connections kept warm by the pool.

Definition at line 77 of file AttachmentPool.h.

◆ getSessionResetOnRelease()

bool fbcpp::AttachmentPoolOptions::getSessionResetOnRelease ( ) const
inline

Returns whether a connection has its session reset (via ALTER SESSION RESET) before being returned to the pool.

Definition at line 181 of file AttachmentPool.h.

◆ getValidateOnAcquire()

bool fbcpp::AttachmentPoolOptions::getValidateOnAcquire ( ) const
inline

Returns whether a connection is validated (via ping) before being handed out by acquire().

Definition at line 163 of file AttachmentPool.h.

◆ setAcquireTimeout()

AttachmentPoolOptions & fbcpp::AttachmentPoolOptions::setAcquireTimeout ( std::chrono::milliseconds  value)
inline

Sets how long acquire() waits for a connection to become available before throwing.

Definition at line 119 of file AttachmentPool.h.

◆ setAttachmentOptions()

AttachmentPoolOptions & fbcpp::AttachmentPoolOptions::setAttachmentOptions ( const AttachmentOptions value)
inline

Sets the options used to create each pooled Attachment.

AttachmentOptions::setCreateDatabase must not be enabled, since a pool only attaches to an existing database.

Definition at line 68 of file AttachmentPool.h.

◆ setIdleTimeout()

AttachmentPoolOptions & fbcpp::AttachmentPoolOptions::setIdleTimeout ( std::chrono::milliseconds  value)
inline

Sets the maximum time a connection may stay idle in the pool before being closed.

Connections are never evicted below getMinSize() due to idling.

Definition at line 137 of file AttachmentPool.h.

◆ setMaxLifetime()

AttachmentPoolOptions & fbcpp::AttachmentPoolOptions::setMaxLifetime ( std::chrono::milliseconds  value)
inline

Sets the maximum lifetime of a connection, regardless of usage.

Definition at line 154 of file AttachmentPool.h.

◆ setMaxSize()

AttachmentPoolOptions & fbcpp::AttachmentPoolOptions::setMaxSize ( std::size_t  value)
inline

Sets the maximum number of connections the pool may create.

Definition at line 102 of file AttachmentPool.h.

◆ setMinSize()

AttachmentPoolOptions & fbcpp::AttachmentPoolOptions::setMinSize ( std::size_t  value)
inline

Sets the minimum number of connections kept warm by the pool.

Definition at line 85 of file AttachmentPool.h.

◆ setSessionResetOnRelease()

AttachmentPoolOptions & fbcpp::AttachmentPoolOptions::setSessionResetOnRelease ( bool  value)
inline

Sets whether a connection has its session reset (via ALTER SESSION RESET) before being returned to the pool.

A connection whose reset fails is discarded instead of being reused.

Definition at line 190 of file AttachmentPool.h.

◆ setValidateOnAcquire()

AttachmentPoolOptions & fbcpp::AttachmentPoolOptions::setValidateOnAcquire ( bool  value)
inline

Sets whether a connection is validated (via ping) before being handed out by acquire().

Definition at line 171 of file AttachmentPool.h.


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