![]() |
Qore openldap Module 1.3.0
|
LDAP connection pool for efficient connection reuse. More...
#include <LdapConnectionPool.qm.dox.h>
Public Member Methods | |
| void | destructor () |
| Destructor - closes all connections. | |
| void | withConnection (code callback) |
| Executes a callback with a pooled connection. | |
| auto | withConnectionResult (code callback) |
| Executes a callback with a pooled connection and returns the result. | |
| hash< auto > | getStats () |
| Returns pool statistics. | |
| string | getUri () |
| Returns the LDAP URI. | |
| string | getConnectionId (LdapClient conn) |
| Returns a unique identifier for a connection object. | |
Private Attributes | |
| string | uri |
| LDAP URI. | |
| hash< auto > | opts |
| Connection options. | |
| hash< auto > | poolOpts |
| Pool options. | |
LDAP connection pool for efficient connection reuse.
| hash< auto > LdapConnectionPool::getStats | ( | ) |
Returns pool statistics.
available: number of available connectionsin_use: number of connections in usetotal: total number of connectionsmin: minimum configured connectionsmax: maximum configured connections | void LdapConnectionPool::withConnection | ( | code | callback | ) |
Executes a callback with a pooled connection.
| callback | the callback to execute with the connection |
The connection is automatically returned to the pool after the callback completes, even if an exception is thrown.
| auto LdapConnectionPool::withConnectionResult | ( | code | callback | ) |
Executes a callback with a pooled connection and returns the result.
| callback | the callback to execute with the connection |
The connection is automatically returned to the pool after the callback completes, even if an exception is thrown.