ConnectionPool
interface ConnectionPool
Methods
Get the pool name.
Borrow a connection from the pool.
Close excess idle connections without checking their age.
Close the connection pool and release its resources.
Determine if the connection pool is closed.
Get the pool configuration options.
Return the number of connections managed by the pool.
Return the number of connections borrowed by callers.
Return the number of idle connections available for borrowing.
Return the number of coroutines waiting for capacity.
Return the pool's current resource counts and closed state.
Details
at line 14
string
getName()
Get the pool name.
at line 19
Connection
borrow()
Borrow a connection from the pool.
at line 24
void
release(Connection $connection)
Release a connection back to the connection pool.
at line 29
void
discard(Connection $connection)
Discard a borrowed connection from the connection pool.
at line 36
void
trimExcessIdle()
Close excess idle connections without checking their age.
Stop when the managed count reaches the retained minimum or no idle connections remain.
at line 41
void
close()
Close the connection pool and release its resources.
at line 46
bool
isClosed()
Determine if the connection pool is closed.
at line 51
PoolOptions
getOptions()
Get the pool configuration options.
at line 56
int
getManagedCount()
Return the number of connections managed by the pool.
at line 61
int
getBorrowedCount()
Return the number of connections borrowed by callers.
at line 66
int
getIdleCount()
Return the number of idle connections available for borrowing.
at line 71
int
getWaitingCount()
Return the number of coroutines waiting for capacity.
at line 78
array
getStats()
Return the pool's current resource counts and closed state.