interface Recycler

Methods

float
getInterval()

Get the time interval for recycling operations.

void
setInterval(float $interval)

Set the time interval for recycling operations.

getTimer()

Get the timer for scheduling recycle operations.

void
setTimer(Timer $timer)

Set the timer for scheduling recycle operations.

int|null
getTimerId()

Get the ID of the current timer for recycling.

void
start()

Start objects recycling with the current timer.

void
stop()

Stop automatic maintenance of objects in managed pools.

Details

at line 15
float getInterval()

Get the time interval for recycling operations.

Return Value

float

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.

Parameters

float $interval

Return Value

void

Exceptions

InvalidArgumentException

at line 30
Timer getTimer()

Get the timer for scheduling recycle operations.

Return Value

Timer

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.

Parameters

Timer $timer

Return Value

void

at line 43
int|null getTimerId()

Get the ID of the current timer for recycling.

Return Value

int|null

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.

Return Value

void

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.

Return Value

void