Factory
interface Factory
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.
Details
at line 14
ObjectPool
getOrCreate(PoolDefinition $definition, callable $callback)
Get or create the pool registered for an immutable definition.
at line 22
ObjectPool
get(string $identity)
Get a managed pool by identity.
at line 27
bool
has(string $identity)
Determine if a pool exists for an identity.
at line 34
array
pools()
Get all registered pools keyed by identity.
at line 39
PoolDefinition|null
definition(string $identity)
Get the definition registered for an identity.
at line 44
bool
remove(string $identity, ObjectPool|null $expected = null)
Remove and close a pool when it still matches an optional expected instance.
at line 52
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.