trait HasPoolProxy

Properties

protected Closure> $releaseCallbacks

Methods

mixed
createPoolProxy(string $driver, Closure $resolver, PoolDefinition $definition, string $proxyClass)

Create a pool proxy for an immutable definition.

poolDefinition(string $resource, array $poolConfig, array $fingerprintSource)

Build a namespaced pool definition for a pooled resource.

poolFactory()

Get the pool factory used by this manager.

setReleaseCallback(string $driver, Closure $callback)

Set the release callback for a pooled driver.

Closure|null
getReleaseCallback(string $driver)

Get the release callback for a pooled driver.

addPoolable(string $driver)

Add a driver to the poolable-driver list.

removePoolable(string $driver)

Remove a driver from the poolable-driver list.

array
getPoolables()

Get the poolable-driver list.

setPoolables(array $poolables)

Set the poolable-driver list.

Details

at line 24
protected mixed createPoolProxy(string $driver, Closure $resolver, PoolDefinition $definition, string $proxyClass)

Create a pool proxy for an immutable definition.

Parameters

string $driver
Closure $resolver
PoolDefinition $definition
string $proxyClass

Return Value

mixed

at line 45
protected PoolDefinition poolDefinition(string $resource, array $poolConfig, array $fingerprintSource)

Build a namespaced pool definition for a pooled resource.

Parameters

string $resource
array $poolConfig
array $fingerprintSource

Return Value

PoolDefinition

at line 63
abstract protected Factory poolFactory()

Get the pool factory used by this manager.

Return Value

Factory

at line 71
HasPoolProxy setReleaseCallback(string $driver, Closure $callback)

Set the release callback for a pooled driver.

Boot-only. The callback persists on the manager for the worker lifetime and is captured by every subsequently created proxy for the driver.

Parameters

string $driver
Closure $callback

Return Value

HasPoolProxy

at line 81
Closure|null getReleaseCallback(string $driver)

Get the release callback for a pooled driver.

Parameters

string $driver

Return Value

Closure|null

at line 93
HasPoolProxy addPoolable(string $driver)

Add a driver to the poolable-driver list.

Boot-only. The list persists on the manager for the worker lifetime and is consulted on subsequent driver creation. Per-request use races across coroutines and does not affect already-cached drivers.

Parameters

string $driver

Return Value

HasPoolProxy

at line 109
HasPoolProxy removePoolable(string $driver)

Remove a driver from the poolable-driver list.

Boot-only. The list persists on the manager for the worker lifetime and is consulted on subsequent driver creation. Per-request use races across coroutines and does not affect already-cached drivers.

Parameters

string $driver

Return Value

HasPoolProxy

at line 126
array getPoolables()

Get the poolable-driver list.

Return Value

array

at line 138
HasPoolProxy setPoolables(array $poolables)

Set the poolable-driver list.

Boot-only. The list persists on the manager for the worker lifetime and is consulted on subsequent driver creation. Per-request use races across coroutines and does not affect already-cached drivers.

Parameters

array $poolables

Return Value

HasPoolProxy