Recycler
interface Recycler
Methods
Get the time interval for recycling operations.
Set the time interval for recycling operations.
Get the ID of the current timer for recycling.
Start objects recycling with the current timer.
Stop automatic maintenance of objects in managed pools.
Details
at line 15
float
getInterval()
Get the time interval for recycling operations.
at line 25
void
setInterval(float $interval)
Set the time interval for recycling operations.
Boot-only. The interval persists on the singleton recycler for the worker lifetime and controls every subsequently scheduled maintenance loop.
at line 30
Timer
getTimer()
Get the timer for scheduling recycle operations.
at line 38
void
setTimer(Timer $timer)
Set the timer for scheduling recycle operations.
Boot or tests only. Replacing the timer after start would diverge from the already-scheduled loop retained by the previous timer.
at line 43
int|null
getTimerId()
Get the ID of the current timer for recycling.
at line 51
void
start()
Start objects recycling with the current timer.
Boot-only. Starting during a request schedules worker-wide maintenance that affects every subsequently registered pool.
at line 59
void
stop()
Stop automatic maintenance of objects in managed pools.
Boot or tests only. Stopping disables automatic maintenance for every pool in the worker.