PoolFactory
class PoolFactory
Factory for creating and caching database connection pools.
Properties
| protected DbPool> | $pools | The cached pool instances. |
Methods
Resolve the physical pool name for a requested connection name.
Check if a pool exists for the given connection name.
Flush a specific pool, closing all connections.
Resolve an existing pool key for a requested connection name.
Flush all pool variants for a configured connection.
Flush all pools, closing all connections.
Details
at line 23
__construct(Container $container)
No description
at line 31
DbPool
getPool(string $name)
Get or create a pool for the given connection name.
at line 51
protected string
getPoolName(string $name)
Resolve the physical pool name for a requested connection name.
at line 80
bool
hasPool(string $name)
Check if a pool exists for the given connection name.
at line 91
void
flushPool(string $name)
Flush a specific pool, closing all connections.
Boot or tests only. Closes a worker-shared pool; connections already checked out by concurrent coroutines are destroyed on release.
at line 105
protected string
getExistingPoolName(string $name)
Resolve an existing pool key for a requested connection name.
at line 118
void
flushPoolsForConnection(string $name)
Flush all pool variants for a configured connection.
Boot or tests only. This closes shared worker pools and affects every coroutine that later resolves the same configured connection.
at line 135
void
flushAll()
Flush all pools, closing all connections.
Boot or tests only. Closes every worker-shared pool; connections already checked out by concurrent coroutines are destroyed on release.