class PoolRecycler implements Recycler

Properties

protected Timer $timer
protected int|null $timerId

Methods

__construct(Factory $manager, float $interval = 10.0, Timer|null $timer = null)

Create a pool recycler.

float
getInterval()

Get the maintenance interval in seconds.

void
start()

Start periodic pool maintenance.

void
stop()

Stop periodic pool maintenance.

void
maintainPools()

Evict idle pools and maintain live pools.

Details

at line 24
__construct(Factory $manager, float $interval = 10.0, Timer|null $timer = null)

Create a pool recycler.

Parameters

Factory $manager
float $interval
Timer|null $timer

at line 39
float getInterval()

Get the maintenance interval in seconds.

Return Value

float

at line 50
void start()

Start periodic pool maintenance.

Boot-only. Starting during a request schedules worker-wide maintenance that affects every subsequently registered pool.

Return Value

void

at line 76
void stop()

Stop periodic pool maintenance.

Boot or tests only. Stopping disables automatic maintenance for every pool in the worker.

Return Value

void

at line 88
protected void maintainPools()

Evict idle pools and maintain live pools.

Return Value

void