class PoolManager

Properties

protected DatabasePool> $pools

The cached pool instances.

Methods

__construct(Container $container)

Create a pool manager.

pool(string $name)

Get or create a pool for the given connection name.

array
getPools()

Get the existing pools keyed by their physical connection names.

string
getPoolName(string $name)

Resolve the physical pool name for a requested connection name.

bool
has(string $name)

Check if a pool exists for the given connection name.

void
purge(string $name)

Remove a pool and close its connections.

string
getExistingPoolName(string $name)

Resolve an existing pool key for a requested connection name.

void
purgeForConnection(string $name)

Remove every pool for a configured connection.

void
purgeAll()

Remove all pools and close their connections.

Details

at line 25
__construct(Container $container)

Create a pool manager.

Parameters

Container $container

at line 33
DatabasePool pool(string $name)

Get or create a pool for the given connection name.

Parameters

string $name

Return Value

DatabasePool

at line 92
array getPools()

Get the existing pools keyed by their physical connection names.

Return Value

array

at line 100
protected string getPoolName(string $name)

Resolve the physical pool name for a requested connection name.

Parameters

string $name

Return Value

string

at line 131
bool has(string $name)

Check if a pool exists for the given connection name.

Parameters

string $name

Return Value

bool

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.

Parameters

string $name

Return Value

void

at line 156
protected string getExistingPoolName(string $name)

Resolve an existing pool key for a requested connection name.

Parameters

string $name

Return Value

string

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.

Parameters

string $name

Return Value

void

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.

Return Value

void