LibreOffice Module connectivity (master) 1
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
connectivity::OConnectionPool Class Reference

#include <ZConnectionPool.hxx>

Inheritance diagram for connectivity::OConnectionPool:
[legend]
Collaboration diagram for connectivity::OConnectionPool:
[legend]

Public Member Functions

 OConnectionPool (const css::uno::Reference< css::sdbc::XDriver > &_xDriver, const css::uno::Reference< css::uno::XInterface > &_xDriverNode, const css::uno::Reference< css::reflection::XProxyFactory > &_rxProxyFactory)
 
void clear (bool _bDispose)
 
css::uno::Reference< css::sdbc::XConnection > getConnectionWithInfo (const OUString &url, const css::uno::Sequence< css::beans::PropertyValue > &info)
 
virtual void SAL_CALL disposing (const css::lang::EventObject &Source) override
 
virtual void SAL_CALL propertyChange (const css::beans::PropertyChangeEvent &evt) override
 
void invalidatePooledConnections ()
 

Protected Member Functions

virtual ~OConnectionPool () override
 

Private Member Functions

css::uno::Reference< css::sdbc::XConnection > createNewConnection (const OUString &_rURL, const css::uno::Sequence< css::beans::PropertyValue > &_rInfo)
 
css::uno::Reference< css::sdbc::XConnection > getPooledConnection (TConnectionMap::iterator const &_rIter)
 
void calculateTimeOuts ()
 

Private Attributes

TConnectionMap m_aPool
 
TActiveConnectionMap m_aActiveConnections
 
std::mutex m_aMutex
 
::rtl::Reference< OPoolTimerm_xInvalidator
 
css::uno::Reference< css::sdbc::XDriver > m_xDriver
 
css::uno::Reference< css::uno::XInterface > m_xDriverNode
 
css::uno::Reference< css::reflection::XProxyFactory > m_xProxyFactory
 
sal_Int32 m_nTimeOut
 
sal_Int32 m_nALiveCount
 

Detailed Description

Definition at line 104 of file ZConnectionPool.hxx.

Constructor & Destructor Documentation

◆ ~OConnectionPool()

OConnectionPool::~OConnectionPool ( )
overrideprotectedvirtual

Definition at line 71 of file ZConnectionPool.cxx.

References clear().

◆ OConnectionPool()

OConnectionPool::OConnectionPool ( const css::uno::Reference< css::sdbc::XDriver > &  _xDriver,
const css::uno::Reference< css::uno::XInterface > &  _xDriverNode,
const css::uno::Reference< css::reflection::XProxyFactory > &  _rxProxyFactory 
)

Member Function Documentation

◆ calculateTimeOuts()

void OConnectionPool::calculateTimeOuts ( )
private

Definition at line 290 of file ZConnectionPool.cxx.

References m_nALiveCount, and m_nTimeOut.

Referenced by OConnectionPool(), and propertyChange().

◆ clear()

void OConnectionPool::clear ( bool  _bDispose)

◆ createNewConnection()

Reference< XConnection > OConnectionPool::createNewConnection ( const OUString &  _rURL,
const css::uno::Sequence< css::beans::PropertyValue > &  _rInfo 
)
private

◆ disposing()

void SAL_CALL OConnectionPool::disposing ( const css::lang::EventObject &  Source)
overridevirtual

Definition at line 175 of file ZConnectionPool.cxx.

References m_aActiveConnections, m_aMutex, m_nALiveCount, m_xDriverNode, and Source.

◆ getConnectionWithInfo()

Reference< XConnection > OConnectionPool::getConnectionWithInfo ( const OUString &  url,
const css::uno::Sequence< css::beans::PropertyValue > &  info 
)
Exceptions
css::sdbc::SQLException
css::uno::RuntimeException

Definition at line 154 of file ZConnectionPool.cxx.

References createNewConnection(), connectivity::OConnectionWrapper::createUniqueId(), getPooledConnection(), m_aMutex, m_aPool, and nId.

Referenced by connectivity::OPoolCollection::getConnectionWithInfo().

◆ getPooledConnection()

Reference< XConnection > OConnectionPool::getPooledConnection ( TConnectionMap::iterator const &  _rIter)
private

◆ invalidatePooledConnections()

void OConnectionPool::invalidatePooledConnections ( )

Definition at line 229 of file ZConnectionPool.cxx.

References m_aActiveConnections, m_aMutex, m_aPool, and m_xInvalidator.

Referenced by connectivity::OPoolTimer::onShot().

◆ propertyChange()

void SAL_CALL OConnectionPool::propertyChange ( const css::beans::PropertyChangeEvent &  evt)
overridevirtual

Member Data Documentation

◆ m_aActiveConnections

TActiveConnectionMap connectivity::OConnectionPool::m_aActiveConnections
private

◆ m_aMutex

std::mutex connectivity::OConnectionPool::m_aMutex
private

◆ m_aPool

TConnectionMap connectivity::OConnectionPool::m_aPool
private

◆ m_nALiveCount

sal_Int32 connectivity::OConnectionPool::m_nALiveCount
private

◆ m_nTimeOut

sal_Int32 connectivity::OConnectionPool::m_nTimeOut
private

Definition at line 115 of file ZConnectionPool.hxx.

Referenced by calculateTimeOuts(), and OConnectionPool().

◆ m_xDriver

css::uno::Reference< css::sdbc::XDriver > connectivity::OConnectionPool::m_xDriver
private

Definition at line 112 of file ZConnectionPool.hxx.

Referenced by clear(), and createNewConnection().

◆ m_xDriverNode

css::uno::Reference< css::uno::XInterface > connectivity::OConnectionPool::m_xDriverNode
private

Definition at line 113 of file ZConnectionPool.hxx.

Referenced by clear(), disposing(), OConnectionPool(), and propertyChange().

◆ m_xInvalidator

::rtl::Reference<OPoolTimer> connectivity::OConnectionPool::m_xInvalidator
private

◆ m_xProxyFactory

css::uno::Reference< css::reflection::XProxyFactory > connectivity::OConnectionPool::m_xProxyFactory
private

Definition at line 114 of file ZConnectionPool.hxx.

Referenced by createNewConnection().


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