PoolManager
class PoolManager implements Factory
Properties
| protected ObjectPool> | $pools | ||
| protected PoolDefinition> | $definitions |
Methods
Get or create the pool registered for an immutable definition.
Get a managed pool by identity.
Determine if a pool exists for an identity.
Get all registered pools keyed by identity.
Get the definition registered for an identity.
Remove and close a pool when it still matches an optional expected instance.
Remove and close every registered pool.
Describe only normalized pool-option differences.
Details
at line 23
ObjectPool
getOrCreate(PoolDefinition $definition, callable $callback)
Get or create the pool registered for an immutable definition.
at line 72
ObjectPool
get(string $identity)
Get a managed pool by identity.
at line 84
bool
has(string $identity)
Determine if a pool exists for an identity.
at line 94
array
pools()
Get all registered pools keyed by identity.
at line 102
PoolDefinition|null
definition(string $identity)
Get the definition registered for an identity.
at line 110
bool
remove(string $identity, ObjectPool|null $expected = null)
Remove and close a pool when it still matches an optional expected instance.
at line 130
void
flush()
Remove and close every registered pool.
Boot or tests only. This clears worker-lifetime pools shared by every coroutine; use targeted removal for runtime resource recovery.
at line 146
protected string
diffOptions(PoolOptions $registered, PoolOptions $requested)
Describe only normalized pool-option differences.