ConnectionPool class
Wrapper for connection pool operations.
Provides convenient methods to manage a connection pool including getting connections, releasing them, checking health, and closing the pool.
Example:
final pool = ConnectionPool(backend, poolId);
final connId = pool.getConnection();
// ... use connection ...
pool.releaseConnection(connId);
Constructors
- ConnectionPool(OdbcConnectionBackend _backend, int _poolId)
- Creates a new ConnectionPool instance.
Properties
Methods
-
close(
) → bool - Closes the connection pool and releases all connections.
-
getConnection(
) → int - Gets a connection from the pool.
-
getState(
) → ({int idle, int size})? - Gets the current state of the connection pool.
-
healthCheck(
) → bool - Performs a health check on the connection pool.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
releaseConnection(
int connectionId) → bool - Releases a connection back to the pool.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited