PoolManager
class PoolManager
Properties
| protected DatabasePool> | $pools | The cached pool instances. |
Methods
Get or create a pool for the given connection name.
Get the open pool for the given connection name, without creating one.
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 26
__construct(Container $container)
Create a pool manager.
at line 34
DatabasePool
pool(string $name)
Get or create a pool for the given connection name.
at line 87
DatabasePool|null
existing(string $name)
Get the open pool for the given connection name, without creating one.
at line 103
array
getPools()
Get the existing pools keyed by their physical connection names.
at line 111
protected string
getPoolName(string $name)
Resolve the physical pool name for a requested connection name.
at line 142
bool
has(string $name)
Check if a pool exists for the given connection name.
at line 153
void
purge(string $name)
Remove a pool and close its connections.
Closes a worker-shared pool; connections already checked out by concurrent coroutines are destroyed on release.
at line 168
protected string
getExistingPoolName(string $name)
Resolve an existing pool key for a requested connection name.
at line 181
void
purgeForConnection(string $name)
Remove every pool for a configured connection.
This closes shared worker pools and affects every coroutine that later resolves the same configured connection.
at line 203
void
purgeAll()
Remove all pools and close their connections.
Closes every worker-shared pool; connections already checked out by concurrent coroutines are destroyed on release.