LibreOffice Module connectivity (master) 1
|
#include <ZConnectionPool.hxx>
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< OPoolTimer > | m_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 |
Definition at line 104 of file ZConnectionPool.hxx.
|
overrideprotectedvirtual |
Definition at line 71 of file ZConnectionPool.cxx.
References clear().
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 | ||
) |
Definition at line 46 of file ZConnectionPool.cxx.
References calculateTimeOuts(), connectivity::OPoolCollection::getNodeValue(), m_nALiveCount, m_nTimeOut, m_xDriverNode, m_xInvalidator, and TIMEOUT_NODENAME.
|
private |
Definition at line 290 of file ZConnectionPool.cxx.
References m_nALiveCount, and m_nTimeOut.
Referenced by OConnectionPool(), and propertyChange().
void OConnectionPool::clear | ( | bool | _bDispose | ) |
Definition at line 130 of file ZConnectionPool.cxx.
References m_aActiveConnections, m_aMutex, m_aPool, m_xDriver, m_xDriverNode, m_xInvalidator, and TIMEOUT_NODENAME.
Referenced by ~OConnectionPool().
|
private |
Definition at line 196 of file ZConnectionPool.cxx.
References connectivity::TActiveConnectionInfo::aPos, connectivity::OConnectionWrapper::createUniqueId(), m_aActiveConnections, m_aPool, m_nALiveCount, m_xDriver, m_xInvalidator, m_xProxyFactory, connectivity::TConnectionPool::nALiveCount, nId, and connectivity::TActiveConnectionInfo::xPooledConnection.
Referenced by getConnectionWithInfo().
|
overridevirtual |
Definition at line 175 of file ZConnectionPool.cxx.
References m_aActiveConnections, m_aMutex, m_nALiveCount, m_xDriverNode, and Source.
Reference< XConnection > OConnectionPool::getConnectionWithInfo | ( | const OUString & | url, |
const css::uno::Sequence< css::beans::PropertyValue > & | info | ||
) |
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().
|
private |
Definition at line 258 of file ZConnectionPool.cxx.
References connectivity::TActiveConnectionInfo::aPos, m_aActiveConnections, and connectivity::TActiveConnectionInfo::xPooledConnection.
Referenced by getConnectionWithInfo().
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().
|
overridevirtual |
Definition at line 281 of file ZConnectionPool.cxx.
References calculateTimeOuts(), connectivity::OPoolCollection::getNodeValue(), m_nALiveCount, m_xDriverNode, and TIMEOUT_NODENAME.
|
private |
Definition at line 107 of file ZConnectionPool.hxx.
Referenced by clear(), createNewConnection(), disposing(), getPooledConnection(), and invalidatePooledConnections().
|
private |
Definition at line 109 of file ZConnectionPool.hxx.
Referenced by clear(), disposing(), getConnectionWithInfo(), and invalidatePooledConnections().
|
private |
Definition at line 106 of file ZConnectionPool.hxx.
Referenced by clear(), createNewConnection(), getConnectionWithInfo(), and invalidatePooledConnections().
|
private |
Definition at line 116 of file ZConnectionPool.hxx.
Referenced by calculateTimeOuts(), createNewConnection(), disposing(), OConnectionPool(), and propertyChange().
|
private |
Definition at line 115 of file ZConnectionPool.hxx.
Referenced by calculateTimeOuts(), and OConnectionPool().
|
private |
Definition at line 112 of file ZConnectionPool.hxx.
Referenced by clear(), and createNewConnection().
|
private |
Definition at line 113 of file ZConnectionPool.hxx.
Referenced by clear(), disposing(), OConnectionPool(), and propertyChange().
|
private |
Definition at line 110 of file ZConnectionPool.hxx.
Referenced by clear(), createNewConnection(), invalidatePooledConnections(), and OConnectionPool().
|
private |
Definition at line 114 of file ZConnectionPool.hxx.
Referenced by createNewConnection().