PoolRecycler
class PoolRecycler implements Recycler
Properties
| protected Timer|null | $timer | ||
| protected int|null | $timerId | ||
| protected float | $interval |
Methods
Get the maintenance interval in seconds.
Set the maintenance interval in seconds.
Get the active maintenance timer ID.
Start periodic pool maintenance.
Stop periodic pool maintenance.
Evict idle pools and maintain live pools.
Details
at line 25
__construct(Factory $manager, float $interval = 10.0)
Create a pool recycler.
at line 35
float
getInterval()
Get the maintenance interval in seconds.
at line 46
void
setInterval(float $interval)
Set the maintenance interval in seconds.
Boot-only. The interval persists on the singleton recycler for the worker lifetime and controls every subsequently scheduled maintenance loop.
at line 58
Timer
getTimer()
Get the timer used to schedule maintenance.
at line 69
void
setTimer(Timer $timer)
Set the timer used to schedule maintenance.
Boot or tests only. Replacing the timer after start would diverge from the already-scheduled loop retained by the previous timer.
at line 77
int|null
getTimerId()
Get the active maintenance timer ID.
at line 88
void
start()
Start periodic pool maintenance.
Boot-only. Starting during a request schedules worker-wide maintenance that affects every subsequently registered pool.
at line 112
void
stop()
Stop periodic pool maintenance.
Boot or tests only. Stopping disables automatic maintenance for every pool in the worker.
at line 124
protected void
maintainPools()
Evict idle pools and maintain live pools.