PoolManager
class PoolManager
Properties
| protected DatabasePool> | $pools | The cached pool instances. |
Methods
Get or create a pool for the given connection name.
Get the existing pools keyed by their physical connection names.
Resolve the physical pool name for a requested connection name.
Check if a pool exists for the given connection name.
Remove a pool and close its connections.
Resolve an existing pool key for a requested connection name.
Remove every pool for a configured connection.
Remove all pools and close their connections.
Details
at line 25
__construct(Container $container)
Create a pool manager.
at line 33
DatabasePool
pool(string $name)
Get or create a pool for the given connection name.
at line 92
array
getPools()
Get the existing pools keyed by their physical connection names.
at line 100
protected string
getPoolName(string $name)
Resolve the physical pool name for a requested connection name.
at line 131
bool
has(string $name)
Check if a pool exists for the given connection name.
at line 142
void
purge(string $name)
Remove a pool and close its connections.
Boot or tests only. Closes a worker-shared pool; connections already checked out by concurrent coroutines are destroyed on release.
at line 156
protected string
getExistingPoolName(string $name)
Resolve an existing pool key for a requested connection name.
at line 169
void
purgeForConnection(string $name)
Remove every pool 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 190
void
purgeAll()
Remove all pools and close their connections.
Boot or tests only. Closes every worker-shared pool; connections already checked out by concurrent coroutines are destroyed on release.